[FIX] mrp: call message_post separately

message_post accepts only one id

CLA signature for igallart done at #15625

Closes #15625
This commit is contained in:
Isaac Gallart Bochons 2017-02-27 11:33:43 +01:00 committed by Martin Trigaux
parent 333e7d1f9e
commit 48cebafdaf
No known key found for this signature in database
GPG Key ID: 7B0E288E7C0F83A7
2 changed files with 13 additions and 1 deletions

View File

@ -784,7 +784,8 @@ class mrp_production(osv.osv):
proc_obj = self.pool.get("procurement.order")
procs = proc_obj.search(cr, uid, [('production_id', 'in', ids)], context=context)
if procs:
proc_obj.message_post(cr, uid, procs, body=_('Manufacturing order cancelled.'), context=context)
for proc in procs:
proc_obj.message_post(cr, uid, proc, body=_('Manufacturing order cancelled.'), context=context)
proc_obj.write(cr, uid, procs, {'state': 'exception'}, context=context)
return True

View File

@ -0,0 +1,11 @@
Spain, 2017-02-27
I hereby agree to the terms of the Odoo Individual Contributor License
Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this
declaration.
Signed,
Isaac Gallart Bochons igallart@puntsistemes.es https://github.com/igallart