[6.0] Picking validation has rounding errors with uom computation

Bug #872242 reported by Marco Dieckhoff
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
OpenERP Publisher's Warranty Team

Bug Description

This is a follow-up, not a duplicate, to bug lp:862449.

Processing an internal picking, I got the message:

=> Processing quantity 36.256 kg for $PRODUCT is larger than the available quantity 36.256 kg!

(note that the 3 decimals originate from my fix of bug lp:862449, if you don't have them while trying to reproduce)

The message comes from a test "if calc_qty > move.move_id.product_qty:", but only the originating move.quantity, not the calculated calc_qty was shown in the error message. So I enhanced the message to show calc_qty.

=> Processing quantity 36.256 kg (36.26) for $PRODUCT is larger than the available quantity 36.256 kg !

Looks like calc_qty did not compute in expected decimal precision, but had rounding errors.
If found this to be originating from a wrong user setting at the Rounding Precision setting of the used uom, which was set to 0.01 while the dp for Product_UoM was 3.

Ok, user problem you might say, but nevertheless, a normal user can't see WHY his processing failed, and even our experts didn't figure it out, until I did extensive debugging.

I therefore enhanced the error messages by a note "Please note that there may be rounding issues due to the Unit of Measurement rounding precision.", if the decimals vary.

Example:

Processing Error
Can not process quantity 0.002 for Product $PRODUCT !
Please note that there may be rounding issues due to the Unit of Measurement rounding precision. (UoM computed quantity is 0.0 kg)

(Please note that rev. 4802 was not applied, otherwise this specific example message would not have shown)

Please take a look at the following merge proposal.

Tags: maintenance

Related branches

tags: added: maintenance
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

It seems this issue has been fixed meanwhile into stable and no longer affects!
Hence I am closing this bug report.

Thanks

Changed in openobject-addons:
status: New → Fix Released
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

It is fixed under this revision,
stable 6.0 , r5138, Revision ID: <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.