Skip to content

Conversation

@Tatider
Copy link

@Tatider Tatider commented Nov 4, 2025

No description provided.

Lionel Sausin and others added 30 commits November 3, 2025 16:20
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
FernandoRomera and others added 28 commits November 3, 2025 16:20
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/
@Tatider Tatider force-pushed the 19.0-mig-purchase_delivery_split_date branch from 8d71a37 to d67044f Compare November 4, 2025 09:35
@Tatider Tatider mentioned this pull request Nov 4, 2025
75 tasks
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.