Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4339 มุมมอง

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>

 

 

 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
View inheritance แก้ไขแล้ว
1
มี.ค. 20
3498
12
ธ.ค. 18
34820
1
ก.ค. 16
7106
0
มี.ค. 15
3875
Problem with inheritance of a view. แก้ไขแล้ว
1
มี.ค. 15
7802