From 9ea03f371a680f8c120c5bf30f54b99b50244aa6 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 27 Dec 2012 18:07:29 +0530 Subject: [PATCH 1/3] Merged conflict --- patches/patch_list.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/patch_list.py b/patches/patch_list.py index 7ff4611e58..c9a4294bfb 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -560,11 +560,11 @@ patch_list = [ }, { 'patch_module': 'patches.december_2012', -<<<<<<< HEAD 'patch_file': 'address_title', -======= + }, + { + 'patch_module': 'patches.december_2012', 'patch_file': 'delete_form16_print_format', ->>>>>>> a85b2e4ee349c544acb7a1949351e9a7c70f7b7c }, { 'patch_module': 'patches.december_2012', From a773e5251bfa74a1f73d8a2abad5acd13ba14943 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 27 Dec 2012 18:10:45 +0530 Subject: [PATCH 2/3] reload address in address title patch --- patches/december_2012/address_title.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/patches/december_2012/address_title.py b/patches/december_2012/address_title.py index 4467d7af20..554d5d4271 100644 --- a/patches/december_2012/address_title.py +++ b/patches/december_2012/address_title.py @@ -1,6 +1,8 @@ import webnotes def execute(): + webnotes.reload_doc("utilities", "doctype", "address") + webnotes.conn.sql("""update tabAddress set address_title = customer_name where ifnull(customer_name,'')!=''""") webnotes.conn.sql("""update tabAddress set address_title = supplier_name where ifnull(supplier_name,'')!=''""") webnotes.conn.sql("""update tabAddress set address_title = sales_partner where ifnull(sales_partner,'')!=''""") From 44c9def74fe47a808baa77d26e5061ee9f5f5ad1 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 27 Dec 2012 18:34:35 +0530 Subject: [PATCH 3/3] if no address, only then have address type as Office --- buying/doctype/supplier/supplier.js | 6 +++++- selling/doctype/customer/customer.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/buying/doctype/supplier/supplier.js b/buying/doctype/supplier/supplier.js index 5b1868313c..3834bda92c 100644 --- a/buying/doctype/supplier/supplier.js +++ b/buying/doctype/supplier/supplier.js @@ -55,7 +55,11 @@ cur_frm.cscript.make_address = function() { address.supplier = cur_frm.doc.name; address.supplier_name = cur_frm.doc.supplier_name; address.address_title = cur_frm.doc.supplier_name; - address.address_type = "Office"; + + if(!(cur_frm.address_list.data && cur_frm.address_list.data.length)) { + address.address_type = "Office"; + } + wn.set_route("Form", "Address", address.name); }, get_query: function() { diff --git a/selling/doctype/customer/customer.js b/selling/doctype/customer/customer.js index 7b5397e587..403b83f582 100644 --- a/selling/doctype/customer/customer.js +++ b/selling/doctype/customer/customer.js @@ -65,7 +65,11 @@ cur_frm.cscript.make_address = function() { address.customer = cur_frm.doc.name; address.customer_name = cur_frm.doc.customer_name; address.address_title = cur_frm.doc.customer_name; - address.address_type = "Office"; + + if(!(cur_frm.address_list.data && cur_frm.address_list.data.length)) { + address.address_type = "Office"; + } + wn.set_route("Form", "Address", address.name); }, get_query: function() {