Skip to content
Snippets Groups Projects
Commit ab780a9d authored by Nasreddin (bon)'s avatar Nasreddin (bon)
Browse files

[FIX] mrp: float division by zero

Cause

	When kit BOM line quantity is equal to zero in a sale order, it raise error
	because trying to divide bom_line_data['qty'] / bom_line_data['original_qty']
	when computing kit quantities.

Solution

	As BoMs allow components with 0 qty, a.k.a. optionnal components,
	we simply skip those to avoid a division by zero.

Cherry-pick of #38890

opw-2262540

closes odoo/odoo#52192

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 0e8f8679
No related branches found
No related tags found
No related merge requests found
Loading
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