İçereği Atla
Menü
Bu soru işaretlendi
5 Cevaplar
6969 Görünümler

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>

Avatar
Vazgeç

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

En İyi Yanıt

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

'depends': [ 'product' ],

Avatar
Vazgeç
Üretici

I was added it before

En İyi Yanıt

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>

Avatar
Vazgeç
Üretici

ok thanks, I will try

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eki 24
7546
2
Oca 24
15334
0
Eki 16
5026
7
Nis 15
7183
3
Ara 23
26068