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

What the cause and how to fix this error :

"Canot be located in parent view"


[Update]

This is the code, I can't add new tab after Accounting :

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<record model="ir.ui.view" id="product_form_view">
    <field name="name">product</field>
    <field name="model">product.product</field>
    <field name="type">form</field>
    <field name="inherit_id" ref="product.product_normal_form_view"/>
    <field name="arch" type="xml">
    
        <xpath expr="//page[@string='Accounting']" position="after">
            <page string="KPB" col="1">
                <group col="4">
                    <field name="color"/>
                </group>
            </page>
        </xpath>
        
    </field>
</record>

</data>
</openerp>

อวตาร
ละทิ้ง

Provide more information. No-one has a glass orb around here, so a single sentence does not help anyone to solve your problem.

คำตอบที่ดีที่สุด

You probably need to add, in your module, in __openerp__.py

'depends': [ 'product' ],

อวตาร
ละทิ้ง
ผู้เขียน

I was added it before

คำตอบที่ดีที่สุด

Since the Accounting page is added in ACCOUNT module, but you tried to inherit PRODUCT module to add your form

<record model="ir.ui.view" id="product_form_view">
    <field name="name">product</field>
    <field name="model">product.product</field>
    <field name="type">form</field>
    <field name="inherit_id" ref="account.product_normal_form_view"/>
    <field name="arch" type="xml">
    
        <xpath expr="//page[@string='Accounting']" position="after">
            <page string="KPB" col="1">
                <group col="4">
                    <field name="color"/>
                </group>
            </page>
        </xpath>

    </field>
</record>

อวตาร
ละทิ้ง
ผู้เขียน

ok thanks, I will try

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ต.ค. 24
7801
2
ม.ค. 24
15488
0
ต.ค. 16
5224
7
เม.ย. 15
7303
404 errors loading .js .css .png แก้ไขแล้ว
3
ธ.ค. 23
26205