New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] stock: use float comparison to assign moves #32844
Conversation
@len-odoo It seems strange, because the line of code that seems to cause the issue is untouched in the PR. This is our temporary fix class StockMove(models.Model):
_inherit = "stock.move"
def _update_reserved_quantity(self, *args, **kwargs):
return float_round(
super()._update_reserved_quantity(*args, **kwargs),
precision_rounding=self.product_uom.rounding,
) |
We remove the remaining comparisons to use the precision rounding of the UoM. opw 1969888 closes odoo#32707 closes odoo#32745
399d3d7
to
c8066e4
Compare
@gdgellatly AFAICT, the I wonder though, is it mostly unrelated to the code and only a display issue? |
@len-odoo to be honest I never looked at the screen (except when it was wrong). The reserved qty always displayed right on the stock move, wrong on the stock_move_line I just deployed the fix then ran a shell script something like
and moved on to the next problem. Never looked back. EDIT: Although actually, that decoration would never trigger because reserved is always marginally greater the product_uom_qty |
@len-odoo lgtm |
Thank you Simon. |
Merged, thanks! |
We remove the remaining comparisons to use the precision rounding of the UoM.
opw 1969888
closes #32707
closes #32745
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr