[IMP] improve code,add condition if context none
authorAmit Vora <avo@tinyerp.com>
Tue, 18 Mar 2014 08:43:14 +0000 (14:13 +0530)
committerAmit Vora <avo@tinyerp.com>
Tue, 18 Mar 2014 08:43:14 +0000 (14:13 +0530)
bzr revid: avo@tinyerp.com-20140318084314-y63h7bho393fhcix

addons/crm/res_partner.py

index 4852b46..e9cb0df 100644 (file)
@@ -26,6 +26,8 @@ class res_partner(osv.osv):
     _inherit = 'res.partner'
     
     def schedule_meeting(self, cr, uid, id, context=None):
+        if context is None:
+            context = {}
         user_id = context.get('user_id')
         if user_id:
             partner_id = self.pool.get('res.users').browse(cr, uid, user_id).partner_id.id