Skip to content

[19.0][MIG] sale_invoice_policy: Migration to 19.0#4071

Open
therbin200 wants to merge 62 commits intoOCA:19.0from
apikcloud:19.0-mig-sale_invoice_policy
Open

[19.0][MIG] sale_invoice_policy: Migration to 19.0#4071
therbin200 wants to merge 62 commits intoOCA:19.0from
apikcloud:19.0-mig-sale_invoice_policy

Conversation

@therbin200
Copy link
Copy Markdown

@therbin200 therbin200 commented Dec 12, 2025

Dependency PR for module :
base_partition: #3465

rousseldenis and others added 30 commits December 12, 2025 09:58
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/
Currently translated at 100.0% (17 of 17 strings)

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

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/
Currently translated at 100.0% (17 of 17 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/pt/
Currently translated at 70.6% (12 of 17 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/fr/
Currently translated at 100.0% (17 of 17 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/fr/
Currently translated at 100.0% (17 of 17 strings)

Translation: sale-workflow-13.0/sale-workflow-13.0-sale_invoice_policy
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_invoice_policy/es_MX/
@therbin200 therbin200 force-pushed the 19.0-mig-sale_invoice_policy branch 5 times, most recently from cba46fd to 3e4e629 Compare December 12, 2025 10:33
@therbin200
Copy link
Copy Markdown
Author

therbin200 commented Dec 12, 2025

The precommit doesn't generat requirements.txt file. And if I try to make it manually, pre-commit automatically deletes it

Comment thread sale_invoice_policy/pyproject.toml Outdated
requires = ["whool"]
build-backend = "whool.buildapi"
[project]
name = "odoo-addons-oca-base_partition"
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.

@therbin200 You should not do that.

To include open PR's dependencies, you should follow: https://github.com/OCA/maintainer-tools/wiki/Use-temporary-reference%28s%29-to-another-pull-request%28s%29

Thanks

@therbin200 therbin200 force-pushed the 19.0-mig-sale_invoice_policy branch from 3e4e629 to 234b0ea Compare December 12, 2025 13:28
@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot migration sale_invoice_policy

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Dec 12, 2025
@rousseldenis
Copy link
Copy Markdown
Contributor

The precommit doesn't generat requirements.txt file. And if I try to make it manually, pre-commit automatically deletes it

That's normal. The dependent addon is not yet merged.

@therbin200
Copy link
Copy Markdown
Author

The precommit doesn't generat requirements.txt file. And if I try to make it manually, pre-commit automatically deletes it

That's normal. The dependent addon is not yet merged.

So the pre-commit looks for the github repository dependencies, and not the local one on my computer ? How do I do in this case to pass the check on the PR ?

@therbin200 therbin200 force-pushed the 19.0-mig-sale_invoice_policy branch 3 times, most recently from 37a357a to bfb933c Compare December 16, 2025 09:27
@therbin200 therbin200 force-pushed the 19.0-mig-sale_invoice_policy branch from bfb933c to e05a008 Compare December 16, 2025 09:34
@therbin200
Copy link
Copy Markdown
Author

Okay, everything must be okay now :)

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.

Thanks for the migration, @therbin200.

The code is a clean port from 18.0 -- models, views, hooks, and tests are all unchanged, which is exactly what you want for a straightforward migration. Tests pass on both Odoo and OCB, pre-commit is green, and the pyproject.toml issue @rousseldenis flagged has been addressed.

One thing to clean up:

  • "base" was added to depends in __manifest__.py, but it's redundant since sale_stock already pulls it in transitively. The 18.0 manifest doesn't include it either. Removing it keeps the dependency tree accurate.

Minor observations (non-blocking):

  • The .po translation files still carry references to the old invoice_policy_required / sale_invoice_policy_required fields that were removed in the 18.0 refactor. Not harmful (Odoo ignores orphaned translations), but they could be cleaned up with a fresh msgmerge against the updated .pot.
  • The "Detect unreleased dependencies" CI failure is expected since base_partition (OCA/server-tools#3465) hasn't been merged yet. The test-requirements.txt workaround is set up correctly.

Overall this looks good -- just the "base" dependency to drop.

"category": "Sales Management",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"depends": ["base", "sale_stock", "base_partition"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"base" is redundant here -- sale_stock already depends on it transitively. The 18.0 version doesn't list it either. Suggest removing it to keep the dependency declaration accurate.

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.

Thanks for the work on this, @therbin200. As noted in my earlier comment, there's still one item to address before this can be approved:

The "base" dependency in __manifest__.py is redundant -- sale_stock already depends on it transitively, and the 18.0 manifest doesn't include it. Please remove it to keep the dependency tree clean.

Everything else looks solid: the models, views, hooks, and tests are a clean port from 18.0, tests pass on both Odoo and OCB, and pre-commit is green.

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.