fix: Issues on new company setup

This commit is contained in:
Deepesh Garg 2021-04-21 20:42:20 +05:30
parent e166c264b4
commit a90e5fd2e1
2 changed files with 3 additions and 3 deletions

View File

@ -731,12 +731,12 @@ def set_tax_withholding_category(company):
docs = get_tds_details(accounts, fiscal_year)
for d in docs:
try:
if not frappe.db.exists("Tax Withholding Category", d.get("name")):
doc = frappe.get_doc(d)
doc.flags.ignore_permissions = True
doc.flags.ignore_mandatory = True
doc.insert()
except frappe.DuplicateEntryError:
else:
doc = frappe.get_doc("Tax Withholding Category", d.get("name"))
if accounts:

View File

@ -11,7 +11,7 @@
"is_standard": "Yes",
"json": "{}",
"letter_head": "Logo",
"modified": "2021-03-12 12:36:48.689413",
"modified": "2021-03-13 12:36:48.689413",
"modified_by": "Administrator",
"module": "Regional",
"name": "E-Invoice Summary",