From a0783de23253de6fa0509d77b94810d77b23144a Mon Sep 17 00:00:00 2001 From: Saqib Date: Thu, 22 Apr 2021 14:31:46 +0530 Subject: [PATCH 1/4] fix: remove invalid changes added due to merge conflict (#25405) * fix: merge conflict * fix: recover lost method --- erpnext/regional/india/e_invoice/utils.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index 7637d2d4583..c9f0b0b2592 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -139,10 +139,6 @@ def get_party_details(address_name, is_shipping_address=False): address_line1=sanitize_for_json(addr.address_line1), address_line2=sanitize_for_json(addr.address_line2) )) - if d.gstin: - party_address_details.gstin = d.gstin - - return party_address_details return party_address_details @@ -427,7 +423,7 @@ def make_einvoice(invoice): item_list = get_item_list(invoice) doc_details = get_doc_details(invoice) invoice_value_details = get_invoice_value_details(invoice) - seller_details = get_party_details(invoice.company_address, company_address=1) + seller_details = get_party_details(invoice.company_address) if invoice.gst_category == 'Overseas': buyer_details = get_overseas_address_details(invoice.customer_address) @@ -448,7 +444,7 @@ def make_einvoice(invoice): if invoice.gst_category == 'Overseas': shipping_details = get_overseas_address_details(invoice.shipping_address_name) else: - shipping_details = get_party_details(invoice.shipping_address_name, shipping_address=True) + shipping_details = get_party_details(invoice.shipping_address_name, is_shipping_address=True) if invoice.is_pos and invoice.base_paid_amount: payment_details = get_payment_details(invoice) @@ -550,6 +546,13 @@ def safe_json_load(json_string): snippet = json_string[start:end] frappe.throw(_("Error in input data. Please check for any special characters near following input:
{}").format(snippet)) +def throw_error_list(errors, title): + if len(errors) > 1: + li = ['
  • '+ d +'
  • ' for d in errors] + frappe.throw("".format(''.join(li)), title=title) + else: + frappe.throw(errors[0], title=title) + class RequestFailed(Exception): pass class GSPConnector(): @@ -576,7 +579,7 @@ class GSPConnector(): gstin = self.get_seller_gstin() credentials_for_gstin = [d for d in self.e_invoice_settings.credentials if d.gstin == gstin] if credentials_for_gstin: - self.credentials = credentials_for_gstin[0] + credentials = credentials_for_gstin[0] else: frappe.throw(_('Cannot find e-invoicing credentials for selected Company GSTIN. Please check E-Invoice Settings')) else: From 96c099c6090eafc08b2954056111d2540a65eed2 Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 26 Apr 2021 15:40:29 +0530 Subject: [PATCH 2/4] fix: remove invalid changes added due to merge conflicts (#25404) * fix: merge conflicts * fix: merge conflict * fix: recover lost method --- erpnext/regional/india/e_invoice/utils.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index 7637d2d4583..c9f0b0b2592 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -139,10 +139,6 @@ def get_party_details(address_name, is_shipping_address=False): address_line1=sanitize_for_json(addr.address_line1), address_line2=sanitize_for_json(addr.address_line2) )) - if d.gstin: - party_address_details.gstin = d.gstin - - return party_address_details return party_address_details @@ -427,7 +423,7 @@ def make_einvoice(invoice): item_list = get_item_list(invoice) doc_details = get_doc_details(invoice) invoice_value_details = get_invoice_value_details(invoice) - seller_details = get_party_details(invoice.company_address, company_address=1) + seller_details = get_party_details(invoice.company_address) if invoice.gst_category == 'Overseas': buyer_details = get_overseas_address_details(invoice.customer_address) @@ -448,7 +444,7 @@ def make_einvoice(invoice): if invoice.gst_category == 'Overseas': shipping_details = get_overseas_address_details(invoice.shipping_address_name) else: - shipping_details = get_party_details(invoice.shipping_address_name, shipping_address=True) + shipping_details = get_party_details(invoice.shipping_address_name, is_shipping_address=True) if invoice.is_pos and invoice.base_paid_amount: payment_details = get_payment_details(invoice) @@ -550,6 +546,13 @@ def safe_json_load(json_string): snippet = json_string[start:end] frappe.throw(_("Error in input data. Please check for any special characters near following input:
    {}").format(snippet)) +def throw_error_list(errors, title): + if len(errors) > 1: + li = ['
  • '+ d +'
  • ' for d in errors] + frappe.throw("".format(''.join(li)), title=title) + else: + frappe.throw(errors[0], title=title) + class RequestFailed(Exception): pass class GSPConnector(): @@ -576,7 +579,7 @@ class GSPConnector(): gstin = self.get_seller_gstin() credentials_for_gstin = [d for d in self.e_invoice_settings.credentials if d.gstin == gstin] if credentials_for_gstin: - self.credentials = credentials_for_gstin[0] + credentials = credentials_for_gstin[0] else: frappe.throw(_('Cannot find e-invoicing credentials for selected Company GSTIN. Please check E-Invoice Settings')) else: From 4d9c9db295ea780f3c3dea1bcb806c426a6716dc Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 20 May 2021 18:49:42 +0530 Subject: [PATCH 3/4] chore: Added change log for v12.21.0 --- erpnext/change_log/v12/v12_21_0.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 erpnext/change_log/v12/v12_21_0.md diff --git a/erpnext/change_log/v12/v12_21_0.md b/erpnext/change_log/v12/v12_21_0.md new file mode 100644 index 00000000000..946bf09d9e4 --- /dev/null +++ b/erpnext/change_log/v12/v12_21_0.md @@ -0,0 +1,21 @@ +## Version 12.21.0 Release Notes + + +### Fixes & Enhancements + +- Incorrect qty calculated for sub-contracted raw materials in purchase receipt ([#25443](https://github.com/frappe/erpnext/pull/25443)) +- Update cost center in the item table fetched from POS Profile in v12 ([#25612](https://github.com/frappe/erpnext/pull/25612)) +- Total stock summary report not working ([#25552](https://github.com/frappe/erpnext/pull/25552)) +- Timeout error while loading warehouse tree ([#25693](https://github.com/frappe/erpnext/pull/25693)) +- RCM rounding precision ([#25410](https://github.com/frappe/erpnext/pull/25410)) +- Change subcontracted item display ([#25426](https://github.com/frappe/erpnext/pull/25426)) +- Remove invalid changes added due to merge conflict ([#25437](https://github.com/frappe/erpnext/pull/25437)) +- Add document type field for e-invoicing (Italy) ([#25420](https://github.com/frappe/erpnext/pull/25420)) +- Issue in project custom status ([#25453](https://github.com/frappe/erpnext/pull/25453)) +- Employee Separation ([#25504](https://github.com/frappe/erpnext/pull/25504)) +- State code for Other Territory ([#25422](https://github.com/frappe/erpnext/pull/25422)) +- Remove invalid changes added due to merge conflict ([#25405](https://github.com/frappe/erpnext/pull/25405)) +- Check for None in item.schedule_date before setting ([#25589](https://github.com/frappe/erpnext/pull/25589)) +- Can't multiply sequence by non-int of type 'float' ([#25385](https://github.com/frappe/erpnext/pull/25385)) +- Filter using purpose, make requested changes ([#25388](https://github.com/frappe/erpnext/pull/25388)) +- Purchase from registered composition dealer ([#25419](https://github.com/frappe/erpnext/pull/25419)) \ No newline at end of file From 65b7b57c70a7e429098711e8803bb000529a2ed8 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 20 May 2021 19:11:42 +0550 Subject: [PATCH 4/4] bumped to version 12.21.0 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 566dd158a67..1fdf73a0595 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '12.20.0' +__version__ = '12.21.0' def get_default_company(user=None): '''Get default company for user'''