rerun packing list patch

This commit is contained in:
Nabin Hait 2011-09-02 13:10:23 +05:30
parent 630f433741
commit ef75761c42

View File

@ -1,7 +1,7 @@
# REMEMBER to update this
# ========================
last_patch = 351
last_patch = 352
#-------------------------------------------
@ -274,3 +274,15 @@ def execute(patch_no):
reload_doc('stock', 'doctype', 'item_customer_detail')
elif patch_no == 351:
reload_doc('home', 'page', 'dashboard')
elif patch_no == 352:
reload_doc('stock','doctype','delivery_note')
reload_doc('stock','doctype','item')
reload_doc('selling','doctype','quotation')
reload_doc('stock','Print Format','Delivery Note Packing List Wise')
if not sql("select format from `tabDocFormat` where name = 'Delivery Note Packing List Wise' and parent = 'Delivery Note'"):
from webnotes.model.doc import addchild
dt_obj = get_obj('DocType', 'Delivery Note', with_children = 1)
ch = addchild(dt_obj.doc, 'formats', 'DocFormat', 1)
ch.format = 'Delivery Note Packing List Wise'
ch.save(1)