Xavier ALT (OpenERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-opw-16138-xal into
lp:openobject-client-web.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-16138-xal/+merge/104445
Hi,
When web client try to read "parent_id" field on tree view with toolbar mode
active, it was missing the current context.
Regards,
Xavier
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-16138-xal/+merge/104445
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-opw-16138-xal.
=== modified file 'addons/openerp/controllers/tree.py'
--- addons/openerp/controllers/tree.py 2012-01-23 07:42:39 +0000
+++ addons/openerp/controllers/tree.py 2012-05-02 20:18:36 +0000
@@ -54,6 +54,8 @@
view_id = (params.view_ids or False) and params.view_ids[0]
domain = params.domain
context = params.context
+ ctx = dict(context,
+ **rpc.session.context)
res_id = params.ids or 0
model = params.model
@@ -78,7 +80,7 @@
else:
tool['icon'] = False
id = tool['id']
- ids = proxy.read([id], [tree.field_parent])[0][tree.field_parent]
+ ids = proxy.read([id], [tree.field_parent], ctx)[0][tree.field_parent]
tool['ids'] = ids
can_shortcut = self.can_shortcut_create()
=== modified file 'addons/openerp/widgets/tree_view.py'
--- addons/openerp/widgets/tree_view.py 2011-11-19 18:00:17 +0000
+++ addons/openerp/widgets/tree_view.py 2012-05-02 20:18:36 +0000
@@ -84,7 +84,7 @@
id = ids[0]
if id:
- ids = proxy.read([id], [self.field_parent])[0][self.field_parent]
+ ids = proxy.read([id], [self.field_parent], ctx)[0][self.field_parent]
elif not ids:
ids = proxy.search(domain, 0, 0, 0, ctx)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp