Do not delete purchase request with a purchase line when supply stock
The design does not ensure that draft purchase request can not be linked to a purchase line. Closes #12974 (grafted from 88d4acee578219e8c193b56ceb5a4f3bf3d7b1aa) --HG-- branch : 6.0
This commit is contained in:
1 parent
a97a22b359
commit
82cc6ed241
1 file changed
+1
@@ -135,6 +135,7 @@ class PurchaseRequest(metaclass=PoolMeta):
|
||||
products = set(products)
|
||||
reqs = cls.search([
|
||||
('state', '=', 'draft'),
|
||||
('purchase_line', '=', None),
|
||||
('company', '=', company.id),
|
||||
('origin', 'like', 'stock.order_point,%'),
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user