I have a python code where I want to translate a field name and a model name, which are stored in another record, to the display string for the current user language.
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
8870
Views
My solution in slightly different situation:
self.env['ir.translation'].get_field_string(self._name)['field_name']
I found a solution:
self.env['ir.translation'].get_field_string(record.ref_class)[record.ref_field]
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up