Skip to content

[MIG] portal_partner_state: Migration to 20.0 - #155

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

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

Conversation

@les-adhoc

Copy link
Copy Markdown
Contributor

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

Migration of portal_partner_state to 20.0.

  • Migrator: version 20.0.1.0.0, installable.
  • upgrade_code 19.4-00-ir-access: ir.model.access.csv → ir.access.csv, same xmlids, read-only access for portal users.
  • The portal read on ir.model.fields is now limited to res.partner fields ([('model', '=', 'res.partner')]). That is what partner_state reads when the portal layout tracks the partner; before, portal users could read the whole table, AI prompts included.
  • New tests: portal users read the state fields and the field they point to, can not write them, only see res.partner fields, and can open /my (403 without this module).
  • README synced; translations exported.

Depends on #154 (partner_state migration): this module does not install on 20.0 until #154 is merged, so runbot will fail here until then. The branches have different names and are not built together.

Tested on a local 20.0 database with partner_state from #154: installs (auto_install) and its 4 tests pass. Not tested on an upgraded database: runbot does not run the 19.0 → 20.0 upgrade yet.

@roboadhoc

Copy link
Copy Markdown

Pull request status dashboard

@les-adhoc les-adhoc changed the title [WIP] [MIG] portal_partner_state: Migration to 20.0 [MIG] portal_partner_state: Migration to 20.0 Oct 20, 2026
…artner fields

The portal only needs the res.partner fields that partner_state reads when
the portal layout tracks the partner. Reading the whole table also exposed
fields like the AI prompts of ai_fields.

Adds a test that opens /my as a portal user, which fails with a 403 without
the bridge, and one that checks the portal sees only res.partner fields.
@jcadhoc

jcadhoc commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump rebase-ff

@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
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
…artner fields

The portal only needs the res.partner fields that partner_state reads when
the portal layout tracks the partner. Reading the whole table also exposed
fields like the AI prompts of ai_fields.

Adds a test that opens /my as a portal user, which fails with a 403 without
the bridge, and one that checks the portal sees only res.partner fields.

Part-of: #155
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
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
roboadhoc pushed a commit that referenced this pull request Nov 2, 2026
…artner fields

The portal only needs the res.partner fields that partner_state reads when
the portal layout tracks the partner. Reading the whole table also exposed
fields like the AI prompts of ai_fields.

Adds a test that opens /my as a portal user, which fails with a 403 without
the bridge, and one that checks the portal sees only res.partner fields.

Part-of: #155
Signed-off-by: Juan Carreras <[email protected]>
@roboadhoc roboadhoc closed this in 999cec7 Nov 2, 2026
@roboadhoc
roboadhoc deleted the 20.0-t-76508-les branch November 2, 2026 18:51
@roboadhoc roboadhoc added the 19.1 label Nov 2, 2026

This branch was previously deployed

1 inactive deployment
merge — 83f82d32 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.

3 participants