Merge lp:~openerp-dev/openobject-addons/6.1-opw-576863-rgo into lp:openobject-addons/6.1

Proposed by Ravi Gohil (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6911
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-576863-rgo
Merge into: lp:openobject-addons/6.1
Diff against target: 15 lines (+2/-1)
1 file modified
base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-576863-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+116222@code.launchpad.net

Description of the change

Hello,

Using OpenERP plugin 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 and this fix is dependent on another fix at branch: https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-576863-rgo

Kindly review it.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-576863-port-mma/+merge/135350 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6911. By Ravi Gohil (OpenERP)

[FIX] : 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 (Maintenance Case : 576863)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'base_report_designer/plugin/openerp_report_designer.zip'
0Binary files base_report_designer/plugin/openerp_report_designer.zip 2011-06-17 14:10:24 +0000 and base_report_designer/plugin/openerp_report_designer.zip 2012-07-23 09:16:22 +0000 differ0Binary files base_report_designer/plugin/openerp_report_designer.zip 2011-06-17 14:10:24 +0000 and base_report_designer/plugin/openerp_report_designer.zip 2012-07-23 09:16:22 +0000 differ
=== modified file 'base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py'
--- base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py 2011-12-19 16:54:40 +0000
+++ base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py 2012-07-23 09:16:22 +0000
@@ -168,7 +168,8 @@
168 'model': docinfo.getUserFieldValue(3),168 'model': docinfo.getUserFieldValue(3),
169 'value': 'ir.actions.report.xml,'+str(id),169 'value': 'ir.actions.report.xml,'+str(id),
170 'key2': 'client_print_multi',170 'key2': 'client_print_multi',
171 'object': True171 'object': True,
172 'user_id': uid
172 }173 }
173 res = self.sock.execute(database, uid, self.password, 'ir.values' , 'create',rec )174 res = self.sock.execute(database, uid, self.password, 'ir.values' , 'create',rec )
174 else :175 else :