brotherton-erpnext/patches/october_2013/fix_is_cancelled_in_sle.py

13 lines
468 B
Python
Raw Normal View History

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
def execute():
webnotes.conn.sql("""update `tabStock Ledger Entry` set is_cancelled = 'No'
where ifnull(is_cancelled, '') = ''""")
webnotes.conn.sql("""update tabBin b set b.stock_uom =
(select i.stock_uom from tabItem i where i.name = b.item_code)
2013-10-02 11:10:14 +00:00
where b.creation>='2013-09-01'""")