-
-
Notifications
You must be signed in to change notification settings - Fork 768
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] account_chart_update: Finish migration
Changes done: - Purge translations - Squash administrative commits - Change name_get to _compute_display_name - Change attrs to invisible/required - Adapt to the new account.chart.template system without records - Remove recreate_xml_ids fields (It is always necessary for them to have the expected xml_id) TT49275
- Loading branch information
1 parent
40f7fed
commit ae497db
Showing
13 changed files
with
599 additions
and
1,690 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,7 @@ Contributors | |
|
||
- Pedro M. Baeza | ||
- Ernesto Tejeda | ||
- Víctor Martínez | ||
|
||
- Jacques-Etienne Baudoux <[email protected]> | ||
- Sylvain Van Hoof <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
# Copyright 2018 Tecnativa - Pedro M. Baeza | ||
# Copyright 2024 Tecnativa - Víctor Martínez | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models | ||
from odoo import api, models | ||
|
||
|
||
class IrModelFields(models.Model): | ||
_inherit = "ir.model.fields" | ||
|
||
def name_get(self): | ||
@api.depends_context("account_chart_update") | ||
def _compute_display_name(self): | ||
"""Return special label when showing fields in chart update wizard.""" | ||
res = super()._compute_display_name() | ||
if self.env.context.get("account_chart_update"): | ||
res = [] | ||
for record in self: | ||
res.append((record.id, f"{record.field_description} ({record.name})")) | ||
return res | ||
return super().name_get() | ||
record.display_name = f"{record.field_description} ({record.name})" | ||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
- [Tecnativa](https://www.tecnativa.com): | ||
- Pedro M. Baeza | ||
- Ernesto Tejeda | ||
- Víctor Martínez | ||
- Jacques-Etienne Baudoux \<<[email protected]>\> | ||
- Sylvain Van Hoof \<<[email protected]>\> | ||
- Nacho Muñoz \<<[email protected]>\> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.