[REF]crm_lead, crm_meeting: minor changes to follow pep8 standard

bzr revid: csn@openerp.com-20130416074335-qx8c6f4fjueknjk9
This commit is contained in:
Cedric Snauwaert 2013-04-16 09:43:35 +02:00
parent e38a28a2b7
commit 6ca0770257
2 changed files with 5 additions and 5 deletions

View File

@ -1047,10 +1047,10 @@ class crm_lead(base_stage, format_address, osv.osv):
def log_meeting(self, cr, uid, ids, meeting_subject, meeting_date, duration, context=None):
if not duration:
duration = 'unknow'
duration = _('unknown')
else:
duration = str(duration)+'h'
message = _("Meeting: '%s' has been scheduled at '%s' <br> Duration: %s" % (meeting_subject, meeting_date, duration))
duration = str(duration) + 'h'
message = _("Meeting scheduled at '%s'<br> Subject: %s <br> Duration: %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):

View File

@ -35,10 +35,10 @@ class crm_meeting(osv.Model):
}
def create(self, cr, uid, vals, context=None):
res = super(crm_meeting,self).create(cr, uid, vals, context=context)
res = super(crm_meeting, self).create(cr, uid, vals, context=context)
obj = self.browse(cr, uid, res, context=context)
if obj.opportunity_id:
self.pool.get('crm.lead').log_meeting(cr, uid, obj.opportunity_id.id, obj.name, obj.date, obj.duration, context=context)
self.pool.get('crm.lead').log_meeting(cr, uid, [obj.opportunity_id.id], obj.name, obj.date, obj.duration, context=context)
return res