[MERGE] merge with main branch
authorAmit Vora <avo@tinyerp.com>
Wed, 12 Mar 2014 09:07:34 +0000 (14:37 +0530)
committerAmit Vora <avo@tinyerp.com>
Wed, 12 Mar 2014 09:07:34 +0000 (14:37 +0530)
bzr revid: avo@tinyerp.com-20140312090734-1m11cnuavrgl92it

1  2 
addons/calendar/calendar.py
addons/crm/crm_lead.py
addons/crm/crm_phonecall_menu.xml
addons/crm/crm_phonecall_view.xml

@@@ -790,18 -786,7 +786,19 @@@ class calendar_event(osv.Model)
                  data.update(update_data)
                  self.write(cr, uid, ids, data, context=context)
          return True
 +    
 +    def default_get(self, cr, uid, fields, context=None):
 +        res = super(calendar_event, self).default_get(cr, uid, fields, context=context)
 +        if context.get('active_model') == 'res.partner':
 +            if context.get('user_id'):
 +                res.update({'partner_ids' : [self.pool['res.users'].browse(cr, uid, context.get('user_id'), context=context).partner_id.id]})
 +        
 +        if context.get('active_model') == 'crm.lead':
 +            if context.get('partner_id'):
 +                res.update({'partner_ids' : [context.get('partner_id')]})
 +        return res
 +        
      def _tz_get(self, cr, uid, context=None):
          return [(x.lower(), x) for x in pytz.all_timezones]
  
Simple merge
Simple merge
Simple merge