Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

How to change inherited view tabs order?

By
DM
on 3/2/15, 6:24 AM 759 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,

3

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 3/2/15, 7:41 AM

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>

1
DM
On 3/2/15, 7:43 AM

Yep thats what i did actually :) thanks!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/2/15, 6:24 AM
Seen: 759 times
Last updated: 10/23/15, 9:18 AM