fix: customer code max characters limit issue (#32177)
This commit is contained in:
parent
ce0676ac70
commit
8f787c08a2
@ -795,7 +795,7 @@
|
||||
},
|
||||
{
|
||||
"fieldname": "customer_code",
|
||||
"fieldtype": "Data",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"label": "Customer Code",
|
||||
"no_copy": 1,
|
||||
@ -910,7 +910,7 @@
|
||||
"image_field": "image",
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2022-06-15 09:02:06.177691",
|
||||
"modified": "2022-09-12 15:00:10.130340",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Item",
|
||||
|
@ -778,6 +778,14 @@ class TestItem(FrappeTestCase):
|
||||
item.has_batch_no = 1
|
||||
item.save()
|
||||
|
||||
def test_customer_codes_length(self):
|
||||
"""Check if item code with special characters are allowed."""
|
||||
item = make_item(properties={"item_code": "Test Item Code With Special Characters"})
|
||||
for row in range(3):
|
||||
item.append("customer_items", {"ref_code": frappe.generate_hash("", 120)})
|
||||
item.save()
|
||||
self.assertTrue(len(item.customer_code) > 140)
|
||||
|
||||
|
||||
def set_item_variant_settings(fields):
|
||||
doc = frappe.get_doc("Item Variant Settings")
|
||||
|
Loading…
Reference in New Issue
Block a user