[FIX]: crm: context problem of onchange in forward to partner wizard
authorrpa (Open ERP) <rpa@tinyerp.com>
Thu, 3 Jun 2010 11:40:23 +0000 (17:10 +0530)
committerrpa (Open ERP) <rpa@tinyerp.com>
Thu, 3 Jun 2010 11:40:23 +0000 (17:10 +0530)
bzr revid: rpa@tinyerp.com-20100603114023-2uwwm7sopkw6ccle

addons/crm/wizard/crm_forward_to_partner.py
addons/crm/wizard/crm_forward_to_partner_view.xml

index 156ab33..9450665 100644 (file)
@@ -107,8 +107,8 @@ class crm_lead_forward_to_partner(osv.osv_memory):
         #TODO: ids and context are not comming
         res = False
         msg_val = ''
-        res_id = False # Comes from context
-        model = None # Comes from context
+        res_id = context.get('active_id')
+        model = context.get('active_model')
         model_pool = self.pool.get(model)
         if not res_id or not model:
             return res
index 1e8c6fc..b6295cf 100644 (file)
@@ -9,7 +9,7 @@
                 <form string="Forward to Partner">
                     <separator string="User" colspan="4" />
                     <field name="email_from" colspan="2" />
-                    <field name="history" colspan="2" on_change="on_change_history(history)"/>
+                    <field name="history" colspan="2" on_change="on_change_history(history, context)"/>
                     <separator string="Send to" colspan="4" />
                     <field name="name" colspan="2" />
                                        <group col="2" colspan="2" attrs="{ 'invisible' : [('name','!=','user')]}">