Merge lp://staging/~numerigraphe-team/ocb-addons/7.0-fill_inventory_zero_qty into lp://staging/ocb-addons

Proposed by Loïc Bellier - Numérigraphe
Status: Rejected
Rejected by: Holger Brunn (Therp)
Proposed branch: lp://staging/~numerigraphe-team/ocb-addons/7.0-fill_inventory_zero_qty
Merge into: lp://staging/ocb-addons
Diff against target: 79 lines (+15/-10)
2 files modified
stock/stock.py (+3/-1)
stock/wizard/stock_fill_inventory.py (+12/-9)
To merge this branch: bzr merge lp://staging/~numerigraphe-team/ocb-addons/7.0-fill_inventory_zero_qty
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Disapprove
Lionel Sausin - Initiatives/Numérigraphe (community) co-author Abstain
Laetitia Gangloff (Acsone) Pending
Review via email: mp+223929@code.staging.launchpad.net

Description of the change

In v7.0, when a Physical inventory is filled with the wizard, the quantity of products is computed by summing all the stock moves, but it's not rounded to the correct precision.
This can lead to tiny differences when validating the inventory.

Our previous patch work with v6.0, but not with v7.0 because _compute_qty_obj function has been refactored.
This is the patch for v7.0.

To post a comment you must log in.
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

The problem with this patch is that the UoM API always does a "ceiling" rounding, which is fine hen computing totals but not when computing differences.

review: Needs Fixing
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

This seems to fix the rounding issues we still encountered with precision=0.01.
It's still not the exact same rounding rules as the computation of qty_available but it should be close enough.

review: Abstain
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) :
review: Approve (co-author)
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) :
review: Abstain (co-author)
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

Uh. still another mistake in this patch. Sorry, this is annoying for us too. Will post an updated patch.

Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

Equivalent branch proposed upstream here https://github.com/odoo/odoo/pull/651

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Development for 7.0 has moved to github on https://github.com/OCA/ocb - please move your merge proposal there if it is still valid.

(I close and reject this in order to have a cleaner overview for 6.1 MPs which indeed have to be done on launchpad)

review: Disapprove

Unmerged revisions

10216. By Loïc Bellier - Numérigraphe

[FIX]: Bad rounding uom

10215. By Numérigraphe

[FIX] round at the end of the computation, and don't convert when UoM is the same to avoid ceiling effect. This is still not exactly the way qty_available is computed and rounded but it's the closest we get.

10214. By Loïc Bellier - Numérigraphe

[FIX]: Add missing import for rounding

10213. By Loïc Bellier - Numérigraphe

[FIX]: Fix Rounding bug computation on stock moves loop.

10212. By Loïc Bellier - Numérigraphe

[FIX]: Fixing rouding problem with unit of mesure with precision > 2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.