From 3ad3ebdaec39a7931645fc4bf615484670387cdd Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sun, 17 Jun 2012 21:54:50 +0530 Subject: [PATCH] set recurring type as Monthly in all old sales invoice --- erpnext/patches/june_2012/set_recurring_type.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 erpnext/patches/june_2012/set_recurring_type.py diff --git a/erpnext/patches/june_2012/set_recurring_type.py b/erpnext/patches/june_2012/set_recurring_type.py new file mode 100644 index 0000000000..1164b67773 --- /dev/null +++ b/erpnext/patches/june_2012/set_recurring_type.py @@ -0,0 +1,6 @@ +def execute(): + import webnotes + from webnotes.modules import reload_doc + reload_doc('accounts', 'doctype', 'sales_invoice') + + webnotes.conn.sql("update `tabSales Invoice` set recurring_type = 'Monthly' where ifnull(convert_into_recurring_invoice, 0) = 1") \ No newline at end of file