reload mapper

This commit is contained in:
Nabin Hait 2011-09-13 17:56:27 +05:30
parent 0a16631221
commit 67127150ae

View File

@ -1,7 +1,7 @@
# REMEMBER to update this
# ========================
last_patch = 363
last_patch = 364
#-------------------------------------------
@ -328,3 +328,12 @@ def execute(patch_no):
for d in mappers:
if d[0] and d[1]:
reload_doc(d[1].lower(), 'DocType Mapper', d[0])
elif patch_no == 364:
sql("""delete from `tabField Mapper Detail`
where to_field in ('qty', 'amount', 'export_amount')
and parent in ('Sales Order-Receivable Voucher', 'Delivery Note-Receivable Voucher')
""")
mappers = sql("select name, module from `tabDocType Mapper`")
for d in mappers:
if d[0] and d[1]:
reload_doc(d[1].lower(), 'DocType Mapper', d[0])