Make Variant does not copy UOM properties (#10887) (#11261)

* add `uoms` to Item Variant Settings if not already added

* add new patch to patch list

* change uoms field to no_copy:0
This commit is contained in:
tundebabzy 2017-10-25 07:27:10 +01:00 committed by Nabin Hait
parent 2672c331af
commit cba7a11d75
3 changed files with 16 additions and 1 deletions

View File

@ -451,3 +451,4 @@ erpnext.patches.v8_9.update_billing_gstin_for_indian_account
erpnext.patches.v9_0.fix_subscription_next_date
erpnext.patches.v9_0.add_healthcare_domain
erpnext.patches.v9_0.set_variant_item_description
erpnext.patches.v9_0.set_uoms_in_variant_field

View File

@ -0,0 +1,14 @@
from __future__ import unicode_literals
import frappe
def execute():
doc = frappe.get_doc('Item Variant Settings')
variant_field_names = [vf.field_name for vf in doc.fields]
if 'uoms' not in variant_field_names:
doc.append(
'fields', {
'field_name': 'uoms'
}
)
doc.save()

View File

@ -1072,7 +1072,7 @@
"in_standard_filter": 0,
"label": "UOMs",
"length": 0,
"no_copy": 1,
"no_copy": 0,
"oldfieldname": "uom_conversion_details",
"oldfieldtype": "Table",
"options": "UOM Conversion Detail",