mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-20 15:25:13 +00:00
Merge pull request #48912 from maasanto/dont-set-description
This commit is contained in:
@@ -185,9 +185,6 @@ class Item(Document):
|
||||
if not self.item_name:
|
||||
self.item_name = self.item_code
|
||||
|
||||
if not strip_html(cstr(self.description)).strip():
|
||||
self.description = self.item_name
|
||||
|
||||
self.validate_uom()
|
||||
self.validate_description()
|
||||
self.add_default_uom_in_conversion_factor_table()
|
||||
|
||||
@@ -812,13 +812,6 @@ class TestItem(IntegrationTestCase):
|
||||
self.assertTrue(get_data(warehouse="_Test Warehouse - _TC"))
|
||||
self.assertTrue(get_data(item_group="All Item Groups"))
|
||||
|
||||
def test_empty_description(self):
|
||||
item = make_item(properties={"description": "<p></p>"})
|
||||
self.assertEqual(item.description, item.item_name)
|
||||
item.description = ""
|
||||
item.save()
|
||||
self.assertEqual(item.description, item.item_name)
|
||||
|
||||
def test_item_type_field_change(self):
|
||||
"""Check if critical fields like `is_stock_item`, `has_batch_no` are not changed if transactions exist."""
|
||||
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
|
||||
|
||||
@@ -114,7 +114,6 @@
|
||||
"fieldtype": "Text Editor",
|
||||
"label": "Description",
|
||||
"print_width": "300px",
|
||||
"reqd": 1,
|
||||
"width": "300px"
|
||||
},
|
||||
{
|
||||
@@ -415,7 +414,7 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2025-03-02 17:05:28.386492",
|
||||
"modified": "2025-08-10 22:37:39.863628",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Subcontracting",
|
||||
"name": "Subcontracting Order Item",
|
||||
@@ -429,4 +428,4 @@
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class SubcontractingOrderItem(Document):
|
||||
bom: DF.Link
|
||||
conversion_factor: DF.Float
|
||||
cost_center: DF.Link | None
|
||||
description: DF.TextEditor
|
||||
description: DF.TextEditor | None
|
||||
expected_delivery_date: DF.Date | None
|
||||
expense_account: DF.Link | None
|
||||
image: DF.Attach | None
|
||||
|
||||
Reference in New Issue
Block a user