features setup patch fixed
This commit is contained in:
parent
2ce051284a
commit
5556cbe51d
@ -361,6 +361,8 @@ def execute(patch_no):
|
|||||||
elif patch_no == 370:
|
elif patch_no == 370:
|
||||||
sql("update `tabDocField` set `hidden` = 0 where fieldname = 'group_or_ledger' and parent = 'Cost Center'")
|
sql("update `tabDocField` set `hidden` = 0 where fieldname = 'group_or_ledger' and parent = 'Cost Center'")
|
||||||
elif patch_no == 371:
|
elif patch_no == 371:
|
||||||
|
from webnotes.modules.module_manager import reload_doc
|
||||||
|
|
||||||
reload_doc('setup', 'doctype','features_setup')
|
reload_doc('setup', 'doctype','features_setup')
|
||||||
flds = ['page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_serial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos']
|
flds = ['page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_serial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos']
|
||||||
|
|
||||||
@ -368,9 +370,9 @@ def execute(patch_no):
|
|||||||
val = sql("select value from tabSingles where field = '%s' and doctype = 'Features Setup'" % f)
|
val = sql("select value from tabSingles where field = '%s' and doctype = 'Features Setup'" % f)
|
||||||
val = val and val[0][0] or 0
|
val = val and val[0][0] or 0
|
||||||
sql("update `tabSingles` set value = %s where field = '%s' and doctype = 'Features Setup'" % (val, '__'+f))
|
sql("update `tabSingles` set value = %s where field = '%s' and doctype = 'Features Setup'" % (val, '__'+f))
|
||||||
|
|
||||||
st = "'"+"', '".join(flds)+"'"
|
st = "'"+"', '".join(flds)+"'"
|
||||||
sql("delete from `tabSingles` where field in (%s) and doctype = 'Features Setup'" % st)
|
sql("delete from `tabDocField` where fieldname in (%s) and parent = 'Features Setup'" % st)
|
||||||
sql("delete from `tabDefaultValue` where defkey in (%s) and parent = 'Control Panel'" % st)
|
sql("delete from `tabDefaultValue` where defkey in (%s) and parent = 'Control Panel'" % st)
|
||||||
|
|
||||||
get_obj('Features Setup', 'Features Setup').doc.save()
|
get_obj('Features Setup', 'Features Setup').doc.save()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user