Hello,
I've created my own module and I want to add attributes to a tree present in my view.
I've create this inherit views but I've got a problem with the addition of attributes for my tree.
This my code for change my parent form view:
<record id="hide_create_registred_tree" model="ir.ui.view">
<field name="name">hide.create.register.tree</field>
<field name="model">training.actions</field>
<field name="inherit_id" ref="x_training.training_actions_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='registred']/tree" position="attributes">
<attribute name="create">False</attribute>
</xpath>
<xpath expr="//field[@name='blocking_registrations']" position="after">
<field name="max_trained"/>
</xpath>
</field>
</record>When I go to my module and I click on the button "Create" nothing appends.
If I remove this part of my code :
<xpath expr="//field[@name='registred']/tree" position="attributes">
<attribute name="create">False</attribute>
</xpath>
I can open the parent form by clicking on button "Create".
What's wrong ?
Thanks for your help.
Regards
TIP for pasting code... please put it first through this tool:
https://www.online-toolz.com/tools/text-html-entities-convertor.php
I will convert all brackets, slashes to enities ... then paste it again.. I know this editor is helly buggy
IS THIS YOUR CODE?
<pre>
<field name="name">hide.create.register.tree</field>
<field name="model">training.actions</field>
<field name="inherit_id" ref="x_training.training_actions_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='registred']/tree" position="attributes">
<attribute name="create">False</attribute>
</xpath>
<xpath expr="//field[@name='blocking_registrations']" position="after">
<field name="max_trained"/>
</xpath>
</field>
</pre>
Thanks Krys.Raj
This my code.
I update my post