[16.0] IMP display currency for partner bank account

This commit is contained in:
Mourad
2024-05-06 11:35:38 +02:00
committed by David Beal
parent 4ee69f3bff
commit 252da11a30
4 changed files with 44 additions and 1 deletions

View File

@@ -9,3 +9,4 @@ from . import res_partner
from . import res_company
#from . import product
from . import account_invoice_report
from . import res_partner_bank

View File

@@ -0,0 +1,21 @@
# Copyright 2015-2022 Akretion France (http://www.akretion.com/)
# @author: Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class ResPartnerBank(models.Model):
_inherit = 'res.partner.bank'
def name_get(self):
res = []
for acc in self:
name = acc.acc_number
if acc.currency_id:
name = "%s (%s)" % (name, acc.currency_id.name)
if acc.bank_id.name:
name = "%s - %s" % (name, acc.bank_id.name)
res += [(acc.id, name)]
return res