From 0963fceede32b6a5fd273283e21393cbaf03c091 Mon Sep 17 00:00:00 2001 From: Subin Tom Date: Tue, 30 Nov 2021 22:05:29 +0530 Subject: [PATCH 1/2] fix: Taxjar Nexus list visible only if child table is visible --- .../taxjar_settings/taxjar_settings.json | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json index 23ccb7e4dac..ae1f36e73fa 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json @@ -20,7 +20,6 @@ "configuration_cb", "shipping_account_head", "section_break_12", - "nexus_address", "nexus" ], "fields": [ @@ -87,15 +86,11 @@ "fieldtype": "Column Break" }, { + "depends_on": "nexus", "fieldname": "section_break_12", "fieldtype": "Section Break", "label": "Nexus List" }, - { - "fieldname": "nexus_address", - "fieldtype": "HTML", - "label": "Nexus Address" - }, { "fieldname": "nexus", "fieldtype": "Table", @@ -107,20 +102,21 @@ "fieldname": "configuration_cb", "fieldtype": "Column Break" }, - { - "fieldname": "column_break_10", - "fieldtype": "Column Break" - }, { "fieldname": "company", "fieldtype": "Link", "label": "Company", "options": "Company" + }, + { + "fieldname": "column_break_10", + "fieldtype": "Column Break" } ], "issingle": 1, "links": [], - "modified": "2021-11-08 18:02:29.232090", + "migration_hash": "8ca1ea3309ed28547b19da8e6e27e96f", + "modified": "2021-11-30 11:17:24.647979", "modified_by": "Administrator", "module": "ERPNext Integrations", "name": "TaxJar Settings", From ecc5de6159723bc0845bf67387d566ce43047d18 Mon Sep 17 00:00:00 2001 From: Subin Tom Date: Wed, 1 Dec 2021 11:54:59 +0530 Subject: [PATCH 2/2] fix: removing db call for variables --- .../doctype/taxjar_settings/taxjar_settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py index b9f24b65b38..d4bbe881d0c 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py @@ -16,9 +16,9 @@ from erpnext.erpnext_integrations.taxjar_integration import get_client class TaxJarSettings(Document): def on_update(self): - TAXJAR_CREATE_TRANSACTIONS = frappe.db.get_single_value("TaxJar Settings", "taxjar_create_transactions") - TAXJAR_CALCULATE_TAX = frappe.db.get_single_value("TaxJar Settings", "taxjar_calculate_tax") - TAXJAR_SANDBOX_MODE = frappe.db.get_single_value("TaxJar Settings", "is_sandbox") + TAXJAR_CREATE_TRANSACTIONS = self.taxjar_create_transactions + TAXJAR_CALCULATE_TAX = self.taxjar_calculate_tax + TAXJAR_SANDBOX_MODE = self.is_sandbox fields_already_exist = frappe.db.exists('Custom Field', {'dt': ('in', ['Item','Sales Invoice Item']), 'fieldname':'product_tax_category'}) fields_hidden = frappe.get_value('Custom Field', {'dt': ('in', ['Sales Invoice Item'])}, 'hidden')