From 003a2df5f0be03bde007188fc27314abaac6f45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 21 Mar 2012 09:59:10 +0100 Subject: [PATCH] [FIX] crm_lead: fixed missing argument in message_append_note bzr revid: tde@openerp.com-20120321085910-w8ya3nfg4ivzqt6e --- addons/crm/crm.py | 2 +- addons/crm/crm_lead.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index c3ae2ea51fe..67c9b6da25d 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -368,7 +368,7 @@ class crm_case(crm_base): And need a stage_id field And object that inherit (orm inheritance) from a class the overwrite copy """ - + def stage_find(self, cr, uid, section_id, domain=[], order='sequence'): domain = list(domain) if section_id: diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index e6924a7b2b6..cb2c6a4c1b5 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -300,23 +300,23 @@ class crm_lead(crm_case, osv.osv): def case_mark_lost_send_note(self, cr, uid, ids, context=None): message = _("Opportunity has been lost.") - return self.message_append_note(cr, uid, ids, message, context=context) + return self.message_append_note(cr, uid, ids, _('System notification'), message, context=context) def case_mark_won_send_note(self, cr, uid, ids, context=None): message = _("Opportunity has been won.") - return self.message_append_note(cr, uid, ids, message, context=context) + return self.message_append_note(cr, uid, ids, _('System notification'), message, context=context) def schedule_phonecall_send_note(self, cr, uid, ids, phonecall_id, action, context=None): phonecall = self.pool.get('crm.phonecall').browse(cr, uid, [phonecall_id], context=context)[0] if action == 'log': prefix = 'Logged' else: prefix = 'Scheduled' message = _("%s a call for the %s.") % (prefix, phonecall.date) - return self. message_append_note(cr, uid, ids, 'System Notification', message, context=context) + return self. message_append_note(cr, uid, ids, _('System notification'), message, context=context) def _lead_set_partner_send_note(self, cr, uid, ids, context=None): for lead in self.browse(cr, uid, ids, context=context): message = _("%s partner is now set to %s." % (self.case_get_note_msg_prefix(cr, uid, lead.id, context=context), lead.partner_id.name)) - lead.message_append_note('System Notification' ,message) + lead.message_append_note(_('System notification'), message) return True def case_open(self, cr, uid, ids, context=None): @@ -587,7 +587,7 @@ class crm_lead(crm_case, osv.osv): def convert_opportunity_send_note(self, cr, uid, lead, context=None): message = _("Lead has been converted to an opportunity.") - lead.message_append_note('' ,message) + lead.message_append_note(_('System Notification') ,message) return True def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None): @@ -883,7 +883,7 @@ class crm_lead(crm_case, osv.osv): vals['probability'] = stage.probability for case in self.browse(cr, uid, ids, context=context): message = _("Stage changed to %s.") % (stage.name) - case.message_append_note('', message) + case.message_append_note(_('System Notification'), message) return super(crm_lead,self).write(cr, uid, ids, vals, context) crm_lead()