Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4954 มุมมอง

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>

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 22
4512
set one page(Tab) as default in notebook แก้ไขแล้ว
3
ก.ย. 24
15685
1
ม.ค. 21
7162
2
ธ.ค. 19
9708
3
มี.ค. 16
4373