Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-10247-msh into 
lp:openobject-client-web/6.0.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-10247-msh/+merge/75987

Hello,

To generate the issue goto Sales -> Leads -> Create one lead and enter some 
data in phone and then save the record -> now click the PhoneCalls in 
act_window, you will redirected to new tab now create new record for PhoneCalls 
you will not find phone data which you have entered in Lead's form.

The data of phone is passed in context but the context was not evaluated, 
because the design of web change the context in act_window method of action.py,

So changed the code and passed the form_context which will be passed from 
action method of form.py.

If there is form_context then it will take that form_context and going to 
evaluate with data.get('context') otherwise it will evaluate with 
action.get('context').

form_context will be passed only from action method of form.py which will be 
called only when action of act_window is called.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-10247-msh/+merge/75987
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-10247-msh.
=== modified file 'addons/openerp/controllers/actions.py'
--- addons/openerp/controllers/actions.py	2011-09-02 13:18:05 +0000
+++ addons/openerp/controllers/actions.py	2011-09-19 09:55:32 +0000
@@ -389,7 +389,7 @@
         #raise common.error('Error', 'Invalid action...')
         return;
 
-    data.setdefault('context', {}).update(expr_eval(action.get('context') or action.get('form_context', '{}'), data.get('context', {})))
+    data.setdefault('context', {}).update(expr_eval(action.get('form_context', '{}') or action.get('context'), data.get('context', {})))
 
     action_executor = ACTIONS_BY_TYPE[action['type']]
     return action_executor(action, data)

_______________________________________________
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

Reply via email to