Odoo Help


cannot find view based on access rights

on 10/10/18, 2:20 PM 88 views
<record id="view_res_partner_pricelist" model="ir.ui.view">
                <field name="name">view.res.partner.pricelist.form</field>
                <field name="model">res.partner</field>
                <field name="type">form</field>
                <field name="inherit_id" ref="product.view_partner_property_form" />
                <field name="context">{'readonly_by_pass': True}</field>
                <field name="arch" type="xml">

                    <xpath expr="//page[@name='accounting']" position="replace">

this is my view where I hide tab Accounting, and it works ok if the user that opens contact form have accounting & finance access rights, but if the user doesn't have them then I get an error

AttributeError: Element '<xpath expr="//page[@name='accounting']">' cannot be located in parent view

Error context:
View `view.res.partner.pricelist.form`

how can I make this work for users who has and don't accounting and finances access rights?

Nitin Kantak
On 10/11/18, 5:05 AM

Here you are inheriting child view . Inherit parent form view id :



    <field name="inherit_id" ref="base.view_partner_form"/>

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.


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

1 follower(s)


Asked: 10/10/18, 2:20 PM
Seen: 88 times
Last updated: 10/11/18, 1:54 PM