From 2b34028acd38b340f662211381af2f1f6a13ad1f Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 2 Sep 2021 22:01:24 +0530 Subject: [PATCH] fix: Patch and linting errors --- erpnext/patches/v13_0/create_gst_payment_entry_fields.py | 2 ++ erpnext/regional/india/setup.py | 4 ++-- erpnext/regional/report/gstr_1/gstr_1.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v13_0/create_gst_payment_entry_fields.py b/erpnext/patches/v13_0/create_gst_payment_entry_fields.py index 1ae06bed3b..3867d24f26 100644 --- a/erpnext/patches/v13_0/create_gst_payment_entry_fields.py +++ b/erpnext/patches/v13_0/create_gst_payment_entry_fields.py @@ -4,6 +4,8 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_fields def execute(): + frappe.reload_doc('accounts', 'doctype', 'payment_entry') + custom_fields = { 'Payment Entry': [ dict(fieldname='gst_section', label='GST Details', fieldtype='Section Break', insert_after='deductions', diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index 27d5f7341e..963c4075cd 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -123,8 +123,8 @@ def add_print_formats(): def make_property_setters(patch=False): # GST rules do not allow for an invoice no. bigger than 16 characters journal_entry_types = frappe.get_meta("Journal Entry").get_options("voucher_type").split("\n") + ['Reversal Of ITC'] - sales_invoice_series = frappe.get_meta("Sales Invoice").get_options("naming_series").split("\n") + ['SINV-.YY.-', 'SRET-.YY.-', ''] - purchase_invoice_series = frappe.get_meta("Purchase Invoice").get_options("naming_series").split("\n") + ['PINV-.YY.-', 'PRET-.YY.-', ''] + sales_invoice_series = ['SINV-.YY.-', 'SRET-.YY.-', ''] + frappe.get_meta("Sales Invoice").get_options("naming_series").split("\n") + purchase_invoice_series = ['PINV-.YY.-', 'PRET-.YY.-', ''] + frappe.get_meta("Purchase Invoice").get_options("naming_series").split("\n") if not patch: make_property_setter('Sales Invoice', 'naming_series', 'options', '\n'.join(sales_invoice_series), '') diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 61443f1dc6..e3e09ef8e5 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -78,7 +78,7 @@ class Gstr1Report(object): self.data.append(row) def get_advance_data(self): - Advances_data = {} + advances_data = {} advances = self.get_advance_entries() for entry in advances: # only consider IGST and SGST so as to avoid duplication of taxable amount