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

[FIX] stock_account: Avoid divide by 0


closes odoo/odoo#43188

Related: odoo/enterprise#7676
Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent 620730ed
Branches
Tags
No related merge requests found
......@@ -605,6 +605,9 @@ class ProductProduct(models.Model):
"""
self.ensure_one()
if not qty_to_invoice:
return 0
candidates = stock_moves\
.sudo()\
.mapped('stock_valuation_layer_ids')\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment