Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
5054 Vistas

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>          
Avatar
Descartar
Mejor respuesta

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

Avatar
Descartar

Its not working for me... is there any other solution.