fix: autoname for Item Tax Template

* fix: autoname for Item Tax Template

Use title + company abbreviation instead of just title.

* fix: test records of Item Tax Template

* fix: rename item tax templates in test records

* Revert "fix: test records of Item Tax Template"

This reverts commit 53875c54ff.

* fix: rename hardcoded item tax templates in tests

* fix: rename hardcoded Item Tax Templates in tests

(2)

* fix: delete Item Tax Template with company
This commit is contained in:
Raffael Meyer
2021-03-10 05:54:43 +01:00
committed by GitHub
parent 6ccd64c2ec
commit 20cc2bb0d8
12 changed files with 53 additions and 44 deletions

View File

@@ -390,8 +390,10 @@ class Company(NestedSet):
frappe.db.sql("delete from tabDepartment where company=%s", self.name)
frappe.db.sql("delete from `tabTax Withholding Account` where company=%s", self.name)
# delete tax templates
frappe.db.sql("delete from `tabSales Taxes and Charges Template` where company=%s", self.name)
frappe.db.sql("delete from `tabPurchase Taxes and Charges Template` where company=%s", self.name)
frappe.db.sql("delete from `tabItem Tax Template` where company=%s", self.name)
@frappe.whitelist()
def enqueue_replace_abbr(company, old, new):

View File

@@ -79,13 +79,13 @@
{
"doctype": "Item Tax",
"parentfield": "taxes",
"item_tax_template": "_Test Account Excise Duty @ 10",
"item_tax_template": "_Test Account Excise Duty @ 10 - _TC",
"tax_category": ""
},
{
"doctype": "Item Tax",
"parentfield": "taxes",
"item_tax_template": "_Test Account Excise Duty @ 12",
"item_tax_template": "_Test Account Excise Duty @ 12 - _TC",
"tax_category": "_Test Tax Category 1"
}
]
@@ -99,7 +99,7 @@
{
"doctype": "Item Tax",
"parentfield": "taxes",
"item_tax_template": "_Test Account Excise Duty @ 15",
"item_tax_template": "_Test Account Excise Duty @ 15 - _TC",
"tax_category": ""
}
]