feat: allow draft pos invoices even if no stock available (#27078)

This commit is contained in:
Saqib 2021-08-24 17:27:27 +05:30 committed by GitHub
parent 9198caa5e7
commit f47cbae5e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ class POSInvoice(SalesInvoice):
.format(item.idx, bold_delivered_serial_nos), title=_("Item Unavailable"))
def validate_stock_availablility(self):
if self.is_return:
if self.is_return or self.docstatus != 1:
return
allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock')