Skip to content

[19.0][MIG] agreement_legal: Migration to 19.0 - #132

Open
max3903 wants to merge 86 commits into
OCA:19.0from
ursais:19.0-mig-agreement_legal
Open

[19.0][MIG] agreement_legal: Migration to 19.0#132
max3903 wants to merge 86 commits into
OCA:19.0from
ursais:19.0-mig-agreement_legal

Conversation

@max3903

@max3903 max3903 commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Clean migration of agreement_legal from 18.0 to 19.0 (no module split/refactor).

  • Version 19.0.1.0.0, installable
  • Reuse agreement.group_* (drop duplicate res_groups.xml / ACL overlaps)
  • 19.0 API/UI updates (self.env._(), settings target current, remove @odoo-module)
  • Credits: Open Source Integrators → Groundwire Mentored Learning
  • Unit tests on BaseCommon; coverage 100%

This is an alternative to #121 (migration + refactoring). Prefer this PR for a straight migration.

Test scenario

  1. Install agreement then agreement_legal on Odoo 19.0 (demo optional).
  2. Open the Legal Agreements app menu; confirm dashboard and agreement list/kanban/form load.
  3. Create an agreement from a template; recompute from template via the wizard.
  4. Confirm stages, parties, and readonly-by-stage behavior on the form.
  5. Uninstall agreement_legal and confirm the base Agreements menu is usable again.
  6. Automated: oca_run_tests with ADDONS=agreement_legal — 0 failures; Python coverage on module 100%.

Dependencies

  • agreement — already on 19.0

Made with Cursor

@OCA-git-bot OCA-git-bot added the mod:agreement_legal Module agreement_legal label Aug 28, 2026
@max3903 max3903 added this to the 19.0 milestone Aug 28, 2026
@max3903 max3903 self-assigned this Aug 28, 2026
@max3903

max3903 commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

/ocabot migration agreement_legal

@OCA-git-bot

Copy link
Copy Markdown
Contributor

The migration issue (#90) has not been updated to reference the current pull request because a previous pull request (#121) is not closed.
Perhaps you should check that there is no duplicate work.
CC @CRogos

@CRogos CRogos left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Commit history not preserved
Maybe you should use my migration, before the module split? 00e711d

ygol and others added 20 commits September 3, 2026 07:16
[UPD] Update agreement_legal.pot
- Add stage_type to agreement.stage
- Track stage of service profile
- Add Kanban view for service profiles to the dashboard
- Add product_id field to service profile

[UPD] Update agreement_legal.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/

Added translation using Weblate (Chinese (Simplified))

Translated using Weblate (Chinese (Simplified))

Currently translated at 4.5% (13 of 287 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/zh_CN/

Translated using Weblate (Chinese (Simplified))

Currently translated at 39.4% (113 of 287 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/zh_CN/

Translated using Weblate (Chinese (Simplified))

Currently translated at 53.0% (152 of 287 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/zh_CN/

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (287 of 287 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/zh_CN/
Co-Authored-By: kongrattapong <52144935+kongrattapong@users.noreply.github.com>

Translated using Weblate (French)

Currently translated at 100.0% (287 of 287 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/fr/
we move the is_template field definition and the agreement.type model from
the agreement_legal module to the agreement module.

The fields are not displayed by default, unless the feature is enabled through a
technical feature group, this is configurable in the agreement_sale module (because agreement
in itself has no UI, and agreement_legal enables the feature by default)

[UPD] Update agreement_legal.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (284 of 284 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/zh_CN/
Translated using Weblate (Portuguese (Portugal))

Currently translated at 73.9% (210 of 284 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt_PT/

Added translation using Weblate (Portuguese)

Translated using Weblate (Portuguese)

Currently translated at 75.4% (214 of 284 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt/

Translated using Weblate (Portuguese)

Currently translated at 75.7% (215 of 284 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt/

Translated using Weblate (Portuguese)

Currently translated at 75.7% (215 of 284 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt/
Before this commit, the view of agreement uses a dotted domain
on the 'right leaf' in the company_conact_id field causing
an javascript error.

Translated using Weblate (Portuguese (Portugal))

Currently translated at 73.9% (210 of 284 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt_PT/

Translated using Weblate (Portuguese)

Currently translated at 77.5% (220 of 284 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt/

[UPD] Update agreement_legal.pot
- The `agreement` model now features mail and activities from its base module.
- The `agreement_legal` module doesn't need to add mail support now.
- Add activities to form views.

@Tecnativa TT22477

[UPD] Update agreement_legal.pot
Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (286 of 286 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt_BR/

Translated using Weblate (Spanish)

Currently translated at 99.3% (284 of 286 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/es/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (286 of 286 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt_BR/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (286 of 286 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt_BR/

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/

Translated using Weblate (French)

Currently translated at 98.6% (282 of 286 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/fr/

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (286 of 286 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/pt_BR/

Translated using Weblate (French)

Currently translated at 100.0% (286 of 286 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/fr/
[MIG] Black & Cleanup

[IMP] Reviewer Requested Changes

[IMP] Black

[IMP] Reviewer Suggestion

[FIX] Tests

[FIX] Multiple Issues

- Added 'is_old_version' field to better display old versions. Before these were marked as inactive therefore not showing in the agreement.
- 'is_template' field now copies when making a template revision or copying a template.
- New Versions now retain original create date.
- Moved version/revision and created on/by fields out of footer to top in order to have the save buttons when creating children.
- Moved demo data out of data folder into the demo.xml

[FIX] demo data

[FIX] Revert back to only migration

[FIX] Report dynamic field rendering

[FIX] Test
MohamedOsman7 and others added 14 commits September 3, 2026 07:16
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: agreement-18.0/agreement-18.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/agreement-18-0/agreement-18-0-agreement_legal/
Currently translated at 100.0% (263 of 263 strings)

Translation: agreement-18.0/agreement-18.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/agreement-18-0/agreement-18-0-agreement_legal/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: agreement-18.0/agreement-18.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/agreement-18-0/agreement-18-0-agreement_legal/
Currently translated at 100.0% (263 of 263 strings)

Translation: agreement-18.0/agreement-18.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/agreement-18-0/agreement-18-0-agreement_legal/it/
Currently translated at 98.4% (259 of 263 strings)

Translation: agreement-18.0/agreement-18.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/agreement-18-0/agreement-18-0-agreement_legal/tr/
@max3903
max3903 force-pushed the 19.0-mig-agreement_legal branch from f865b00 to 8875afe Compare September 3, 2026 13:19
max3903 and others added 14 commits September 3, 2026 07:53
Fixes OCA#107

- Move kanban card actions to Odoo 18 `menu` template with highlight_color
- Use dedicated agreement_legal_menu_root so sibling modules do not hijack
  agreement.agreement_menu under Accounting
- Split demo data per model
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: agreement-18.0/agreement-18.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/agreement-18-0/agreement-18-0-agreement_legal/
Fixes OCA#106

Use a dedicated legal app root menu instead of reusing agreement.agreement_menu,
hide the base app menu while legal is installed, and restore it via uninstall_hook.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: agreement-18.0/agreement-18.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/agreement-18-0/agreement-18-0-agreement_legal/
Assisted-by: Cursor <cursoragent@cursor.com>
@max3903
max3903 force-pushed the 19.0-mig-agreement_legal branch from 8875afe to dbfaf2d Compare September 3, 2026 13:54
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.