From d22705b9561e79f5901b5e2becb94dfcaeaa241e Mon Sep 17 00:00:00 2001 From: clesgow Date: Thu, 20 Apr 2023 11:11:36 +0000 Subject: [PATCH] [IMP] account: display code and name on Incoterms Display incoterm names the same way we display products with their `internal_reference`. Part of task-3218314 Part-of: odoo/odoo#119381 --- addons/account/models/account_incoterms.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/account/models/account_incoterms.py b/addons/account/models/account_incoterms.py index a8015b106e4..905ae7377e7 100644 --- a/addons/account/models/account_incoterms.py +++ b/addons/account/models/account_incoterms.py @@ -17,3 +17,7 @@ class AccountIncoterms(models.Model): active = fields.Boolean( 'Active', default=True, help="By unchecking the active field, you may hide an INCOTERM you will not use.") + + def name_get(self): + return [(incoterm.id, '%s%s' % (incoterm.code and '[%s] ' % incoterm.code or '', incoterm.name)) + for incoterm in self]