Odoo Help

4

Fix the Error ==> "Canot be located in parent view"

By
Miftahussalam
on 12/19/14, 6:25 AM 1,436 views

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.

Ludo - Neobis
on 12/19/14, 10:08 AM
1
Zbik
On 12/20/14, 6:09 AM

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

'depends': [ 'product' ],

I was added it before

Miftahussalam
on 12/23/14, 9:56 PM
0

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

Miftahussalam
on 12/23/14, 9:59 PM

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 12/19/14, 6:25 AM
Seen: 1436 times
Last updated: 6/7/17, 2:41 AM