[IMP] crm: log a meeting now calls message_post and writes the meeting information...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 17 Apr 2013 09:09:25 +0000 (11:09 +0200)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 17 Apr 2013 09:09:25 +0000 (11:09 +0200)
bzr revid: qdp-launchpad@openerp.com-20130417090925-l6pdm9v5lq6ify14

1  2 
addons/crm/crm_lead.py

@@@ -1045,6 -1045,14 +1045,14 @@@ class crm_lead(base_stage, format_addre
          message = _("%s a call for %s.%s") % (prefix, phonecall.date, suffix)
          return self.message_post(cr, uid, ids, body=message, context=context)
  
+     def log_meeting(self, cr, uid, ids, meeting_subject, meeting_date, duration, context=None):
+         if not duration:
+             duration = _('unknown')
+         else:
 -            duration = str(duration) + 'h'
 -        message = _("Meeting scheduled at '%s'<br> Subject: %s <br> Duration: %s" % (meeting_date, meeting_subject, duration))
++            duration = str(duration)
++        message = _("Meeting scheduled at '%s'<br> Subject: %s <br> Duration: %s hour(s)") % (meeting_date, meeting_subject, duration)
+         return self.message_post(cr, uid, ids, body=message, context=context)
      def onchange_state(self, cr, uid, ids, state_id, context=None):
          if state_id:
              country_id=self.pool.get('res.country.state').browse(cr, uid, state_id, context).country_id.id