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

I would like to add the value of a field from a custom module to an existing view.

mymodule.py file

class MyClass()
     my_var = fields.Char()
...
in the xml file=

<record from different module>
<xpath ...>
    <field name="my_var">     
</xpath>
to point to the value in my module?What do I need to add to the <field...> to point to the value in my module? What do I need to add to the

아바타
취소
베스트 답변

Please read the documentation and the tutorial...

All is explained... 


https://www.odoo.com/documentation/9.0/


take a look here: https://www.odoo.com/documentation/9.0/howtos/backend.html#view-inheritance


so in your case:


<field name='inherit_id' ref='other_module.xml_id'
...
<field name='field_name_from_other_module' position='after'>
    <field='field_from_my_new_module'/>
</field>



아바타
취소
관련 게시물 답글 화면 활동
1
9월 17
3009
0
7월 17
2547
1
3월 25
535
0
11월 24
854
0
6월 24
887