refactor: Consolidate duplicate zero-quantity transaction Items checks.
This commit is contained in:
@@ -7,7 +7,7 @@ from frappe import _, bold, throw
|
||||
from frappe.utils import cint, flt, get_link_to_form, nowtime
|
||||
|
||||
from erpnext.accounts.party import render_address
|
||||
from erpnext.controllers.accounts_controller import InvalidQtyError, get_taxes_and_charges
|
||||
from erpnext.controllers.accounts_controller import get_taxes_and_charges
|
||||
from erpnext.controllers.sales_and_purchase_return import get_rate_for_return
|
||||
from erpnext.controllers.stock_controller import StockController
|
||||
from erpnext.stock.doctype.item.item import set_item_default
|
||||
@@ -295,10 +295,6 @@ class SellingController(StockController):
|
||||
def get_item_list(self):
|
||||
il = []
|
||||
for d in self.get("items"):
|
||||
if d.qty is None:
|
||||
message = _("Row {0}: Qty is mandatory").format(d.idx)
|
||||
frappe.throw(message, InvalidQtyError)
|
||||
|
||||
if self.has_product_bundle(d.item_code):
|
||||
for p in self.get("packed_items"):
|
||||
if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
|
||||
|
||||
Reference in New Issue
Block a user