[move update stock to pos] set update_stock = 0 in old sales invoice where is_pos = 0

This commit is contained in:
Anand Doshi 2013-05-31 16:31:44 +05:30
parent e961af40fc
commit c7b8c4a414

View File

@ -16,3 +16,8 @@ def execute():
webnotes.defaults.clear_cache("Control Panel") webnotes.defaults.clear_cache("Control Panel")
webnotes.reload_doc("setup", "doctype", "global_defaults") webnotes.reload_doc("setup", "doctype", "global_defaults")
# previously, update_stock was valid only when is_pos was checked
# henceforth it is valid, and hence the patch
webnotes.conn.sql("""update `tabSales Invoice` set update_stock=0
where ifnull(is_pos, 0)=0""")