i hope i got an answer ! after inheriting res.users model
#-*- coding: utf-8 -*-
from openerp import fields, models, api
class res_users_list(models.Model):
_inherit='res.users'
price_list = fields.Many2many(string='Listes de prix autorisees' ,comodel_name ='product.pricelist')
i wanna give some users a list of allowed pricelists ! here's the view :
<record id="view_price_list_inherited_from" model="ir.ui.view">
<field name="name">res.users.form.inherited</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.user_groups_view"/>
<field name="arch" type="xml">
<xpath expr="//separator[@string='Application']" position="after">
<field name="price_list"
widget="many2many_tags"
/>
<newline/>
</xpath>
</field>
</record>
once i log in , i have this error
i really hope someone explain to me ! or a solution to get rid of this Access error "AccessError
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.
(Document type: res.users, Operation: read) "
thnx all guys for the quick reply ! here's mi ir.model.access.csv :
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_price_list_filter,User_price_list_filter.price_list_filter,base.model_res_partner,base.group_sale_salesman,1,1,1,1
access_price_list_filter1,User_price_list_filter1.price_list_filter,base.model_res_users,base.group_sale_salesman,1,1,1,1
access_price_list_filter2,User_price_list_filter2.price_list_filter,product.model_product_pricelist,base.group_sale_salesman,1,1,1,1
res.user
the access read – khelili miliana?debug
after/web
– khelili miliana