[MIG] account_tax_balance: Migration to 18.0

This commit is contained in:
Borruso
2024-12-06 15:05:48 +01:00
parent c0bcd49525
commit 431f564398
6 changed files with 23 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
# Copyright 2016 Lorenzo Battistini - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo import api, fields, models
class WizardOpenTaxBalances(models.TransientModel):
@@ -64,12 +64,14 @@ class WizardOpenTaxBalances(models.TransientModel):
date_format = lang and lang.date_format or "%m/%d/%Y"
infos = {
"name": vals["name"],
"target": _(self.target_move),
"target": self.env._(self.target_move),
"from": self.from_date.strftime(date_format),
"to": self.to_date.strftime(date_format),
}
# name of action which is displayed in breacrumb
vals["name"] = _("%(name)s: %(target)s from %(from)s to %(to)s") % infos
vals["name"] = (
self.env._("%(name)s: %(target)s from %(from)s to %(to)s") % infos
)
multi_cpny_grp = self.env.ref("base.group_multi_company")
if multi_cpny_grp in self.env.user.groups_id:
company_names = self.company_ids.mapped("name")