Skip to content

[16.0][ADD] agx_sarabun_user_template: user-defined route templates - #1233

Open
n3n wants to merge 2 commits into
16.0from
16.0-add-sarabun_route_template_user
Open

[16.0][ADD] agx_sarabun_user_template: user-defined route templates#1233
n3n wants to merge 2 commits into
16.0from
16.0-add-sarabun_route_template_user

Conversation

@n3n

@n3n n3n commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

  • New agx_sarabun_user_template module lets regular sarabun users own personal/unit-scoped route templates alongside the manager-only public catalogue, via owner_id + visibility on sarabun.route.template and matching ir.rules (ADR-0016).
  • agx_sarabun core gains chatter (mail.thread/mail.activity.mixin) and a surfaced description field on the template form, bundled with a manifest version bump (5.1.0 → 5.2.0).
  • Fixes review findings: visibility default is now dynamic (superuser/manager → public, regular users → personal) with the public-visibility constraint skipped under env.su, so bridge-module seed data installs cleanly; visibility='unit' now requires department_id.

Test plan

  • oca_run_tests for agx_sarabun and agx_sarabun_user_template
  • Install agx_sarabun_user_template plus the route-template-seeding bridge modules on a clean DB
  • Manual: regular user creates a template via "แม่แบบเส้นทางของฉัน" and via "Create and edit" from a document form → saves as personal

@n3n
n3n force-pushed the 16.0-add-sarabun_route_template_user branch from f33635d to 60aa98f Compare September 7, 2026 15:26
…ADR-0016)

Let regular sarabun users create personal/unit-scoped route templates
alongside the manager-only public catalogue, via owner_id + visibility
on sarabun.route.template and matching ir.rules. Bundles chatter and a
description field onto the core template model in agx_sarabun.

Fixes review findings: dynamic visibility default (superuser/manager
seed as public, regular users as personal) with the public-visibility
constraint skipped for su, so bridge module seed data installs
cleanly; requires department_id when visibility=unit.
@n3n
n3n force-pushed the 16.0-add-sarabun_route_template_user branch from 60aa98f to f59f65a Compare September 7, 2026 17:49
Collapse the parallel Configuration (manager-only) and root ("My
Templates") menus into a single top-level "แม่แบบเส้นทางอนุมัติ" entry
reachable by both roles. Rows are scoped per user by the existing read
ir.rule and the create-default (personal for users, public for managers)
comes from _default_visibility, so the default_visibility context
override is dropped and the old Configuration menu is deactivated
(xmlid preserved).

Updates ADR-0016 with a revision note and CONTEXT.md with the new label.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant