diff --git a/addons/sale_stock/models/account_move.py b/addons/sale_stock/models/account_move.py index 83867347393..f6eb02b4a7e 100644 --- a/addons/sale_stock/models/account_move.py +++ b/addons/sale_stock/models/account_move.py @@ -45,7 +45,7 @@ class AccountMove(models.Model): previous_qties_delivered = defaultdict(float) stock_move_lines = current_invoice_amls.sale_line_ids.move_ids.move_line_ids.filtered(lambda sml: sml.state == 'done' and sml.lot_id).sorted(lambda sml: (sml.date, sml.id)) for sml in stock_move_lines: - if sml.product_id not in invoiced_products: + if sml.product_id not in invoiced_products or 'customer' not in {sml.location_id.usage, sml.location_dest_id.usage}: continue product = sml.product_id product_uom = product.uom_id