Delete purchase request when the product is deleted

Closes #12917
This commit is contained in:
Cédric Krier
2024-05-11 11:58:40 +02:00
parent b8c759594e
commit 441abbfbf8
+1 -1
View File
@@ -28,7 +28,7 @@ class PurchaseRequest(ModelSQL, ModelView):
__name__ = 'purchase.request'
product = fields.Many2One(
'product.product', "Product", readonly=True,
'product.product', "Product", readonly=True, ondelete='CASCADE',
domain=[
If((Eval('state') == 'draft')
& ~(Eval('quantity', 0) < 0),