[fix] shipping address in purchasee cycle

This commit is contained in:
Nabin Hait
2016-03-16 14:19:22 +05:30
parent 0f063a5f46
commit cd6c09fbee
3 changed files with 252 additions and 244 deletions

View File

@@ -413,7 +413,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Company Address",
"label": "Is Our Company Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -644,7 +644,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-07 20:38:58.214589",
"modified": "2016-03-16 13:01:06.171956",
"modified_by": "Administrator",
"module": "Utilities",
"name": "Address",

View File

@@ -151,8 +151,6 @@ def get_shipping_address(company):
address_as_dict = frappe.db.get_value("Address", filters=filters, fieldname=fieldname, as_dict=True)
if not address_as_dict:
frappe.throw(_("Please add addresses for the company"))
else:
if address_as_dict:
name, address_template = get_address_templates(address_as_dict)
return address_as_dict.get("name"), frappe.render_template(address_template, address_as_dict)