From 75ef7c7a897f2584cb9387f0928abb13663e5159 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 14 Feb 2012 16:08:22 +0530 Subject: [PATCH] def val of is_subcontracted is NO --- erpnext/patches/jan_mar_2012/subcon_default_val.py | 7 +++++++ erpnext/patches/patch_list.py | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 erpnext/patches/jan_mar_2012/subcon_default_val.py diff --git a/erpnext/patches/jan_mar_2012/subcon_default_val.py b/erpnext/patches/jan_mar_2012/subcon_default_val.py new file mode 100644 index 0000000000..c0bee4c97b --- /dev/null +++ b/erpnext/patches/jan_mar_2012/subcon_default_val.py @@ -0,0 +1,7 @@ +def execute(): + import webnotes + webnotes.conn.sql(""" + update `tabDocField` set `default` = 'No' + where parent in ('Purchase Order', 'Purchase Receipt') + and fieldname = 'is_subcontracted' + """) diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index cbe10c793e..94300381ce 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -74,5 +74,10 @@ patch_list = [ 'patch_module': 'patches.jan_mar_2012', 'patch_file': 'account_type_patch', 'description': 'mentioed account type for some tax accounts' + }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'subcon_default_val', + 'description': 'Default value of is_subcontracted in PO, PR is No' } ]