Skip to content

[19.0] [MIG] contract: Migration to 19.0#1312

Open
BhaveshHeliconia wants to merge 271 commits into
OCA:19.0from
HeliconiaIO:19.0-mig-contract
Open

[19.0] [MIG] contract: Migration to 19.0#1312
BhaveshHeliconia wants to merge 271 commits into
OCA:19.0from
HeliconiaIO:19.0-mig-contract

Conversation

@BhaveshHeliconia
Copy link
Copy Markdown
Contributor

No description provided.

@BhaveshHeliconia BhaveshHeliconia force-pushed the 19.0-mig-contract branch 2 times, most recently from b18f362 to 885e5a6 Compare October 8, 2025 12:17
@tishmen
Copy link
Copy Markdown

tishmen commented Oct 17, 2025

@BhaveshHeliconia can you please handle the failing tests so we can push this forward?

@BhaveshHeliconia BhaveshHeliconia force-pushed the 19.0-mig-contract branch 5 times, most recently from a38846e to c99f54f Compare October 17, 2025 03:57
@mamcode
Copy link
Copy Markdown
Member

mamcode commented Oct 27, 2025

@BhaveshHeliconia could you please re-run the CI checks?
I’ve tested locally with the latest ghcr.io/oca/oca-ci:py3.11-19.0 image, and it seems the CI is using an outdated cache because I am getting different errors from unit tests.

@BhaveshHeliconia BhaveshHeliconia force-pushed the 19.0-mig-contract branch 2 times, most recently from a653227 to 3251a90 Compare November 12, 2025 12:05
@BhaveshHeliconia
Copy link
Copy Markdown
Contributor Author

@tishmen @mamcode : CI is green now. Thanks!

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot migration contract

Please cherry-pick #1343

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Nov 19, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 19, 2025
27 tasks
@BhaveshHeliconia
Copy link
Copy Markdown
Contributor Author

/ocabot migration contract

Please cherry-pick #1343

@pedrobaeza : Done. Thanks!

Comment thread contract/models/contract_template_line.py Outdated
Comment thread contract/tests/test_contract.py Outdated
Comment thread contract/tests/test_contract.py Outdated
Comment thread contract/tests/test_portal.py Outdated
@BhaveshHeliconia BhaveshHeliconia force-pushed the 19.0-mig-contract branch 2 times, most recently from 65801a9 to 4ce03c5 Compare November 21, 2025 04:27
@BhaveshHeliconia
Copy link
Copy Markdown
Contributor Author

@pedrobaeza : I’ve completed all the changes you recommended. Thanks for the feedback!

Comment thread contract/models/contract_template_line.py Outdated
Comment thread contract/models/contract_template_line.py Outdated
Comment thread contract/tests/test_contract.py Outdated
Comment thread contract/tests/test_contract.py Outdated
Comment thread contract/tests/test_contract.py Outdated
@BhaveshHeliconia BhaveshHeliconia force-pushed the 19.0-mig-contract branch 2 times, most recently from b527c46 to 4e377c2 Compare November 21, 2025 09:51
@pedrobaeza
Copy link
Copy Markdown
Member

Please include #1341

@BhaveshHeliconia
Copy link
Copy Markdown
Contributor Author

Please include #1341

Done. Thanks!

CRogos and others added 29 commits May 18, 2026 14:26
…ing onchanges

When copying values from the contract template, skip assignment if the
value is already the same on the contract. This prevents triggering
unnecessary onchanges without altering the behavior.
We should add a validation of company as it might collide if we have multiple companies installed and this companies have a sequence.
Currently translated at 96.8% (248 of 256 strings)

Translation: contract-18.0/contract-18.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract/ca/
…ct lines

This field is unused in this module, but in the contract_sale_invoicing module it is used to search Sales Orders. However, many times this field goes unnoticed and users set the analytic distribution directly on the lines.

After this commit, the field is computed automatically based on the contract lines.
…ontract

line

Adding analytic.mixin on a model adds the analytic_distribution compute field
In the mixin the compute is not implemented, letting the method being implemented
in each concrete model. This wasn't done yet for contract line.

Before this commit: adding a product to a contract line didn't fill the analytic distribution.

After this commit: adding a product to a contract line triggers the compute method
(similarly to the one on sale order lines), evaluating the account analytic distribution
models and setting the correct analytic distribution
On portal, the cancelled lines are not distinguished from running ones,
as the next invoice date is still displayed, and the color is the same
(on contrary than the backend, that appears greyed).

So let's do something similar in portal:

- Put the row as grey.
- Hide the nexte invoice date on that case.

TT59704
Currently translated at 100.0% (258 of 258 strings)

Translation: contract-18.0/contract-18.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract/fr/
This field slightly degrades performance.
We don't need to maintain retro-compatibility with 11- anymore.
Currently translated at 6.6% (17 of 256 strings)

Translation: contract-18.0/contract-18.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract/sl/
Currently translated at 96.4% (247 of 256 strings)

Translation: contract-18.0/contract-18.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract/ca/
Allow to hook contract._prepare_invoice to add more invoice lines
Fix date_ref when invoicing multiple contracts
Currently translated at 92.5% (237 of 256 strings)

Translation: contract-18.0/contract-18.0-contract
Translate-URL: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract/es/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.