-
-
Notifications
You must be signed in to change notification settings - Fork 896
[MIG] purchase_delivery_split_date: Migration to 19.0 #2876
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
Open
Tatider
wants to merge
60
commits into
OCA:19.0
Choose a base branch
from
Tatider:19.0-mig-purchase_delivery_split_date
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use v8 API Follow the OCA guidelines for manifest and README PEP8 Extend _create_stock_move because the method we used to extend in v7 doesn't exist anymore.
Currently translated at 100.0% (2 of 2 strings) Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_delivery_split_date/zh_CN/
Currently translated at 100.0% (2 of 2 strings) Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_delivery_split_date/pt_BR/
This changeset implements a missing part in the module description. If you have a purchase order with several lines, confirmed, then you change the dates on some of the line, this would be reflected in the related stock moves but not in the stock pickings which would not be split or merged by date.
Currently translated at 100.0% (3 of 3 strings) Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_delivery_split_date/de/
Currently translated at 100.0% (3 of 3 strings) Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_delivery_split_date/fr/
Currently translated at 100.0% (3 of 3 strings) Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_delivery_split_date/pt_BR/
* [FIX] when adding a new line on a confirmed PO, split the delivery (this was done only if a date was changed on an existing line) * [IMP] when the quantity on a line is changed, the onchange would reset the planned date -> change this to prevent setting a date earlier than the one on the line, since if we are using this module the user probably has manually set the date first
On an order already confirmed, if a scheduled date is changed on an existing line, the move is correctly assign to the picking. But if a line is added with it is not the case, this changes fixes that.
If the date_planned is not set to the user timezone before grouping into days. It can lead to having multiple picking when not needed. Check unit test.
When there is multiple pickings with the same planned date on entering the function `_check_split_pickings` the moves are not grouped in one picking. This can happen if the picking planned date is changed by another module on the call to super in the write method. This resolve that issue.
Comparing date and bool throws exception
Currently translated at 66.6% (2 of 3 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_delivery_split_date/it/
Currently translated at 100.0% (3 of 3 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_delivery_split_date/es/
When there was a grouping key (aka a date_planned) that only corresponds to PO lines that are services, a picking was created and left empty.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_delivery_split_date/
In order to not browsing the purchase order when splitting, do the split directly on purchase order lines as we have the modified recordset (for date_planned field). Use partition() function in order to group lines per date then per picking to improve readability. Use the standard move picking assignation (_assign_picking()) and add the grouping date in the domain.
Fix po line addition. Reduce the amount of canceled picking. Ensure there one picking per date even when different time. Ensure po line planned time is kept on move deadline. Make proper date comparison timezone aware. Changing the deadline on a move linked to a PO will also trigger the split by date. Only rely on picking assignation domain for checking if the picking is still right.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_delivery_split_date/
Currently translated at 100.0% (3 of 3 strings) Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_delivery_split_date Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_delivery_split_date/it/
8d71a37 to
d67044f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.