From 5a72d2b1b9131f0b14e1cc67f3fdb79da0e5851b Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 17 Jul 2019 09:46:39 +0200 Subject: [PATCH] Improvement for incoterm --- account_usability/account.py | 11 +++++++++++ account_usability/account_view.xml | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/account_usability/account.py b/account_usability/account.py index 6d17a11..6fe2012 100644 --- a/account_usability/account.py +++ b/account_usability/account.py @@ -626,3 +626,14 @@ class AccountReconcileModel(models.Model): # Because it's much better to have the bank statement line label as # label of the counter-part move line, then the label of the button assert True # Stupid line of code just to have something... + + +class AccountIncoterms(models.Model): + _inherit = 'account.incoterms' + + @api.depends('code', 'name') + def name_get(self): + res = [] + for rec in self: + res.append((rec.id, '[%s] %s' % (rec.code, rec.name))) + return res diff --git a/account_usability/account_view.xml b/account_usability/account_view.xml index 5b0f5c0..439ee39 100644 --- a/account_usability/account_view.xml +++ b/account_usability/account_view.xml @@ -16,6 +16,9 @@ selection + + selection +