brotherton-erpnext/patches/march_2013/p01_c_form.py
2013-11-20 13:00:28 +05:30

9 lines
353 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import webnotes
def execute():
for cform in webnotes.conn.sql("""select name from `tabC-Form` where docstatus=2"""):
webnotes.conn.sql("""update `tabSales Invoice` set c_form_no=null
where c_form_no=%s""", cform[0])