تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
4943 أدوات العرض

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?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 22
4509
3
سبتمبر 24
15682
1
يناير 21
7162
2
ديسمبر 19
9705
3
مارس 16
4371