...
Codeblock |
---|
|
<odoo>
<data>
<record model="ir.ui.view" id="eq_letter_state_form_view">
<field name="name">eq_letter_state_form</field>
<field name="model">eq_letter_state</field>
<field name="arch" type="xml">
<form string="test">
<group>
<field name="eq_state"/>
</group>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="eq_letter_state_menu_action">
<field name="name">EQ Letter State</field>
<field name="res_model">eq_letter_state</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to create a new state.
</p>
</field>
</record>
<menuitem id="eq_letter_state_menu"
name ="states"
action ="eq_letter_state_menu_action"
parent="eq_letter_menu_top"
sequence="1000"/>
</data>
</odoo> |
Image Added
Als nächstes möchten wir die treeview von eq.letter.state ändern. Es soll der entsprechende Status des Briefes angezeigt werden, nicht dessen ID. Hierzu fügen wir den folgenden Code in views/eq_letter_state.xml
Codeblock |
---|
|
<record model="ir.ui.view" id="eq_letter_state_tree_view">
<field name="name">EQ Letter States</field>
<field name="model">eq.letter.state</field>
<field name="arch" type="xml">
<tree string="States">
<field name="eq_state"/>
</tree>
</field>
</record> |
Dies führt zu diesem Ergebnis.
Image Added