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

Hello,


how can i set the context 'active_test': False on related fields in odoo 11?


This doesn't work:

field_name = fields.One2many(
    related='xxx.field_name',
    context={
        'active_test': False,
    }
 )


On the original field definition, the active_test context works

    field_name = fields.One2many(
        comodel_name='model.a',
        inverse_name='company_id',
        string='XXX',
        context={
            'active_test': False,
        },
    )

 

I have also tried to set the context in the view definition.


Regards Hermann

아바타
취소
작성자 베스트 답변

The problem is not an field value from the parent.

I also want to view inactive records. Inactive data records are displayed for the original field respectively view, but not if it is a related field.

아바타
취소