source, target warehouse is editable for material user, manager in stock entry

This commit is contained in:
Nabin Hait 2011-08-23 17:20:51 +05:30
parent 6fcd0e26e4
commit 46cd8b2ebf

View File

@ -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')")