fix(setup): Create regional taxes on creation on company
This commit is contained in:
parent
49b41e49ae
commit
2a1aedfff1
@ -94,6 +94,9 @@ class Company(NestedSet):
|
||||
|
||||
if frappe.flags.country_change:
|
||||
install_country_fixtures(self.name)
|
||||
self.create_default_tax_template()
|
||||
|
||||
|
||||
|
||||
if not frappe.db.get_value("Department", {"company": self.name}):
|
||||
from erpnext.setup.setup_wizard.operations.install_fixtures import install_post_company_fixtures
|
||||
|
@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
from .operations import install_fixtures as fixtures, company_setup, taxes_setup, sample_data
|
||||
from .operations import install_fixtures as fixtures, company_setup, sample_data
|
||||
|
||||
def get_setup_stages(args=None):
|
||||
if frappe.db.sql("select name from tabCompany"):
|
||||
@ -37,18 +37,13 @@ def get_setup_stages(args=None):
|
||||
]
|
||||
},
|
||||
{
|
||||
'status': _('Setting up company and taxes'),
|
||||
'status': _('Setting up company'),
|
||||
'fail_msg': _('Failed to setup company'),
|
||||
'tasks': [
|
||||
{
|
||||
'fn': setup_company,
|
||||
'args': args,
|
||||
'fail_msg': _("Failed to setup company")
|
||||
},
|
||||
{
|
||||
'fn': setup_taxes,
|
||||
'args': args,
|
||||
'fail_msg': _("Failed to setup taxes")
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -94,9 +89,6 @@ def stage_fixtures(args):
|
||||
def setup_company(args):
|
||||
fixtures.install_company(args)
|
||||
|
||||
def setup_taxes(args):
|
||||
taxes_setup.create_sales_tax(args)
|
||||
|
||||
def setup_post_company_fixtures(args):
|
||||
fixtures.install_post_company_fixtures(args)
|
||||
|
||||
@ -132,7 +124,6 @@ def login_as_first_user(args):
|
||||
def setup_complete(args=None):
|
||||
stage_fixtures(args)
|
||||
setup_company(args)
|
||||
setup_taxes(args)
|
||||
setup_post_company_fixtures(args)
|
||||
setup_defaults(args)
|
||||
stage_four(args)
|
||||
|
Loading…
Reference in New Issue
Block a user