From 46cd8b2ebf7bec30559e0ea87fc1133478c0d941 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 23 Aug 2011 17:20:51 +0530 Subject: [PATCH] source, target warehouse is editable for material user, manager in stock entry --- patches/patch.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/patches/patch.py b/patches/patch.py index 8b7276b00d..f94c905eed 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 340 +last_patch = 342 #------------------------------------------- @@ -1409,3 +1409,17 @@ def execute(patch_no): reload_doc('production','doctype','bill_of_materials') elif patch_no == 340: sql("update `tabDocField` set permlevel = 0 where (fieldname in ('process', 'production_order', 'fg_completed_qty') or label = 'Get Items') and parent = 'Stock Entry'") + elif patch_no == 341: + 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) + elif patch_no == 342: + sql("update `tabDocField` set permlevel = 0 where parent = 'Stock Entry' and fieldname in ('s_warehouse', 't_warehouse', 'fg_item')")