From 527a2f71e6f59bdcef01f0a6c2c04d3a660c60de Mon Sep 17 00:00:00 2001 From: Aditya Duggal Date: Wed, 1 Jul 2020 13:54:48 +0530 Subject: [PATCH] Quotations would only check for Gmaps address if present --- rigpl_erpnext/rigpl_erpnext/validations/quotation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rigpl_erpnext/rigpl_erpnext/validations/quotation.py b/rigpl_erpnext/rigpl_erpnext/validations/quotation.py index e0d1404a..8efb7a2a 100644 --- a/rigpl_erpnext/rigpl_erpnext/validations/quotation.py +++ b/rigpl_erpnext/rigpl_erpnext/validations/quotation.py @@ -7,8 +7,10 @@ def validate(doc, method): - validate_address_google_update(doc.customer_address) - validate_address_google_update(doc.shipping_address_name) + if doc.customer_address: + validate_address_google_update(doc.customer_address) + if doc.shipping_address_name: + validate_address_google_update(doc.shipping_address_name) if doc.quotation_to == 'Customer': check_dynamic_link(parenttype="Address", parent=doc.customer_address, link_doctype="Customer", link_name=doc.party_name)