Skip to content

[19.0][MIG] sale_delivery_split_date: Migration to 19.0#3948

Merged
OCA-git-bot merged 24 commits intoOCA:19.0from
Tatider:19.0-mig-sale-delivery-split-date
Mar 26, 2026
Merged

[19.0][MIG] sale_delivery_split_date: Migration to 19.0#3948
OCA-git-bot merged 24 commits intoOCA:19.0from
Tatider:19.0-mig-sale-delivery-split-date

Conversation

@Tatider
Copy link
Copy Markdown

@Tatider Tatider commented Oct 15, 2025

  • An update of tests was required because in Odoo 19.0, the database by default doesn't have Demo Data.

Depends on:

@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot migration sale_delivery_split_date

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Oct 18, 2025
Comment thread sale_delivery_split_date/models/sale_order_line.py
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Sale Delivery Split Date</title>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this change generated by pre-commit? Strange change to <title>README.rst</title>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, it is precommit doing the change...

Copy link
Copy Markdown
Contributor

@yankinmax yankinmax left a comment

Choose a reason for hiding this comment

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

pre-approve considering a question

@Tatider Tatider force-pushed the 19.0-mig-sale-delivery-split-date branch from dfe8fef to 9bebdaf Compare December 9, 2025 13:56
@Tatider
Copy link
Copy Markdown
Author

Tatider commented Dec 9, 2025

One of the dependencies to be renamed, waiting for the final name to be defined - "#3947"

@Tatider Tatider force-pushed the 19.0-mig-sale-delivery-split-date branch from 9bebdaf to 99c6967 Compare December 18, 2025 09:31
@Tatider
Copy link
Copy Markdown
Author

Tatider commented Dec 18, 2025

One of the dependencies to be renamed, waiting for the final name to be defined - "#3947"

Updated

Copy link
Copy Markdown
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

small comment, non blocking

if self.commitment_date:
comm_date = self._get_security_lead_time_commitment_date()
vals["name"] += "/" + format_date(self.env, comm_date.date())
vals["name"] = (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe it's just me, but I found it was more readable before.
Why this change? it doesn't seem like an useful diff

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

To my understanding, usage of "+=" for strings is considered a bad practice, bacause it might lead to unxpected errors when one of arguments is not a string, f.e. "False" as it might be with Sale Line Name

tafaRU and others added 17 commits January 21, 2026 08:40
* [ADD] sale_delivery_split_date module

* [ADD] sale_delivery_split_date: add computed min_dt to allow deliveries to be searchable by the scheduled date
Note that sale_delivery_split_date is not compatible with sale_procurement_group_by_commitment_date
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_delivery_split_date
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_delivery_split_date/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_delivery_split_date
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_delivery_split_date/
Currently translated at 100.0% (2 of 2 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_delivery_split_date
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_delivery_split_date/it/
@Tatider Tatider force-pushed the 19.0-mig-sale-delivery-split-date branch from 99c6967 to d2b71a9 Compare January 21, 2026 06:43
@yaracchi
Copy link
Copy Markdown

Are the 2 failing checks blocking or this can be used?

@Tatider Tatider force-pushed the 19.0-mig-sale-delivery-split-date branch from d2b71a9 to b251c21 Compare January 27, 2026 07:37
@Tatider
Copy link
Copy Markdown
Author

Tatider commented Jan 27, 2026

Are the 2 failing checks blocking or this can be used?

It could be used. Warnings were about test coverage and the old status of dependencies.
Anyway, all is resolved now.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@yankinmax
Copy link
Copy Markdown
Contributor

Hello @rousseldenis can this PR be merged now? All suggestions are taken into account.

gediminasvenc added a commit to linserv/sale-workflow that referenced this pull request Feb 12, 2026
@imlopes
Copy link
Copy Markdown

imlopes commented Feb 23, 2026

Hello @OCA/crm-sales-marketing-maintainers

Could you check and merge this PR ?
It seems all comments are fixed and it's ready.

Thanks a lot

Copy link
Copy Markdown

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Thorough migration from 18.0 to 19.0. The module correctly adapts to the renamed dependency (sale_procurement_group_by_line -> sale_stock_reference_by_line) and the new stock.reference model API. Both dependency PRs (#3946, #3947) are merged. CI is fully green.

Key migration changes reviewed:

  1. Dependency update -- sale_procurement_group_by_line renamed to sale_stock_reference_by_line with comment # ex. sale_procurement_group_by_line for traceability. Good.

  2. API adaptation -- _prepare_procurement_group_vals() correctly renamed to _prepare_reference_vals() to match the new base module API. The string concatenation refactored from vals["name"] += to explicit vals.get("name", "") + ... -- reasonable defensive approach as discussed in prior review comments.

  3. _prepare_procurement_values -- Method signature correctly drops the group_id parameter to match the 19.0 base. The walrus operator usage (if line_com_date := self.commitment_date:) is clean and was already reviewed/approved. The addition of date_deadline=line_com_date alongside date_planned is a welcome improvement to propagate the commitment date as the move deadline.

  4. Tests -- Properly adapted from TransactionCase to TestSaleStockCommon to avoid demo data dependency (which Odoo 19.0 no longer provides by default). All procurement_group_id references updated to stock_reference_id. New test_wo_a_date test covers the no-commitment-date edge case. The test_check_same_dates and security lead time tests now also verify date_deadline on stock moves -- good additional coverage.

  5. Views -- stock_picking.xml unchanged from 18.0 logic, makes scheduled_date visible in tree and searchable. Standard OCA pattern.

No blocking issues found. LGTM.

Copy link
Copy Markdown
Contributor

@paulius-sladkevicius paulius-sladkevicius left a comment

Choose a reason for hiding this comment

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

LGTM

@yankinmax
Copy link
Copy Markdown
Contributor

Hello @OCA/crm-sales-marketing-maintainers

Could you check and merge this PR ?

@yankinmax
Copy link
Copy Markdown
Contributor

Hello @rousseldenis can you pls merge this PR?

@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 19.0-ocabot-merge-pr-3948-by-rousseldenis-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 7a9d30e into OCA:19.0 Mar 26, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at c31ef91. 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.