Skip to content

[MIG] partner_state: Migration to 20.0 - #154

Closed
les-adhoc wants to merge 5 commits into
ingadhoc:20.0from
adhoc-dev:20.0-t-76509-les
Closed

les-adhoc wants to merge 5 commits into
ingadhoc:20.0from
adhoc-dev:20.0-t-76509-les

Conversation

@les-adhoc

@les-adhoc les-adhoc commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Tarea: https://www.adhoc.inc/odoo/project.task/76509

What changes

  • Version 20.0.1.0.0 and installable (odoo-module-migrator).
  • ir.model.access.csv -> ir.access.csv (upgrade_code 19.4-00-ir-access; the other upgrade_code scripts changed nothing).
  • Search view: the type_company filter is gone from base.view_res_partner_filter in 20
    (19.0 odoo/addons/base/views/res_partner_views.xml:328). The state filters now go after
    filter_vat_set (20.0, same file :331), in the same group.
  • README synced with the code (config menu path, per-field options, mass actions); es.po
    exported again with --force-sync.
  • Manifest: depends, auto_install and license unchanged.
  • Access: read on ir.model.fields for internal users is now limited to res.partner fields
    (before, the whole table; in 20 that includes fields such as ai_fields prompt_custom).

Notes

  • mail.thread._track_get_fields moved to mail.track.mixin in 20; the override on
    res.partner still applies (checked in a 20 shell).
  • Includes the chatter fix of [FIX] partner_state: keep standard fields in the chatter #153 / [FIX] partner_state: keep standard fields in the chatter #156 (cherry-pick of ff015cb from 19.0). In 20, without mail_tracking,
    the tracking is only in the message body, so the new test reads the field labels from there.
  • portal_partner_state goes in its own PR.
  • Data: configuration lines that point to a res.partner field removed in 20 are deleted in
    cascade during the upgrade. A script in ingadhoc/odoo-upgrade (same branch) reports them.

Tests

  • Installs on a local 20 database; the 6 module tests pass. The new chatter test fails with the
    previous _track_get_fields and passes with the fix.
  • Static, imports, permissions and inherited-view anchors checks: ok. pre-commit: ok.
  • Not tested on a real upgraded database: runbot does not run 19 -> 20 yet.

- Bump version to 20.0 and mark the module installable (odoo-module-migrator).
- Convert ir.model.access.csv to ir.access.csv (upgrade_code 19.4-00-ir-access).
- Search view: the "type_company" filter no longer exists in
  base.view_res_partner_filter; anchor the state filters on "filter_vat_set",
  which sits in the same group.
@roboadhoc

Copy link
Copy Markdown

Pull request status dashboard

The module gave every internal user read on the whole ir.model.fields
table. The core does not (in 20 only base.group_erp_manager has it), and
in 20 that exposes fields such as ai_fields prompt_custom. partner_state
only reads res.partner fields, so the access gets that domain.
@les-adhoc les-adhoc changed the title [WIP] [MIG] partner_state: Migration to 20.0 [MIG] partner_state: Migration to 20.0 Oct 20, 2026
"Changes?" now only adds fields to the chatter. Fields that Odoo tracks
by default are always tracked, with or without lines in Partner State
Fields. Before, the _message_track override only logged the fields with
"Changes?", so a database without lines logged no partner change.

The "Changes?" column now shows a computed field: it is checked and read
only for fields with native tracking, and it writes the stored value for
the other fields. Existing lines show the right value without a migration.

The README explains the options of Partner State Fields and lists the
fields that Odoo tracks on contacts by default.

In 19.0, also drop the unused initial_values and state_fields_to_track
from write().

closes ingadhoc#156

X-original-commit: ed6f85d
Signed-off-by: Matias Velazquez <[email protected]>
Signed-off-by: Luciano Esperlazza <[email protected]>

In 20.0, without mail_tracking the tracking is only rendered in the
message body, so the test reads the field labels from there. The README
also lists the related fields that 20 tracks with the name.

Cherry-picked from ff015cb (19.0).
…e written values

Without mail_tracking the test reads the logged labels from the message
body. It now maps them against every field the model tracks, not only the
written ones, so a field logged on top (a related field, or one that
starts to be tracked natively) breaks the equality.
@jcadhoc

jcadhoc commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@roboadhoc r+ rebase-ff

@jcadhoc

jcadhoc commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@roboadhoc nobump

@roboadhoc

Copy link
Copy Markdown

Merge method set to rebase and fast-forward.

roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
- Bump version to 20.0 and mark the module installable (odoo-module-migrator).
- Convert ir.model.access.csv to ir.access.csv (upgrade_code 19.4-00-ir-access).
- Search view: the "type_company" filter no longer exists in
  base.view_res_partner_filter; anchor the state filters on "filter_vat_set",
  which sits in the same group.

Part-of: #154
Signed-off-by: Juan Carreras <[email protected]>
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
The module gave every internal user read on the whole ir.model.fields
table. The core does not (in 20 only base.group_erp_manager has it), and
in 20 that exposes fields such as ai_fields prompt_custom. partner_state
only reads res.partner fields, so the access gets that domain.

Part-of: #154
Signed-off-by: Juan Carreras <[email protected]>
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
"Changes?" now only adds fields to the chatter. Fields that Odoo tracks
by default are always tracked, with or without lines in Partner State
Fields. Before, the _message_track override only logged the fields with
"Changes?", so a database without lines logged no partner change.

The "Changes?" column now shows a computed field: it is checked and read
only for fields with native tracking, and it writes the stored value for
the other fields. Existing lines show the right value without a migration.

The README explains the options of Partner State Fields and lists the
fields that Odoo tracks on contacts by default.

In 19.0, also drop the unused initial_values and state_fields_to_track
from write().

closes #156

X-original-commit: ed6f85d
Signed-off-by: Matias Velazquez <[email protected]>
Signed-off-by: Luciano Esperlazza <[email protected]>

In 20.0, without mail_tracking the tracking is only rendered in the
message body, so the test reads the field labels from there. The README
also lists the related fields that 20 tracks with the name.

Cherry-picked from ff015cb (19.0).

Part-of: #154
Signed-off-by: Juan Carreras <[email protected]>
@roboadhoc roboadhoc closed this in 57be992 Nov 2, 2026
@roboadhoc
roboadhoc deleted the 20.0-t-76509-les branch November 2, 2026 11:42
@roboadhoc roboadhoc added the 19.1 label Nov 2, 2026

This branch was previously deployed

1 inactive deployment
merge — bc1c2fc9 Deployed Nov 2, 2026 by roboadhoc
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.

4 participants