[FIX] purchase: Missing log in procurement chatter when deleting a PO line.
When a PO line is deleted, it sets the related procurements in exception. This fix logs this action in the procurement chatter, for WMS administration and maintenance purposes.
This commit is contained in:
parent
91998e3a5a
commit
cd1366a720
|
@ -1053,7 +1053,9 @@ class purchase_order_line(osv.osv):
|
|||
procurement_obj = self.pool.get('procurement.order')
|
||||
procurement_ids_to_except = procurement_obj.search(cr, uid, [('purchase_line_id', 'in', ids)], context=context)
|
||||
if procurement_ids_to_except:
|
||||
self.pool['procurement.order'].write(cr, uid, procurement_ids_to_except, {'state': 'exception'}, context=context)
|
||||
for po_id in procurement_ids_to_except:
|
||||
procurement_obj.message_post(cr, uid, po_id, body=_('Purchase order line deleted.'), context=context)
|
||||
procurement_obj.write(cr, uid, procurement_ids_to_except, {'state': 'exception'}, context=context)
|
||||
return super(purchase_order_line, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
def onchange_product_uom(self, cr, uid, ids, pricelist_id, product_id, qty, uom_id,
|
||||
|
|
Loading…
Reference in New Issue