Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
5521 Weergaven

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

Avatar
Annuleer
Beste antwoord

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>



Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
sep. 17
3475
0
jul. 17
3065
1
mrt. 25
1377
0
nov. 24
1564
0
jun. 24
1606