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 00000000000..c0bee4c97bc --- /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 cbe10c793ef..94300381ce4 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' } ]