Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
5505 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Sept. 17
3471
0
Juli 17
3063
1
März 25
1370
0
Nov. 24
1556
0
Juni 24
1602