From 8d315a6573e21456f280268a1113b1cc9042a75a Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Thu, 31 Mar 2022 16:17:51 +0530 Subject: [PATCH] fix: 'int' object has no attribute 'is_draft' --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 885e3882287..96975e9d116 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -214,7 +214,7 @@ class POSInvoice(SalesInvoice): if self.is_return: return - if self.docstatus.is_draft() and not frappe.db.get_value( + if self.docstatus == 0 and not frappe.db.get_value( "POS Profile", self.pos_profile, "validate_stock_on_save" ): return