mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Allow Item variant Rename (#13161)
* [WIP] Item varient rename * [wip] Item Variant * [fix] Item Varient Rename * [fix] Item Attribution Rename * removed unwanted code
This commit is contained in:
committed by
Nabin Hait
parent
f0543a9765
commit
668ec25d19
@@ -92,7 +92,10 @@ def validate_is_incremental(numeric_attribute, attribute, value, item):
|
||||
InvalidItemAttributeValueError, title=_('Invalid Attribute'))
|
||||
|
||||
def validate_item_attribute_value(attributes_list, attribute, attribute_value, item):
|
||||
if attribute_value not in attributes_list:
|
||||
allow_rename_attribute_value = frappe.db.get_single_value('Item Variant Settings', 'allow_rename_attribute_value')
|
||||
if allow_rename_attribute_value:
|
||||
pass
|
||||
elif attribute_value not in attributes_list:
|
||||
frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values for Item {2}").format(
|
||||
attribute_value, attribute, item), InvalidItemAttributeValueError, title=_('Invalid Attribute'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user