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

View Inheritance in product page

By
Kaustubha Udyog
on 9/30/14, 2:31 AM 650 views

I created my_product module. I have added few fields in product_product and product_template tables.

using the folling code I can add a new page . Now I want to fields from product_product table in the page.

I neither get any error nor see my field. What am I doing wrong ?

------

    <data>
     <record id="product_normal_form_view_inherit" model="ir.ui.view">
            <field name="name">orion.product.form</field>
            <field name="model">product.template</field>
        <field name="inherit_id" ref="product.product_template_form_view"/>
            <field name="arch" type="xml">
            <xpath expr="//page[@string='Sales']" position="after">
            <page name="orion" string="Orion">
         <group colspan="4">
                    <group>
               <field name="drawing_details" />
             </group>
        </group>
        </page>
    </xpath>     
    </field>
        </record>
     <record id="product_normal_form_view_inherit1" model="ir.ui.view">
            <field name="name">orion.product.form1</field>
            <field name="model">product.product</field>
        <field name="inherit_id" ref="product_normal_form_view_inherit"/>
            <field name="arch" type="xml">
        <field name="drawing_details" position="before">
            <field name="product.selectmodelyn" />
                </field>
        </field>
        </record>

 

 

 

0
Kaustubha Udyog
On 10/1/14, 1:53 AM

I can see orion tab. i.e. first part of xml code is working but i can not add field into it from product model.

The field is added in table through python code using inheritance

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 9/30/14, 3:23 AM

Have you tried using "label"? As in:

<field name="myfield"/>

<label for="myfield" string="My field"/>

 

Are the fields visible when you edit the object. Is the page itself even visible?

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

2 follower(s)

Stats

Asked: 9/30/14, 2:31 AM
Seen: 650 times
Last updated: 3/16/15, 8:10 AM