mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +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:
|
if not self.item_name:
|
||||||
self.item_name = self.item_code
|
self.item_name = self.item_code
|
||||||
|
|
||||||
if not strip_html(cstr(self.description)).strip():
|
|
||||||
self.description = self.item_name
|
|
||||||
|
|
||||||
self.validate_uom()
|
self.validate_uom()
|
||||||
self.validate_description()
|
self.validate_description()
|
||||||
self.add_default_uom_in_conversion_factor_table()
|
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(warehouse="_Test Warehouse - _TC"))
|
||||||
self.assertTrue(get_data(item_group="All Item Groups"))
|
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):
|
def test_item_type_field_change(self):
|
||||||
"""Check if critical fields like `is_stock_item`, `has_batch_no` are not changed if transactions exist."""
|
"""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
|
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
|
||||||
|
|||||||
@@ -114,7 +114,6 @@
|
|||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"print_width": "300px",
|
"print_width": "300px",
|
||||||
"reqd": 1,
|
|
||||||
"width": "300px"
|
"width": "300px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -415,7 +414,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2025-03-02 17:05:28.386492",
|
"modified": "2025-08-10 22:37:39.863628",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Subcontracting",
|
"module": "Subcontracting",
|
||||||
"name": "Subcontracting Order Item",
|
"name": "Subcontracting Order Item",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class SubcontractingOrderItem(Document):
|
|||||||
bom: DF.Link
|
bom: DF.Link
|
||||||
conversion_factor: DF.Float
|
conversion_factor: DF.Float
|
||||||
cost_center: DF.Link | None
|
cost_center: DF.Link | None
|
||||||
description: DF.TextEditor
|
description: DF.TextEditor | None
|
||||||
expected_delivery_date: DF.Date | None
|
expected_delivery_date: DF.Date | None
|
||||||
expense_account: DF.Link | None
|
expense_account: DF.Link | None
|
||||||
image: DF.Attach | None
|
image: DF.Attach | None
|
||||||
|
|||||||
Reference in New Issue
Block a user