Skip to content
Snippets Groups Projects
Commit f3307e20 authored by yhu-odoo's avatar yhu-odoo
Browse files

[FIX] mrp: skip service when compute kit quantities


Since we can't transfer service product, when compute delivered or
received kit quantities, we should skip the service components.

Task-2566373
PR #72306

closes odoo/odoo#72575

X-original-commit: f86c7c0d
Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
parent c56ba294
No related branches found
No related tags found
No related merge requests found
......@@ -363,6 +363,9 @@ class StockMove(models.Model):
qty_ratios = []
boms, bom_sub_lines = kit_bom.explode(product_id, kit_qty)
for bom_line, bom_line_data in bom_sub_lines:
# skip service since we never deliver them
if bom_line.product_id.type == 'service':
continue
bom_line_moves = self.filtered(lambda m: m.bom_line_id == bom_line)
if bom_line_moves:
if float_is_zero(bom_line_data['qty'], precision_rounding=bom_line.product_uom_id.rounding):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment