-
-
Notifications
You must be signed in to change notification settings - Fork 675
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
[14.0][MIG] stock_lock_lot: Migration to 14.0 #831
Conversation
In the web client, if you type a new lot name and select "create" from the pop-up menu, the client calls the `create()` method with only the name attribute. All the other fields must be passed in the context. As a consequence, stock_lock_lot silently failed to block the lots because it didn't find the product. Fix it by looking for a product id in both the create values and the context.
* Log the reason when a lot is automatically locked This is useful whe custom submodules can lock lots for other reasons. Additional changes : fix the default value for the blocked checkbox (no big deal, it was overwritten anyway) ; migrate create to api v8 ; use AccessError when permissions are wrong. * Unreserve quants when blocking lots Users block lots when there is a problem with it (eg. quality issue), and it's important that no delivery is made when such a problem is found. So blocking is more important than reservations. So, ask for user confirmation when blocking, and then break the reservations. Includes translation into French
… on blocked Serial Numbers/lots." is set as True every time the DB is updated
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-workflow-13.0/stock-logistics-workflow-13.0-stock_lock_lot Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-13-0/stock-logistics-workflow-13-0-stock_lock_lot/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-workflow-13.0/stock-logistics-workflow-13.0-stock_lock_lot Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-13-0/stock-logistics-workflow-13-0-stock_lock_lot/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, IMO a small improvement could be made but not absolutely necessary for a migration.
""" | ||
_locked = product.categ_id.lot_default_locked | ||
categ = product.categ_id.parent_id | ||
while categ and not _locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this could be improved with a search using parent_of
This PR has the |
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at e2720ce. Thanks a lot for contributing to OCA. ❤️ |
Standard migration from 13.0 to 14.0