Merge branch 'master' into develop

This commit is contained in:
Sagar Vora 2019-02-20 12:11:25 +05:30
commit eba76c99a3
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '11.1.7'
__version__ = '11.1.8'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -219,7 +219,7 @@ doc_events = {
"on_trash": "erpnext.regional.check_deletion_permission"
},
'Address': {
'validate': ['erpnext.regional.india.utils.validate_gstin_for_india', 'erpnext.regional.italy.utils.validate_address']
'validate': ['erpnext.regional.india.utils.validate_gstin_for_india', 'erpnext.regional.italy.utils.set_state_code']
},
('Sales Invoice', 'Purchase Invoice', 'Delivery Note'): {
'validate': 'erpnext.regional.india.utils.set_place_of_supply'

View File

@ -285,7 +285,7 @@ def get_progressive_name_and_number(doc):
return progressive_name, progressive_number
def validate_address(doc, method):
def set_state_code(doc, method):
if not (hasattr(doc, "state_code") and doc.country in ["Italy", "Italia", "Italian Republic", "Repubblica Italiana"]):
return