summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorqdp-odoo <qdp@odoo.com>2017-11-10 12:27:26 +0100
committerqdp-odoo <qdp@odoo.com>2017-11-10 12:47:18 +0100
commitd86da5de53ab8ffc089b7d86a920e536bd65dff9 (patch)
tree4e18372eb54e45eda95281555cdc1eae67bdd033 /addons
parent27128f26189d9a2794bfaf8e5d8081a3e3d5e9d7 (diff)
[FIX] account: set default tax upon installation of a localization
(defined as the one with the lowest sequence in the chart template)
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/chart_template.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py
index 3712109a435..4b3ecc74458 100644
--- a/addons/account/models/chart_template.py
+++ b/addons/account/models/chart_template.py
@@ -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