openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #11666
[Bug 1002725] [NEW] ir.rule working but no report could be printed
Public bug reported:
Hi,
I've a problem using ir.rule to restrict the access on res.partner.
I've created the following rules:
Code:
<record id="partner_personal_rule" model="ir.rule">
<field name="name">Personal partners</field>
<field ref="base.model_res_partner" name="model_id"/>
<field name="domain_force">[('user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_sale_salesman'))]"/>
</record>
<record id="partner_all_rule" model="ir.rule">
<field name="name">All partners</field>
<field ref="base.model_res_partner" name="model_id"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('base.group_sale_salesman_all_leads''))]"/>
</record>
Each salesman should only see his customers. It works fine.
But if he wants to print any report accessing this customer (e.g. the Labels-Report or an order created for this customer) he get's this error:
AccessError - Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: Partner).
The rule restricts the access to the own customers, but the salesman
could not run a report using these own partners.
** Affects: openobject-server
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1002725
Title:
ir.rule working but no report could be printed
Status in OpenERP Server:
New
Bug description:
Hi,
I've a problem using ir.rule to restrict the access on res.partner.
I've created the following rules:
Code:
<record id="partner_personal_rule" model="ir.rule">
<field name="name">Personal partners</field>
<field ref="base.model_res_partner" name="model_id"/>
<field name="domain_force">[('user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_sale_salesman'))]"/>
</record>
<record id="partner_all_rule" model="ir.rule">
<field name="name">All partners</field>
<field ref="base.model_res_partner" name="model_id"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('base.group_sale_salesman_all_leads''))]"/>
</record>
Each salesman should only see his customers. It works fine.
But if he wants to print any report accessing this customer (e.g. the Labels-Report or an order created for this customer) he get's this error:
AccessError - Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: Partner).
The rule restricts the access to the own customers, but the salesman
could not run a report using these own partners.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1002725/+subscriptions
Follow ups
References