fix: Clear messages during setup fixtures

This commit is contained in:
Faris Ansari 2019-05-14 16:21:09 +05:30
parent 621cdeb36a
commit ec7b064528
2 changed files with 8 additions and 3 deletions

View File

@ -362,9 +362,9 @@ def make_fixtures(company=None):
doc.flags.ignore_permissions = True
doc.insert()
except frappe.NameError:
pass
frappe.clear_messages()
except frappe.DuplicateEntryError:
pass
frappe.clear_messages()
# create records for Tax Withholding Category
set_tax_withholding_category(company)

View File

@ -363,7 +363,12 @@ def add_sale_stages():
def install_company(args):
records = [
# Fiscal Year
{ "doctype": "Fiscal Year", 'year': get_fy_details(args.fy_start_date, args.fy_end_date), 'year_start_date': args.fy_start_date, 'year_end_date': args.fy_end_date },
{
'doctype': "Fiscal Year",
'year': get_fy_details(args.fy_start_date, args.fy_end_date),
'year_start_date': args.fy_start_date,
'year_end_date': args.fy_end_date
},
# Company
{