Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
4942 Prikazi

Hi,

I would like to display different fields of the same model on different pages of the same notebook.  I have provided code below to better explain what I would like to obtain.

I have tried different approaches but noone worked. Any suggestions? I use v 12.0

Regards,

<notebook>
<page string="Tab 1">
<field name="line_ids">
<tree editable="bottom">
<field name="field1_model_abc_line"/>
<field name="field2_model_abc_line"/>
</tree>
</field>
</page>
<page string="Tab 2">
<field name="line_ids">
<tree editable="bottom">
<field name="field1_model_abc_line"/>
<field name="field2_model_abc_line"/>
<field name="field3_model_abc_line"/>
</tree>
</field>
</page>
</notebook>

Avatar
Opusti
Best Answer

For your case, one "line_ids" field should be readonly and suggest you to make readonly which line_ids is show fewer fields.

Because if you add data into Tab 2 line ids, it will also effect to Tab 1 line_ids.

Only Tab 2 can able to make add an item.

I make some changes below and please try again.

<notebook>
<page string="Tab 1">
        <field name="line_ids" readonly="1">
            <tree>
<field name="field1_model_abc_line"/>
<field name="field2_model_abc_line"/>
                <field name="field3_model_abc_line" invisible="1"/>
</tree>
</field>
</page>
<page string="Tab 2">
<field name="line_ids">
<tree editable="bottom">
<field name="field1_model_abc_line"/>
<field name="field2_model_abc_line"/>
<field name="field3_model_abc_line"/>
</tree>
</field>
</page>
</notebook>
Avatar
Opusti
Best Answer

Is it possible if we want to remove field2_model_abc_line from Tab 2?

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
avg. 22
4507
3
sep. 24
15681
1
jan. 21
7162
2
dec. 19
9703
3
mar. 16
4371