Test from location when checking warehouse for purchase line with negative quantity

Closes #14333
(grafted from f21002c5cb1882a5cc6e7375aec7db45fc56698f)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2025-10-30 01:11:22 +01:00
1 parent 759a1b5233
commit 5271404566
1 file changed
+5 -1
+5 -1
View File
@@ -745,7 +745,11 @@ class Purchase(
def check_for_quotation(self):
for line in self.lines:
if (not line.to_location
if (line.quantity or 0) >= 0:
location = line.to_location
else:
location = line.from_location
if (not location
and line.product
and line.product.type in ('goods', 'assets')):
raise PurchaseQuotationError(