[FIX] point_of_sale: rounding error when create picking
When a return picking is created from a POS order, the methods check that the value rounded to the unit of measure is not null. The problem is that a rounding is passed to the function 'float_is_zero' in the parameter precision_digits instead of precision rounding. This bug has been introduced in rev: https://github.com/odoo/odoo/commit/61304087e7f48c677837dabdc8f1f8aeb18fb52e opw-771282
This commit is contained in:
@@ -628,7 +628,7 @@ class PosOrder(models.Model):
|
||||
return_picking = Picking.create(return_vals)
|
||||
return_picking.message_post(body=message)
|
||||
|
||||
for line in order.lines.filtered(lambda l: l.product_id.type in ['product', 'consu'] and not float_is_zero(l.qty, precision_digits=l.product_id.uom_id.rounding)):
|
||||
for line in order.lines.filtered(lambda l: l.product_id.type in ['product', 'consu'] and not float_is_zero(l.qty, precision_rounding=l.product_id.uom_id.rounding)):
|
||||
moves |= Move.create({
|
||||
'name': line.name,
|
||||
'product_uom': line.product_id.uom_id.id,
|
||||
|
||||
Reference in New Issue
Block a user