[ADD] subscription_oca_portal: expose subscriptions in the portal #5

Merged
stephansainleger merged 1 commits from 18.0-subscription-portal into 18.0 2026-10-22 10:05:38 +00:00

Add the missing portal layer for subscription_oca, modelled on the
portal of the OCA contract module:

  • sale.subscription inherits portal.mixin; access_url resolves to
    /my/subscriptions/
  • read-only ACLs (base.group_portal) on subscription, line, stage and
    template models, with record rules restricting both subscription and
    lines to the user's own commercial partner
  • CustomerPortal extension: home counter, paginated and sortable list,
    detail page with lines, totals and a portal chatter
  • related invoices are listed only when posted and actually readable by
    the visitor, since subscription_oca creates them in sudo
  • /my home entry with a recurring-cycle icon (circular arrows around a
    calendar, matching the portal icon palette)
  • 13 tests, fr.po translation catalog

Chatter headings carry mb-4: the frontend portal chatter paints an
opaque sticky bar 15px above its container, which would otherwise clip
the heading (same overlap exists on core portal pages, hidden behind
their taller h3).

Portal body loop variables avoid the names invoice and subscription:
qweb renders a t-call body before the layout it calls in the same values
dict, so top-level loop variables leak into the breadcrumb context where
account's portal_breadcrumbs template tests t-if="invoice".

Add the missing portal layer for subscription_oca, modelled on the portal of the OCA contract module: - sale.subscription inherits portal.mixin; access_url resolves to /my/subscriptions/<id> - read-only ACLs (base.group_portal) on subscription, line, stage and template models, with record rules restricting both subscription and lines to the user's own commercial partner - CustomerPortal extension: home counter, paginated and sortable list, detail page with lines, totals and a portal chatter - related invoices are listed only when posted and actually readable by the visitor, since subscription_oca creates them in sudo - /my home entry with a recurring-cycle icon (circular arrows around a calendar, matching the portal icon palette) - 13 tests, fr.po translation catalog Chatter headings carry mb-4: the frontend portal chatter paints an opaque sticky bar 15px above its container, which would otherwise clip the heading (same overlap exists on core portal pages, hidden behind their taller h3). Portal body loop variables avoid the names `invoice` and `subscription`: qweb renders a t-call body before the layout it calls in the same values dict, so top-level loop variables leak into the breadcrumb context where account's portal_breadcrumbs template tests t-if="invoice".
stephansainleger added 1 commit 2026-10-20 21:30:07 +00:00
[ADD] subscription_oca_portal: expose subscriptions in the portal
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m34s
tests / test (pull_request) Successful in 2m39s
18e7ae8925
Add the missing portal layer for subscription_oca, modelled on the
portal of the OCA contract module:

- sale.subscription inherits portal.mixin; access_url resolves to
  /my/subscriptions/<id>
- read-only ACLs (base.group_portal) on subscription, line, stage and
  template models, with record rules restricting both subscription and
  lines to the user's own commercial partner
- CustomerPortal extension: home counter, paginated and sortable list,
  detail page with lines, totals and a portal chatter
- related invoices are listed only when posted and actually readable by
  the visitor, since subscription_oca creates them in sudo
- /my home entry with a recurring-cycle icon (circular arrows around a
  calendar, matching the portal icon palette)
- 13 tests, fr.po translation catalog

Chatter headings carry mb-4: the frontend portal chatter paints an
opaque sticky bar 15px above its container, which would otherwise clip
the heading (same overlap exists on core portal pages, hidden behind
their taller h3).

Portal body loop variables avoid the names `invoice` and `subscription`:
qweb renders a t-call body before the layout it calls in the same values
dict, so top-level loop variables leak into the breadcrumb context where
account's portal_breadcrumbs template tests t-if="invoice".
laetitiadacosta approved these changes 2026-10-22 07:41:35 +00:00
maudbuchwalter approved these changes 2026-10-22 07:41:47 +00:00
stephansainleger merged commit 18e7ae8925 into 18.0 2026-10-22 10:05:38 +00:00
stephansainleger deleted branch 18.0-subscription-portal 2026-10-22 10:05:39 +00:00
Sign in to join this conversation.
No description provided.