Skip to Content
Menu
This question has been flagged
2 Replies
4062 Views

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
Discard
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
Discard
Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 22
2433
3
Sep 24
14224
1
Jan 21
5822
2
Dec 19
8302
3
Mar 16
3428