Skip to content

Commit

Permalink
[MIG] account_multicompany_code: Migration to 17.0
Browse files Browse the repository at this point in the history
- Adapt the use of name_get as part of [1].

[1] odoo/odoo#122085
  • Loading branch information
xmglord committed Apr 4, 2024
1 parent a8a1ea5 commit bcc5b68
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion account_multicompany_code/__manifest__.py
@@ -1,6 +1,6 @@
{
"name": "Account Multicompany Code",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"author": "Vauxoo",
"category": "Accounting/Accounting",
"website": "https://www.vauxoo.com/",
Expand Down
10 changes: 5 additions & 5 deletions account_multicompany_code/models/account_account.py
@@ -1,12 +1,12 @@
from odoo import models
from odoo import api, models


class AccountAccount(models.Model):
_inherit = "account.account"

def name_get(self):
result = dict(super().name_get())
@api.depends("company_id.code")
def _compute_display_name(self):
super()._compute_display_name()
for record in self:
if record.company_id.code:
result[record.id] += " (%s)" % record.company_id.code
return list(result.items())
record.display_name += " (%s)" % record.company_id.code
10 changes: 5 additions & 5 deletions account_multicompany_code/models/account_journal.py
@@ -1,12 +1,12 @@
from odoo import models
from odoo import api, models


class AccountJournal(models.Model):
_inherit = "account.journal"

def name_get(self):
result = dict(super().name_get())
@api.depends("company_id.code")
def _compute_display_name(self):
super()._compute_display_name()
for record in self:
if record.company_id.code:
result[record.id] += " (%s)" % record.company_id.code
return list(result.items())
record.display_name += " (%s)" % record.company_id.code
2 changes: 1 addition & 1 deletion variables.sh
Expand Up @@ -4,7 +4,7 @@ export PSQL_VERSION="14"
export VERSION="17.0"
export ODOO_REPO="vauxoo/odoo"
export ODOO_BRANCH="17.0"
export MAIN_APP="account_multicompany_code"
export MAIN_APP="stock_by_warehouse"
export TRAVIS_PYTHON_VERSION="3.10"
export TRAVIS_REPO_SLUG="Vauxoo/"
export COUNTRY="MX"
Expand Down

0 comments on commit bcc5b68

Please sign in to comment.