changeset fc72cc5027f0 in modules/stock_supply:6.2
details:
https://hg.tryton.org/modules/stock_supply?cmd=changeset&node=fc72cc5027f0
description:
Only delete draft requests when generating new ones
We can not rely on purchase_line as purchase_request_quotation adds new
states before the request is purchased that should not be deleted
issue11479
review427161003
(grafted from f4bea63d827ac809f57980bb335031b570017d3d)
diffstat:
purchase_request.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 134b5b978ef7 -r fc72cc5027f0 purchase_request.py
--- a/purchase_request.py Fri Apr 15 21:30:54 2022 +0200
+++ b/purchase_request.py Mon May 16 09:59:27 2022 +0200
@@ -132,7 +132,7 @@
# delete purchase requests without a purchase line
products = set(products)
reqs = cls.search([
- ('purchase_line', '=', None),
+ ('state', '=', 'draft'),
('origin', 'like', 'stock.order_point,%'),
])
reqs = [r for r in reqs