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

[18.0][MIG] purchase_delivery_split_date: Migration to 18.0 #2519

Open
wants to merge 46 commits into
base: 18.0
Choose a base branch
from

Conversation

vvrossem
Copy link
Contributor

No description provided.

Lionel Sausin and others added 30 commits January 17, 2025 10:41
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
Nikul-OSI and others added 16 commits January 17, 2025 10:52
Currently translated at 100.0% (3 of 3 strings)

Translation: purchase-workflow-15.0/purchase-workflow-15.0-purchase_delivery_split_date
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_delivery_split_date/pt_BR/
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.
@vvrossem vvrossem force-pushed the 18.0-mig-purchase_delivery_split_date branch from 99eb618 to 38754e4 Compare January 17, 2025 10:41
Comment on lines +157 to +158
f"There must be 2 pickings for the PO when confirmed. "
f"{len(self.po.picking_ids)} found",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

UP031 Use format specifiers instead of percent format

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

Successfully merging this pull request may close these issues.