Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5350 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 17
3332
0
thg 7 17
2891
1
thg 3 25
1093
0
thg 11 24
1346
0
thg 6 24
1416