File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,10 +214,13 @@ def _compute_declared_value(self):
214214 if not bom_quantity :
215215 continue
216216 rec_move = rec .move_ids .filtered (lambda m : m ._origin .id == move .id )
217+ if not rec_move :
218+ continue
217219 picking_avg .append (move .product_uom_qty / bom_quantity )
218220 done_avg .append (rec_move .quantity / bom_quantity )
219- picking_value += so_bom_line .price_reduce_taxexcl * (sum (picking_avg ) / len (picking_avg ))
220- done_value += so_bom_line .price_reduce_taxexcl * (sum (done_avg ) / len (done_avg ))
221+ if picking_avg and done_avg :
222+ picking_value += so_bom_line .price_reduce_taxexcl * (sum (picking_avg ) / len (picking_avg ))
223+ done_value += so_bom_line .price_reduce_taxexcl * (sum (done_avg ) / len (done_avg ))
221224
222225 declared_value = picking_value if inmediate_transfer else done_value
223226 if pricelist :
You can’t perform that action at this time.
0 commit comments