packing list issue fixed
This commit is contained in:
parent
255d58b3a0
commit
510eda353a
@ -410,7 +410,7 @@ class DocType(TransactionBase):
|
||||
|
||||
if self.has_sales_bom(d.item_code):
|
||||
for p in getlist(obj.doclist, 'packing_details'):
|
||||
if p.parent_detail_docname == d.name:
|
||||
if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
|
||||
# the packing details table's qty is already multiplied with parent's qty
|
||||
il.append({
|
||||
'warehouse': d.warehouse,
|
||||
@ -525,7 +525,9 @@ class DocType(TransactionBase):
|
||||
if [d.item_code, d.name] not in parent_items:
|
||||
parent_items.append([d.item_code, d.name])
|
||||
|
||||
self.cleanup_packing_list(obj, parent_items)
|
||||
obj.doclist = self.cleanup_packing_list(obj, parent_items)
|
||||
|
||||
return obj.doclist
|
||||
|
||||
def cleanup_packing_list(self, obj, parent_items):
|
||||
"""Remove all those child items which are no longer present in main item table"""
|
||||
@ -546,6 +548,8 @@ class DocType(TransactionBase):
|
||||
where name in (%s)"""
|
||||
% (", ".join(["%s"] * len(delete_list))),
|
||||
tuple(delete_list))
|
||||
|
||||
return obj.doclist
|
||||
|
||||
# Get total in words
|
||||
# ==================================================================
|
||||
|
@ -316,7 +316,7 @@ class DocType(TransactionBase):
|
||||
sales_com_obj.validate_max_discount(self,'sales_order_details')
|
||||
# this is to verify that the allocated % of sales persons is 100%
|
||||
sales_com_obj.get_allocated_sum(self)
|
||||
sales_com_obj.make_packing_list(self,'sales_order_details')
|
||||
self.doclist = sales_com_obj.make_packing_list(self,'sales_order_details')
|
||||
|
||||
# get total in words
|
||||
dcc = TransactionBase().get_company_currency(self.doc.company)
|
||||
|
@ -434,7 +434,7 @@ class DocType(TransactionBase):
|
||||
|
||||
|
||||
def on_update(self):
|
||||
get_obj('Sales Common').make_packing_list(self,'delivery_note_details')
|
||||
self.doclist = get_obj('Sales Common').make_packing_list(self,'delivery_note_details')
|
||||
self.set_actual_qty()
|
||||
get_obj('Stock Ledger').scrub_serial_nos(self)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user