From cc034a89835cfcadf903dd5e9f188576f1d75d93 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 13 Mar 2017 22:44:48 +0530 Subject: [PATCH] [fix] Value assignment issue for country in the pos profile --- erpnext/accounts/doctype/sales_invoice/pos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index cfbd1b20872..471263fd9cb 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -63,8 +63,8 @@ def get_company_data(company): def update_pos_profile_data(doc, pos_profile, company_data): doc.campaign = pos_profile.get('campaign') - if not pos_profile.get('country'): - pos_profile["country"] = company_data.country + if pos_profile and not pos_profile.get('country'): + pos_profile.country = company_data.country doc.write_off_account = pos_profile.get('write_off_account') or \ company_data.write_off_account