From: Thibault Delavallée Date: Tue, 14 Aug 2012 19:16:03 +0000 (+0200) Subject: [FIX] procurement_order: moved a chatter message from user to the procurement.order... X-Git-Tag: 7.0-server~2454^2~5 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=9532bbb033b4b3a4285e5cc2341ef47413aac255;p=odoo%2Fodoo.git [FIX] procurement_order: moved a chatter message from user to the procurement.order; deleted second message_append_note that was never called, because of a void variable. bzr revid: tde@openerp.com-20120814191603-u1lsovhurrvuxbm4 --- diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py index 1ad1046..7a87697 100644 --- a/addons/procurement/schedulers.py +++ b/addons/procurement/schedulers.py @@ -131,7 +131,7 @@ class procurement_order(osv.osv): Exceptions:\n""") % (start_date, end_date, report_total, report_except, report_later) summary += '\n'.join(report) - self.pool.get('res.users').message_append_note(cr, uid, [uid], body=summary, context=context) + procurement_obj.message_append_note(cr, uid, ids, body=summary, context=context) if use_new_cursor: cr.commit() @@ -234,7 +234,6 @@ class procurement_order(osv.osv): location_obj = self.pool.get('stock.location') procurement_obj = self.pool.get('procurement.order') wf_service = netsvc.LocalService("workflow") - report = [] offset = 0 ids = [1] if automatic: @@ -288,9 +287,6 @@ class procurement_order(osv.osv): offset += len(ids) if use_new_cursor: cr.commit() - if user_id and report: - # Chatter: old res.request is now a chatter on res.users, id=uid - self.pool.get('res.users').message_append_note(cr, uid, [user_id], body='\n'.join(report), subject=_('Orderpoint report'), context=context) if use_new_cursor: cr.commit() cr.close()