Merge lp:~openerp-dev/openobject-server/trunk-bug-920033-jam into lp:openobject-server

Proposed by Jigar A.
Status: Rejected
Rejected by: Fabien (Open ERP)
Proposed branch: lp:~openerp-dev/openobject-server/trunk-bug-920033-jam
Merge into: lp:openobject-server
Diff against target: 12 lines (+1/-1)
1 file modified
openerp/osv/orm.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/trunk-bug-920033-jam
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+103805@code.launchpad.net

Description of the change

The MP Fix the Bug#920033 : 'uid' not available in attrs evaluation context
   When we use attrs="{'invisible':[('user_id','=',uid)]}" server not able to process uid as "uid" dynamic value is not a valid field to be evaluated client-side. So by Adding UID from client context, rest of the part will be processed by server.
Web Client Fix is Already Done (As per Comment#2 on Bug)
GTK adding UID fix is in Branch : lp:~openerp-dev/openobject-client/trunk-bug-920033-jam
and on server while evaling attrs by passing uid via context will fix the issue.
Kindly review this.
Thank You

To post a comment you must log in.

Unmerged revisions

4151. By Jigar A.

merge lp:openobject-server

4150. By Jigar A.

[FIX] Need UID is context evlaution for attrs on from type view also

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/osv/orm.py'
2--- openerp/osv/orm.py 2012-08-14 13:06:56 +0000
3+++ openerp/osv/orm.py 2012-08-29 08:58:18 +0000
4@@ -96,7 +96,7 @@
5 # For non-tree views, the context shouldn't be given.
6 def transfer_node_to_modifiers(node, modifiers, context=None, in_tree_view=False):
7 if node.get('attrs'):
8- modifiers.update(eval(node.get('attrs')))
9+ modifiers.update(eval(node.get('attrs'), context))
10
11 if node.get('states'):
12 if 'invisible' in modifiers and isinstance(modifiers['invisible'], list):