[move update stock to pos] set update_stock = 0 in old sales invoice where is_pos = 0
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 f76cda3..7928728 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 @@
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