From 02b0ed41990e7cbd2417e07c82c7dfbf1aeefeba Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 29 Jun 2017 11:43:37 +0530 Subject: [PATCH 1/4] [fix] update-gstin --- .../templates/pages/regional/india/update-gstin.html | 12 ++++++++++-- .../templates/pages/regional/india/update_gstin.py | 12 +++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/erpnext/templates/pages/regional/india/update-gstin.html b/erpnext/templates/pages/regional/india/update-gstin.html index 5c4f7ae8d3..3d9ab5d125 100644 --- a/erpnext/templates/pages/regional/india/update-gstin.html +++ b/erpnext/templates/pages/regional/india/update-gstin.html @@ -5,8 +5,16 @@ {% block header %}

Update GSTIN

{% endblock %} {% block page_content %} -

{{ party.name }}

-{% if invalid_gstin %} +

{{ party_name }}

+{% if not_found %} +

+ Company Not Found +

+

+ If this problem persists, please contact the company. +

+ +{% elif invalid_gstin %}

Invalid GSTIN

diff --git a/erpnext/templates/pages/regional/india/update_gstin.py b/erpnext/templates/pages/regional/india/update_gstin.py index 0d4ec37ef7..9d8d22e42a 100644 --- a/erpnext/templates/pages/regional/india/update_gstin.py +++ b/erpnext/templates/pages/regional/india/update_gstin.py @@ -4,6 +4,7 @@ from frappe import _ def get_context(context): context.no_cache = 1 party = frappe.form_dict.party + context.party_name = party try: update_gstin(context) @@ -11,14 +12,15 @@ def get_context(context): context.invalid_gstin = 1 party_type = 'Customer' - party = frappe.db.get_value('Customer', party) + party_name = frappe.db.get_value('Customer', party) - if not party: + if not party_name: party_type = 'Supplier' - party = frappe.db.get_value('Supplier', party) + party_name = frappe.db.get_value('Supplier', party) - if not party: - frappe.throw(_("Not Found"), frappe.DoesNotExistError) + if not party_name: + context.not_found = 1 + return context.party = frappe.get_doc(party_type, party) context.party.onload() From a938d3956a03d3502ca9066cecdf557f83c75be6 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Thu, 29 Jun 2017 11:58:50 +0530 Subject: [PATCH 2/4] [minor] get doc using party_name instead of party --- erpnext/templates/pages/regional/india/update_gstin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/pages/regional/india/update_gstin.py b/erpnext/templates/pages/regional/india/update_gstin.py index 9d8d22e42a..643aafe83c 100644 --- a/erpnext/templates/pages/regional/india/update_gstin.py +++ b/erpnext/templates/pages/regional/india/update_gstin.py @@ -22,7 +22,7 @@ def get_context(context): context.not_found = 1 return - context.party = frappe.get_doc(party_type, party) + context.party = frappe.get_doc(party_type, party_name) context.party.onload() From 21cf1fd851188afd0a7bdf1b000c75f0b8786d75 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Thu, 29 Jun 2017 12:04:45 +0530 Subject: [PATCH 3/4] [fix] translate domain --- erpnext/setup/setup_wizard/setup_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py index 47e64d76a3..5c7697ef97 100644 --- a/erpnext/setup/setup_wizard/setup_wizard.py +++ b/erpnext/setup/setup_wizard/setup_wizard.py @@ -196,7 +196,7 @@ def set_defaults(args): hr_settings.save() domain_settings = frappe.get_doc("Domain Settings") - domain_settings.append('active_domains', dict(domain=args.domain)) + domain_settings.append('active_domains', dict(domain=_(args.domain))) domain_settings.save() def create_feed_and_todo(): From 71b4e48ea5ef3839fa8141e4ef801e8252455930 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Thu, 29 Jun 2017 12:39:39 +0600 Subject: [PATCH 4/4] bumped to version 8.1.7 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 3448dbcf01..8c387dd887 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '8.1.6' +__version__ = '8.1.7' def get_default_company(user=None):