Skip to content

Commit

Permalink
[MIG] account_chart_update: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dreispt authored and victoralmau committed Dec 19, 2024
1 parent 74936d8 commit 04d4dc1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
2 changes: 2 additions & 0 deletions account_chart_update/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ Contributors

- Luis J. Salvatierra

- Daniel Reis ([email protected])

Maintainers
-----------

Expand Down
2 changes: 1 addition & 1 deletion account_chart_update/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"name": "Detect changes and update the Account Chart from a template",
"summary": "Wizard to update a company's account chart from a template",
"version": "16.0.2.0.6",
"version": "17.0.1.0.0",
"author": "Tecnativa, BCIM, Okia, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-tools",
"depends": ["account"],
Expand Down
2 changes: 1 addition & 1 deletion account_chart_update/models/ir_model_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def name_get(self):
for record in self:
res.append((record.id, f"{record.field_description} ({record.name})"))
return res
return super(IrModelFields, self).name_get()
return super().name_get()
1 change: 1 addition & 0 deletions account_chart_update/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
- Jairo Llopis (<https://www.moduon.team/>)
- [Factor Libre](https://factorlibre.com):
- Luis J. Salvatierra
- Daniel Reis ([email protected])
1 change: 1 addition & 0 deletions account_chart_update/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<li>Luis J. Salvatierra</li>
</ul>
</li>
<li>Daniel Reis (<a class="reference external" href="mailto:dreis&#64;opensourceintegrators.com">dreis&#64;opensourceintegrators.com</a>)</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
11 changes: 7 additions & 4 deletions account_chart_update/wizard/wizard_chart_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,10 @@ def find_repartition_by_templates(
tags += tpl.tag_ids
existing = self.env["account.tax.repartition.line"]
existing_candidates = current_repartition.filtered(
lambda r: r.factor_percent == factor_percent
lambda r,
factor_percent,
repartition_type,
existing_ids: r.factor_percent == factor_percent
and r.repartition_type == repartition_type
and r.id not in existing_ids
)
Expand Down Expand Up @@ -1524,7 +1527,7 @@ class WizardTaxMatching(models.TransientModel):
_inherit = "wizard.matching"

def _get_matching_selection(self):
vals = super(WizardTaxMatching, self)._get_matching_selection()
vals = super()._get_matching_selection()
vals += self._selection_from_files(
"account.tax.template", ["description", "name"]
)
Expand All @@ -1537,7 +1540,7 @@ class WizardAccountMatching(models.TransientModel):
_inherit = "wizard.matching"

def _get_matching_selection(self):
vals = super(WizardAccountMatching, self)._get_matching_selection()
vals = super()._get_matching_selection()
vals += self._selection_from_files("account.account.template", ["code", "name"])
return vals

Expand All @@ -1548,7 +1551,7 @@ class WizardFpMatching(models.TransientModel):
_inherit = "wizard.matching"

def _get_matching_selection(self):
vals = super(WizardFpMatching, self)._get_matching_selection()
vals = super()._get_matching_selection()
vals += self._selection_from_files("account.fiscal.position.template", ["name"])
return vals

Expand Down

0 comments on commit 04d4dc1

Please sign in to comment.