openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #03079
[Merge] lp:~openerp-dev/openobject-client-web/trunk-bug-715688-sma into lp:openobject-client-web
Sananaz (Open ERP) has proposed merging lp:~openerp-dev/openobject-client-web/trunk-bug-715688-sma into lp:openobject-client-web.
Requested reviews:
OpenERP SA's Web Client R&D (openerp-dev-web)
Related bugs:
#715688 [PS] web client : bank statement : import invoice doesn't work
https://bugs.launchpad.net/bugs/715688
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-bug-715688-sma/+merge/49962
Hello,
Bug for evaluation of 'active_id' in context. Its major problem.
Please check with these 3 cases also.
1. Purchase orders > Merge Orders (bug : #702923)
2. Products > Bill Of Materials
3. Bank statement
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-bug-715688-sma/+merge/49962
Your team OpenERP SA's Web Client R&D is requested to review the proposed merge of lp:~openerp-dev/openobject-client-web/trunk-bug-715688-sma into lp:openobject-client-web.
=== modified file 'addons/openerp/controllers/actions.py'
--- addons/openerp/controllers/actions.py 2011-02-15 12:43:47 +0000
+++ addons/openerp/controllers/actions.py 2011-02-16 12:59:14 +0000
@@ -231,6 +231,8 @@
active_model=data.get('model', False)
)
+ ctx.update(expr_eval(action.get('context', '{}'), ctx))
+
if action.get('context') and isinstance(action['context'], dict):
if not action['context'].get('active_ids'):
action['context']['active_ids'] = ctx['active_ids'] or []
@@ -384,7 +386,10 @@
#raise common.error('Error', 'Invalid action...')
return;
- data.setdefault('context', {}).update(expr_eval(action.get('context','{}'), data.get('context', {})))
+ if data.get('form_context') and not action.get('context'):
+ data.setdefault('context', {}).update(expr_eval(data.get('form_context'), data.get('context', {})))
+ else:
+ data.setdefault('context', {}).update(expr_eval(action.get('context','{}'), data.get('context', {})))
action_executor = ACTIONS_BY_TYPE[action['type']]
return action_executor(action, data)
=== modified file 'addons/openerp/controllers/form.py'
--- addons/openerp/controllers/form.py 2011-02-10 16:09:23 +0000
+++ addons/openerp/controllers/form.py 2011-02-16 12:59:14 +0000
@@ -984,9 +984,8 @@
domain.extend(expr_eval(action.get('domain', '[]'), context))
action['domain'] = ustr(domain)
- action['context'] = context or {}
import actions
- return actions.execute(action, model=params.model, id=id, ids=ids, report_type='pdf', context_menu=context_menu)
+ return actions.execute(action, model=params.model, id=id, ids=ids, report_type='pdf', context_menu=context_menu, form_context=context)
@expose()
def dashlet(self, **kw):
Follow ups