From 3c572d74688329cee6ee00284e66c0e4538c0811 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 24 Jan 2012 10:55:04 +0530 Subject: [PATCH 1/5] change patch file in patch list customer address contact patch --- erpnext/patches/patch_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index c0c7d1ecea..edce3c3d69 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -37,7 +37,7 @@ patch_list = [ }, { 'patch_module': 'patches.jan_mar_2012', - 'patch_file': 'customer_address_contact', + 'patch_file': 'customer_address_contact_patch', 'description': "Install Customer Address Contact report and run patches regarding primary address and contact" }, ] From 2e3ce6cc0238a9a080ec8a6310762818d292d3b5 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 24 Jan 2012 11:37:28 +0530 Subject: [PATCH 2/5] Fix error in patch due to single quote in name --- .../patches/jan_mar_2012/customer_address_contact_patch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py b/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py index 6a7d40568c..b55acd4d51 100644 --- a/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py +++ b/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py @@ -31,7 +31,7 @@ def patch_primary_contact(): GROUP BY sales_partner HAVING SUM(IFNULL(is_primary_contact, 0))=0 ) """, as_list=1) - names = ", ".join(["'" + str(r[0]) + "'" for r in res if r]) + names = ", ".join(['"' + str(r[0]) + '"' for r in res if r]) if names: webnotes.conn.sql("UPDATE `tabContact` SET is_primary_contact=1 WHERE name IN (%s)" % names) def patch_primary_address(): @@ -54,5 +54,5 @@ def patch_primary_address(): AND SUM(IFNULL(is_shipping_address, 0))=0 ) """, as_list=1) - names = ", ".join(["'" + str(r[0]) + "'" for r in res if r]) + names = ", ".join(['"' + str(r[0]) + '"' for r in res if r]) if names: webnotes.conn.sql("UPDATE `tabAddress` SET is_primary_address=1 WHERE name IN (%s)" % names) From a2fcca578d2ba5f96a088bdb6f882cb56a873fec Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 24 Jan 2012 13:46:46 +0530 Subject: [PATCH 3/5] Purchase Other Charges - company field --- .../purchase_other_charges.txt | 23 ++++++++++++------- index.html | 2 +- version.num | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.txt b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.txt index 5c5503944c..8be135952f 100644 --- a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.txt +++ b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.txt @@ -5,16 +5,18 @@ { 'creation': '2010-08-08 17:09:15', 'docstatus': 0, - 'modified': '2010-09-20 17:30:25', + 'modified': '2012-01-24 12:42:18', 'modified_by': 'Administrator', 'owner': 'wasim@webnotestech.com' }, # These values are common for all DocType { + '_last_update': '1325570646', 'allow_trash': 1, 'autoname': 'field:title', 'colour': 'White:FFF', + 'default_print_format': 'Standard', 'doctype': 'DocType', 'document_type': 'Master', 'module': 'Buying', @@ -22,7 +24,7 @@ 'section_style': 'Simple', 'server_code_error': ' ', 'show_in_menu': 0, - 'version': 16 + 'version': 18 }, # These values are common for all DocField @@ -54,7 +56,6 @@ # DocPerm { 'doctype': 'DocPerm', - 'idx': 1, 'permlevel': 1, 'role': 'All' }, @@ -65,7 +66,6 @@ 'cancel': 0, 'create': 0, 'doctype': 'DocPerm', - 'idx': 2, 'permlevel': 0, 'role': 'Purchase Manager', 'submit': 0, @@ -77,7 +77,6 @@ 'cancel': 1, 'create': 1, 'doctype': 'DocPerm', - 'idx': 3, 'permlevel': 0, 'role': 'System Manager', 'write': 1 @@ -88,7 +87,6 @@ 'cancel': 1, 'create': 1, 'doctype': 'DocPerm', - 'idx': 4, 'permlevel': 0, 'role': 'Purchase Master Manager', 'submit': 0, @@ -100,7 +98,6 @@ 'doctype': 'DocField', 'fieldname': 'title', 'fieldtype': 'Data', - 'idx': 1, 'in_filter': 1, 'label': 'Title', 'oldfieldname': 'title', @@ -109,12 +106,22 @@ 'search_index': 0 }, + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'company', + 'fieldtype': 'Link', + 'in_filter': 1, + 'label': 'Company', + 'options': 'Company', + 'reqd': 1 + }, + # DocField { 'doctype': 'DocField', 'fieldname': 'purchase_tax_details', 'fieldtype': 'Table', - 'idx': 2, 'label': 'Purchase Tax Details', 'oldfieldname': 'purchase_tax_details', 'oldfieldtype': 'Table', diff --git a/index.html b/index.html index b53b0a48a4..f22d5a6d93 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ ERPNext -