mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-08 21:12:32 +00:00
fix: Parent Item of Product Bundle should not appear in dialog (#20222)
* fix: add new delivery note button in Sales Order * fix: parent item should not appear in raw material request dialog
This commit is contained in:
committed by
Nabin Hait
parent
4479b93c1a
commit
03c1396fc7
@@ -135,6 +135,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
}
|
||||
if(doc.status !== 'Closed') {
|
||||
if(doc.status !== 'On Hold') {
|
||||
debugger;
|
||||
|
||||
allow_delivery = this.frm.doc.items.some(item => item.delivered_by_supplier === 0 && item.qty > flt(item.delivered_qty))
|
||||
&& !this.frm.doc.skip_delivery_note
|
||||
|
||||
@@ -380,6 +380,9 @@ class SalesOrder(SellingController):
|
||||
def get_work_order_items(self, for_raw_material_request=0):
|
||||
'''Returns items with BOM that already do not have a linked work order'''
|
||||
items = []
|
||||
item_codes = [i.item_code for i in self.items]
|
||||
product_bundle_parents = [pb.new_item_code for pb in frappe.get_all("Product Bundle", {"new_item_code": ["in", item_codes]}, ["new_item_code"])]
|
||||
|
||||
for table in [self.items, self.packed_items]:
|
||||
for i in table:
|
||||
bom = get_default_bom_item(i.item_code)
|
||||
@@ -391,7 +394,7 @@ class SalesOrder(SellingController):
|
||||
else:
|
||||
pending_qty = stock_qty
|
||||
|
||||
if pending_qty:
|
||||
if pending_qty and i.item_code not in product_bundle_parents:
|
||||
if bom:
|
||||
items.append(dict(
|
||||
name= i.name,
|
||||
|
||||
Reference in New Issue
Block a user