fixes in cform
diff --git a/patches/march_2013/p01_c_form.py b/patches/march_2013/p01_c_form.py
new file mode 100644
index 0000000..5261d2b
--- /dev/null
+++ b/patches/march_2013/p01_c_form.py
@@ -0,0 +1,6 @@
+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])
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 2bd4ad8..dd7ff06 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -204,4 +204,5 @@
"patches.march_2013.update_po_prevdoc_doctype",
"patches.february_2013.p09_timesheets",
"execute:(not webnotes.conn.exists('UOM', 'Hour')) and webnotes.doc({'uom_name': 'Hour', 'doctype': 'UOM', 'name': 'Hour'}).insert()",
+ "patches.march_2013.p01_c_form"
]
\ No newline at end of file