diff --git a/patches/patch.py b/patches/patch.py index 38b853ad1f..37bff245b9 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -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)