This question has been flagged
2 Replies
5824 Views

Hello,

There is any way how to change inherited view tabs order? I have a view called plan and i inherit this view with 3 other tabs. I tryed to rearrange code in xml view but i get the same order.

This is the link to the example image:

http://s30.postimg.org/x2r20unw1/Screenshot_from_2015_03_02_10_38_47.png

code example:

<record id="pp_control_details" model="ir.ui.view">
            <field name="name">pp.control4.form.inherit</field>
            <field name="model">pp.control</field>
            <field name="inherit_id" ref="pp_plan.view_pp_control"/>
               <field name="arch" type="xml">
                <xpath expr='//page[@string="Controls"]' position="after"  >
                    <page string="Details">
                            <group string="Details">
                                <field name="detail_ids"/>
                            </group>
                        <button type="object" name="create_period5" string="Compute" icon="terp-stock_format-scientific"/>                               
                    </page>
                </xpath>
            </field>
        </record>
        
        <record id="pp_control_platform" model="ir.ui.view">
            <field name="name">pp.control2.form.inherit</field>
            <field name="model">pp.control</field>
            <field name="inherit_id" ref="pp_plan.view_pp_control"/>
               <field name="arch" type="xml">
                <xpath expr='//page[@string="Controls"]' position="after">
                    <page string="Platforms">
                            <group string="Platforms">
                                <field name="platform_ids"/>
                            </group>
                    </page>
                </xpath>
            </field>
        </record>
        
        <record id="pp_control_skills" model="ir.ui.view">
            <field name="name">pp.control1.form.inherit</field>
            <field name="model">pp.control</field>
            <field name="inherit_id" ref="pp_plan.view_pp_control"/>
               <field name="arch" type="xml">
                <xpath expr='//page[@string="Controls"]' position="after">
                    <page string="Skills">
                            <group string="Skills">
                                <field name="skill_ids"/>
                            </group>

                    </page>
                </xpath>
            </field>
        </record>
        
        <record id="pp_control_features" model="ir.ui.view">
            <field name="name">pp.control3.form.inherit</field>
            <field name="model">pp.control</field>
            <field name="inherit_id" ref="pp_plan.view_pp_control"/>
               <field name="arch" type="xml">
                <xpath expr='//page[@string="Controls"]' position="after">
                    <page string="Features">
                            <group string="Features">
                                <field name="feature_ids"/>
                            </group>
                    </page>
                </xpath>
            </field>
        </record>

 

Any help and examples would be appreciated

Thanks in advance,

Avatar
Discard
Best Answer

Hi Darius,

instead of your code, try this.

 

<record id="pp_control_details" model="ir.ui.view">
            <field name="name">pp.control4.form.inherit</field>
            <field name="model">pp.control</field>
            <field name="inherit_id" ref="pp_plan.view_pp_control"/>
               <field name="arch" type="xml">
                <xpath expr='//page[@string="Controls"]' position="after"  >
                    <page string="Details">
                            <group string="Details">
                                <field name="detail_ids"/>
                            </group>
                        <button type="object" name="create_period5" string="Compute" icon="terp-stock_format-scientific"/>                               
                    </page>
                    <page string="Platforms">
                            <group string="Platforms">
                                <field name="platform_ids"/>
                            </group>
                    </page>
                    <page string="Features">
                            <group string="Features">
                                <field name="feature_ids"/>
                            </group>
                    </page>
                </xpath>
            </field>
        </record>

Avatar
Discard
Author Best Answer

Yep thats what i did actually :) thanks!

Avatar
Discard