Merge pull request #26541 from deepeshgarg007/travis_tax_setup

fix: Typo and remove duplicate function
This commit is contained in:
Deepesh Garg 2021-07-19 10:42:58 +05:30 committed by GitHub
commit 354e2984c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,16 +183,6 @@ def make_item_tax_template(company_name, template):
doc.insert(ignore_permissions=True)
return doc
def make_tax_category(tax_category):
""" Make tax category based on title if not already created """
doctype = 'Tax Category'
if not frappe.db.exists(doctype, tax_category['title']):
tax_category['doctype'] = doctype
doc = frappe.get_doc(tax_category)
doc.flags.ignore_links = True
doc.flags.ignore_validate = True
doc.insert(ignore_permissions=True)
def get_or_create_account(company_name, account):
"""
Check if account already exists. If not, create it.
@ -284,7 +274,7 @@ def get_or_create_tax_group(company_name, root_type):
return tax_group_name
def make_tax_catgory(tax_category):
def make_tax_category(tax_category):
doctype = 'Tax Category'
if isinstance(tax_category, str):
tax_category = {'title': tax_category}