openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #07497
[Merge] lp:~openerp-dev/openobject-client/6.0-opw-5921-ysa into lp:openobject-client/6.0
Yogesh(Open ERP) has proposed merging lp:~openerp-dev/openobject-client/6.0-opw-5921-ysa into lp:openobject-client/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client/6.0-opw-5921-ysa/+merge/62446
fix problem of if context apply in o2m fiel then context not pass in fields_view_get(). get default value of model and eval with context and then context pass in screen on one2many field.
--
https://code.launchpad.net/~openerp-dev/openobject-client/6.0-opw-5921-ysa/+merge/62446
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-client/6.0-opw-5921-ysa.
=== modified file 'bin/widget/view/form_gtk/one2many_list.py'
--- bin/widget/view/form_gtk/one2many_list.py 2011-01-03 12:36:16 +0000
+++ bin/widget/view/form_gtk/one2many_list.py 2011-05-26 10:02:25 +0000
@@ -33,6 +33,7 @@
from pager import pager
import service
import tools
+import rpc
class dialog(object):
@@ -188,6 +189,9 @@
# 'default_get' attribute for the same effect (pending removal)
default_get_ctx = (attrs.get('default_get') or attrs.get('context'))
+ fields = rpc.session.rpc_exec_auth('/object', 'execute', model, 'fields_get', False, self.context)
+ res = rpc.session.rpc_exec_auth_try('/object', 'execute', model, 'default_get', fields)
+ self.context = tools.expr_eval("dict(%s)" % attrs.get('context',"{}"), res)
self.screen = Screen(attrs['relation'],
view_type=attrs.get('mode','tree,form').split(','),
parent=self.parent, views_preload=attrs.get('views', {}),
Follow ups