Skip to content

Commit

Permalink
[MIG] l10n_br_account: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi committed May 25, 2024
1 parent 20c4f8b commit 03a450d
Show file tree
Hide file tree
Showing 17 changed files with 819 additions and 582 deletions.
2 changes: 1 addition & 1 deletion l10n_br_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "AGPL-3",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-brazil",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"development_status": "Beta",
"maintainers": ["renatonlima", "rvalyi"],
"depends": [
Expand Down
13 changes: 13 additions & 0 deletions l10n_br_account/models/account_chart_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@
class AccountChartTemplate(models.Model):
_inherit = "account.chart.template"

def _load(self, company):
"""
Avoid to populate account_sale/purchase_tax_id
with tax that cannot be applied in Brazil and confuses the users.
"""
res = super()._load(company)
if self.parent_id and self.parent_id == self.env.ref(
"l10n_br_coa.l10n_br_coa_template"
):
company.account_sale_tax_id = None
company.account_purchase_tax_id = None
return res

def _load_template(
self, company, code_digits=None, account_ref=None, taxes_ref=None
):
Expand Down
378 changes: 203 additions & 175 deletions l10n_br_account/models/account_move.py

Large diffs are not rendered by default.

Loading

0 comments on commit 03a450d

Please sign in to comment.