Skip to content

[REM] academic: move "grant access to all" button to portal_ux - #431

Closed
gal-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-70085-gal
Closed

[REM] academic: move "grant access to all" button to portal_ux#431
gal-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-70085-gal

Conversation

@gal-adhoc

Copy link
Copy Markdown
Contributor

Summary

Follow-up to ingadhoc/miscellaneous#418, which generalizes the "Grant Access to All" button on the portal wizard (portal.wizard) into a new horizontal module portal_ux. That button had no academic-specific logic, so it's removed from here and provided by portal_ux instead.

  • academic/wizards/portal_wizard.py: removed action_grant_access_all() (moved to portal_ux, unchanged). Kept the academic-specific _default_portal() / portal_id.
  • academic/wizards/portal_wizard_views.xml: removed (its only content was the button, now added by portal_ux).
  • __manifest__.py: added portal_ux to depends, removed the now-deleted view from data.
  • Not touched: academic/wizards/portal_wizard_user.py. Its override of action_grant_access() (assigns portal groups by partner_type) is vertical logic and keeps applying by polymorphism — the generic button in portal_ux iterates user_ids and calls action_grant_access(), which on a database with academic installed still runs the academic override. Behavior for existing academic users is unchanged.

Branch shares the same name as ingadhoc/miscellaneous#418 so both build together on runbot.

Test plan

  • Install academic + portal_ux together → only one "Grant Access to All" button shows on the wizard (no duplicate).
  • Grant access to a batch of academic contacts (student/parent/teacher/administrator) → verify portal groups by partner_type are still assigned correctly.
  • academic module updates cleanly after the view removal.

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

The generic "Grant Access to All" button on the portal wizard was
academic-specific but had no academic logic in it. It now lives in
the horizontal module portal_ux, available on any database. academic
depends on portal_ux to keep the button; the partner_type-based group
assignment override on portal.wizard.user is untouched and keeps
applying through polymorphism.
@gal-adhoc

Copy link
Copy Markdown
Contributor Author

Nota sobre CI: ci/runbot-smarted va a seguir en rojo hasta que ingadhoc/miscellaneous#418 (nuevo módulo portal_ux) se mergee primero. Este check no bundlea PRs de otros repos por nombre de rama (a diferencia de ci/runbot-oba/ci/runbot-modified-modules en el otro repo), así que no puede resolver la nueva dependencia portal_ux mientras ese módulo no exista en la rama productiva. Error real del build:

odoo.exceptions.UserError: You try to install module "academic" that depends on module "portal_ux".
But the latter module is not available in your system.

No hay nada que arreglar en el código de este PR por este motivo — es un tema de orden de merge. Sugerencia: mergear #418 primero, después este PR debería pasar CI limpio.

@nicomacr

Copy link
Copy Markdown
Contributor

@roboadhoc override=ci/runbot-smarted

@nicomacr

Copy link
Copy Markdown
Contributor

@roboadhoc r+

@roboadhoc

Copy link
Copy Markdown
Contributor

@gal-adhoc @nicomacr this PR cannot be staged without a bump policy. Please specify either bump or nobump in your comment.

@nicomacr

Copy link
Copy Markdown
Contributor

@roboadhoc nobump

roboadhoc pushed a commit to ingadhoc/miscellaneous that referenced this pull request Jul 22, 2026
Adds a "Grant Access to All" button to the portal access wizard
(portal.wizard) that grants portal access to every contact listed in
the wizard with a valid email in a single action, instead of having
to click "Grant Access" row by row.

closes #418

Related: ingadhoc/odoo-academic#431
Signed-off-by: Franco Leyes <lef@adhoc.com.ar>
@roboadhoc roboadhoc closed this in 37f4b08 Jul 22, 2026
@roboadhoc
roboadhoc deleted the 19.0-t-70085-gal branch July 22, 2026 13:45
@roboadhoc roboadhoc added the 18.1 label Jul 22, 2026
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