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
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
2
Antwoorden
8911
Weergaven
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]
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden