Merge pull request #28656 from nemesis189/taxjar-nexus-display-condition

fix: Taxjar Nexus list visible only if child table is visible
This commit is contained in:
Deepesh Garg 2021-12-06 11:44:11 +05:30 committed by GitHub
commit c56a450474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 14 deletions

View File

@ -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",

View File

@ -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')