[FIX] account: set default tax upon installation of a localization

(defined as the one with the lowest sequence in the chart template)
This commit is contained in:
qdp-odoo
2017-11-10 12:47:18 +01:00
parent 27128f2618
commit d86da5de53
+4
View File
@@ -914,6 +914,10 @@ class WizardMultiChartsAccounts(models.TransientModel):
# Create the current year earning account if it wasn't present in the CoA
company.get_unaffected_earnings_account()
# set the default taxes on the company
company.account_sale_tax_id = self.env['account.tax'].search([('type_tax_use', 'in', ('sale', 'all')), ('company_id', '=', company.id)], limit=1).id
company.account_purchase_tax_id = self.env['account.tax'].search([('type_tax_use', 'in', ('purchase', 'all')), ('company_id', '=', company.id)], limit=1).id
return {}
@api.multi