콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
9169 화면

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.

아바타
취소
베스트 답변

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]
아바타
취소