What is this translated_display_name field? I can't find it in Odoo's source code, in any custom modules, or even in the res_partner database table. Yet, it appears in the XML tree view of the res.partner model. I am currently using Odoo 16 Community Edition (CM).
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
2
Replies
845
Views
translated_display_name = fields.Char(compute='_compute_translated_display_name')
@api.depends_context('lang')
@api.depends('display_name')
def _compute_translated_display_name(self):
names = dict(self.with_context(lang=self.env.lang).name_get())
for partner in self:
partner.translated_display_name = names.get(partner.id)
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Jul 24
|
983 | ||
|
1
Jun 24
|
2343 | ||
|
2
Nov 24
|
1448 | ||
|
1
Jul 24
|
1450 | ||
|
0
Jun 24
|
1327 |