Skip to content
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

[12.0][ADD] stock_realign_move_and_quants #1284

Merged
merged 3 commits into from Sep 7, 2022

Conversation

robinkeunen
Copy link

@robinkeunen robinkeunen commented Oct 25, 2021

A bug in Odoo 12 leads to the desynchronisation of the stock
quants and the stock move lines. The root cause has yet to be found.
This modules fixes the symptoms and not the cause. It aims to

  1. Realign the stock quants and the stock move lines
  2. Correct on the fly future desynchronisation

To do that, we assume the source of truth are the move lines rather than
the quants.

CAREFUL : this module has not been tested on a warehouse with multi-location or using packages.

More information on this issue: odoo/odoo#62139

@robinkeunen robinkeunen changed the title [ADD] stock_realign_move_and_quants [12.0][ADD] stock_realign_move_and_quants Oct 25, 2021
@robinkeunen robinkeunen force-pushed the 12.0-stock-realign-move-and-quants branch from ad02047 to 96ca0d1 Compare October 25, 2021 16:07
@robinkeunen
Copy link
Author

Compared to @gurneyalex 's gists, I changed

  • the comparison in the wizard uses float_compare
  • removed def fix_reserved_quantity_in_quants in stock.quant (unused)
  • adding inventory line, fixing the quants and computing inventory line's theoretical quantity is done in one pass on the problematic quantities.

@rousseldenis
Copy link
Sponsor Contributor

/ocabot rebase

@OCA-git-bot
Copy link
Contributor

@rousseldenis The rebase process failed, because command git push --force coopiteasy tmp-pr-1284:12.0-stock-realign-move-and-quants failed with output:

remote: Permission to coopiteasy/stock-logistics-warehouse.git denied to OCA-git-bot.
fatal: unable to access 'https://github.com/coopiteasy/stock-logistics-warehouse/': The requested URL returned error: 403

@rousseldenis
Copy link
Sponsor Contributor

@robinkeunen Could you rebase ?

@rousseldenis rousseldenis added this to the 12.0 milestone Sep 7, 2022
Some products may have existing stock moves while not being
of type product (those product where of type 'product' before).
@robinkeunen robinkeunen force-pushed the 12.0-stock-realign-move-and-quants branch from 6a5c0d5 to e49a30d Compare September 7, 2022 10:50
@robinkeunen
Copy link
Author

@rousseldenis here you go

@robinkeunen robinkeunen force-pushed the 12.0-stock-realign-move-and-quants branch from e49a30d to 89514ef Compare September 7, 2022 10:54
Copy link
Sponsor Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review. LGTM

@rousseldenis
Copy link
Sponsor Contributor

@robinkeunen Don't forget to install pre-commit locally

@robinkeunen robinkeunen force-pushed the 12.0-stock-realign-move-and-quants branch from 89514ef to 9428e9a Compare September 7, 2022 12:16
@rousseldenis
Copy link
Sponsor Contributor

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 12.0-ocabot-merge-pr-1284-by-rousseldenis-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d3c8f5a into OCA:12.0 Sep 7, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at f4d5dc5. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants