[FIX] analytic: fixed name_get of analytic account model
Currently, In account.analytic.account model due to the extra space in name field string formatting. which generates the issue while searching on accounts. This commit fixes this issue by removing extra space and seperator. closes odoo/odoo#105391 X-original-commit: bff34e0e8a8b2d211ef90ffea4f43c514e8cad28 Related: odoo/enterprise#33781 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
@@ -117,9 +117,9 @@ class AccountAnalyticAccount(models.Model):
|
||||
for analytic in self:
|
||||
name = analytic.name
|
||||
if analytic.code:
|
||||
name = f'[{analytic.code}]{name}'
|
||||
name = f'[{analytic.code}] {name}'
|
||||
if analytic.partner_id.commercial_partner_id.name:
|
||||
name = f'{name} - {analytic.partner_id.commercial_partner_id.name} - '
|
||||
name = f'{name} - {analytic.partner_id.commercial_partner_id.name}'
|
||||
res.append((analytic.id, name))
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user