fix in packing list issue

This commit is contained in:
Anand Doshi 2012-05-29 11:29:52 +05:30
parent 53bac88d92
commit 2ac77beb50
2 changed files with 5 additions and 1 deletions

View File

@ -437,6 +437,10 @@ class DocType(TransactionBase):
pi.serial_no = cstr(line.serial_no)
pi.batch_no = cstr(line.batch_no)
pi.idx = self.packing_list_idx
# has to be saved, since this function is called on_update of delivery note
pi.save()
self.packing_list_idx += 1

View File

@ -182,7 +182,6 @@ class DocType(TransactionBase):
#self.validate_prevdoc_details()
self.validate_reference_value()
self.validate_for_items()
sales_com_obj.make_packing_list(self,'delivery_note_details')
sales_com_obj.validate_max_discount(self, 'delivery_note_details') #verify whether rate is not greater than max discount
sales_com_obj.get_allocated_sum(self) # this is to verify that the allocated % of sales persons is 100%
sales_com_obj.check_conversion_rate(self)
@ -474,6 +473,7 @@ class DocType(TransactionBase):
# on update
def on_update(self):
get_obj('Sales Common').make_packing_list(self,'delivery_note_details')
self.set_actual_qty()
get_obj('Stock Ledger').scrub_serial_nos(self)