Odoo Help

Welcome!

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

0

Force overwriting of a record rule

By
mustafa
on 8/14/16, 2:27 PM 160 views

How to force overwriting  of a record rule which is defined in a base module and data is set to noupdate='1' ?

the record rule is defined in product module

<data noupdate="1">
<record id="product_comp_rule" model="ir.rule">
<field name="name" >Product multi-company</field>
<field name="model_id" ref="model_product_template"/>
<field name="global" eval="True"/>
<field name="domain_force"> ['|',('company_id','=',user.company_id.id),('company_id','=',False)]</field>
</record>

I want to edit it in my custom module to be

<record id="product.product_comp_rule" model="ir.rule">
<field name="name" >All Products (Parent Company)</field>
<field name="model_id" ref="product.model_product_template"/>
<field name="global" eval="True"/>
<field name="domain_force">['|','|',('company_id','=',user.company_id.id),('company_id','=','False'),('company_id','child_of',[user.company_id.id])]</field>
</record>          
0
ayman mohammed adam
On 8/15/16, 5:43 AM

dear mustafa,

try something like this:

replace:

<?xml version="1.0"?>

<openerp>

<data noupdate="1">

<record model="res.groups" id="group_erp_manager">

<field name="name">Access Rights</field>

</record>

by:

<?xml version="1.0"?>

<openerp>

<data noupdate="0"

<record model="res.groups" id="base.group_erp_manager">

<field name="name">Access Rights</field>

</record>




I hope i helped you

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/14/16, 2:27 PM
Seen: 160 times
Last updated: 8/15/16, 7:56 AM