FIX product_catch_weight if line moved doesn't have a lot, then the ratio is implicitly 0 despite having a default ratio.

This commit is contained in:
Jared Kipe
2018-10-16 11:40:31 -07:00
parent 0dd740138d
commit e705aa8ef1
2 changed files with 4 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ class AccountInvoiceLine(models.Model):
move_lines = self.sale_line_ids.mapped('move_ids.move_line_ids')
else:
move_lines = self.purchase_line_id.mapped('move_ids.move_line_ids')
for move_line in move_lines:
for move_line in move_lines.filtered(lambda l: l.lot_id):
qty_done = move_line.qty_done
current_qty_done = qty_done + qty_done_total
r = move_line.lot_id.catch_weight_ratio