diff --git a/purchase_request/models/purchase_request_allocation.py b/purchase_request/models/purchase_request_allocation.py index 89080c4c674..4b4a3c9b782 100644 --- a/purchase_request/models/purchase_request_allocation.py +++ b/purchase_request/models/purchase_request_allocation.py @@ -85,7 +85,7 @@ class PurchaseRequestAllocation(models.Model): ) def _compute_open_product_qty(self): for rec in self: - if rec.purchase_state in ["cancel", "done"]: + if rec.purchase_state == "cancel": rec.open_product_qty = 0.0 else: rec.open_product_qty = ( diff --git a/purchase_request/models/stock_move_line.py b/purchase_request/models/stock_move_line.py index 33f4153e30d..7e4a4e7f4ad 100644 --- a/purchase_request/models/stock_move_line.py +++ b/purchase_request/models/stock_move_line.py @@ -121,7 +121,7 @@ def allocate(self): if picking_message: ml.move_id.picking_id.message_post( body=Markup(picking_message), - subtype_id=self.env.ref("mail.mt_comment").id, + subtype_id=self.env.ref("mail.mt_note").id, ) allocation._compute_open_product_qty()