Merge PR #1718 into 14.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2023-05-22 11:37:52 +00:00

View File

@@ -44,6 +44,7 @@ class StockRequest(models.Model):
res = super().action_cancel()
self.sudo().purchase_ids.filtered(
lambda x: x.state not in ("purchase", "done", "cancel")
and x.stock_request_ids == self
).button_cancel()
return res