diff --git a/patches/may_2013/p07_move_update_stock_to_pos.py b/patches/may_2013/p07_move_update_stock_to_pos.py index f76cda3212d..7928728f4a7 100644 --- a/patches/may_2013/p07_move_update_stock_to_pos.py +++ b/patches/may_2013/p07_move_update_stock_to_pos.py @@ -15,4 +15,9 @@ def execute(): webnotes.defaults.clear_cache("Control Panel") - webnotes.reload_doc("setup", "doctype", "global_defaults") \ No newline at end of file + 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""") \ No newline at end of file