Merge lp:~openerp-dev/openobject-server/trunk-opw-576863-port-mma into lp:openobject-server

Proposed by Mayur Maheshwari(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-server/trunk-opw-576863-port-mma
Merge into: lp:openobject-server
Diff against target: 11 lines (+1/-1)
1 file modified
openerp/addons/base/security/base_security.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/trunk-opw-576863-port-mma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+135349@code.launchpad.net

Description of the change

Hello,

==> Using OpenERP plug-in for OpenOffice, the 'Send to the server' functionality doesn't show the report at destination model if used by user other then Administrator(uid=1).

Steps to Reproduce issue:

1) Create a DB and install base_report_designer module,
2) Configure report_designer_plugin.zip for OpenOffice,
3) Create a user and give him all access as Administrator has,
4) Logged in with this user and create a OpenOffice report, and upload it to destination model in server using 'Send to the server',
5) In OpenERP client, go to destination model and you will not find the uploaded report.

Note: You will notice message, "Operation prohibited by access rules, or performed on an already deleted document (Operation: create, Document type: ir.values)."

The cause of the issue is, plugin sends data with 'key': 'action' and no user information for 'user_id' field of 'ir.values' model and the access rules(orm's def check_access_rule(...)) checks for 'key'='default' and 'user_id'=<current logged in user> which forces the check_access_rule(...) to raise this warning.

I have fixed this issue server side and this fix is dependent on another fix at branch:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-576863-port-mma

code is forward port from 6.1

Thanks,
Mayur

To post a comment you must log in.

Unmerged revisions

4580. By Ravi Gohil (OpenERP)

[FIX]base: When you use Send to the server from OpenOffice with user other than Administrator(uid=1) you will notice a warning message saying Access Error and report will not be seen at destination model

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/addons/base/security/base_security.xml'
2--- openerp/addons/base/security/base_security.xml 2012-10-23 11:11:22 +0000
3+++ openerp/addons/base/security/base_security.xml 2012-11-21 10:11:32 +0000
4@@ -66,7 +66,7 @@
5 <record model="ir.rule" id="ir_values_default_rule">
6 <field name="name">Defaults: alter personal values only</field>
7 <field name="model_id" ref="model_ir_values"/>
8- <field name="domain_force">[('key','=','default'),('user_id','=',user.id)]</field>
9+ <field name="domain_force">[('key','in',('default','action')),('user_id','=',user.id)]</field>
10 <field name="perm_read" eval="False"/>
11 </record>
12