[FIX] procurement_order: moved a chatter message from user to the procurement.order...
authorThibault Delavallée <tde@openerp.com>
Tue, 14 Aug 2012 19:16:03 +0000 (21:16 +0200)
committerThibault Delavallée <tde@openerp.com>
Tue, 14 Aug 2012 19:16:03 +0000 (21:16 +0200)
bzr revid: tde@openerp.com-20120814191603-u1lsovhurrvuxbm4

addons/procurement/schedulers.py

index 1ad1046..7a87697 100644 (file)
@@ -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()