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.

0

How to add new tab in product definition layout

By
Duy
on 8/25/13, 12:10 PM 1,083 views

hi all,

I would like to add new tab in product definition layout, the way go to layout: Warehouse --> Product --> Create. I tried some research and do similar things in account/product_view.xml to add new tab but not successful. I always got "Invalid XML architecture". Below is my xml code, I defined new xml to modify GUI:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="product_normal_form_view_conversion" model="ir.ui.view">
            <field name="name">product.normal.form.inherit_conversion</field>
            <field name="model">product.uom.conversion</field>
            <field name="priority">6</field>
            <field name="inherit_id" ref="product.product_normal_form_view"/>
            <field name="arch" type="xml">
                <notebook position="inside">
                    <page string="Conversion">

                    </page>
                </notebook>
            </field>
        </record>

    </data>
</openerp>

I appreciate any help or suggestion from everyone. Thanks so much.

Duy.

1

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 8/25/13, 12:38 PM

Hi,

model =product.product and not product.uom.conversion.

replace

<field name="model">product.uom.conversion</field>

to

<field name="model">product.product</field>

add add your page after another page (for example after page Inventory)

  <field name="arch" type="xml">
                <page string="Inventory"  position="after">
                    <page string="Conversion">
                     <!--   your fields  -->
                    </page>
                </page>
     </field>
0
Duy
On 8/25/13, 12:46 PM

Thanks for your quick response.

But I would like to bind data into my table defined by me, not product_product table. I will tried with <page string="Inventory" ...=""/>

Thanks again.

Duy.

put you model to _inherit = 'product.product'

Borni DHIFI
on 8/25/13, 12:52 PM

Thanks so much !

Duy
on 8/25/13, 1:14 PM

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

0 follower(s)

Stats

Asked: 8/25/13, 12:10 PM
Seen: 1083 times
Last updated: 3/16/15, 8:10 AM