Skip to content

[16.0][ADD] budget_support_request: request budget support from central - #1179

Open
n3n wants to merge 2 commits into
16.0from
16.0-add-budget-support-request
Open

[16.0][ADD] budget_support_request: request budget support from central#1179
n3n wants to merge 2 commits into
16.0from
16.0-add-budget-support-request

Conversation

@n3n

@n3n n3n commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • New budget.support.request workflow (draft→submitted→approved→in_progress→done) letting a unit ask central for budget support (ขอรับการสนับสนุนงบประมาณ) on its department dimension, approved via e-Saraban, then fulfilled by central through a budget.transfer (โอน) or budget.commitment (จอง).
  • Split into 4 modules mirroring budget_transfer's pattern: budget_support_request (core), budget_support_request_operating_unit (OU scoping, auto-install), budget_support_request_operating_unit_access_all (all-OU visibility), budget_support_request_sarabun (e-Saraban routing, auto-install).
  • group_budget_support_officer is a notify-only, read-only role that gets a Todo when a request is approved.
  • CONTEXT-MAP.md updated with the new context and its relationship to Budget.

Test plan

  • Install all 4 modules on a test DB
  • Submit a request as a budget user, approve as a Budget Manager, fulfil via both โอน and จอง paths
  • Verify the officer Todo fires on approval and the requester Todo fires on done
  • Verify OU-scoped visibility and the access-all override
  • Route a request through e-Saraban end to end (send → sign → approved)

n3n added 2 commits August 22, 2026 18:41
Adds a workflow for a unit to request budget support (ขอรับการสนับสนุนงบประมาณ)
on its department dimension, approved via e-Saraban, then fulfilled by
central through a budget transfer or reservation. Split into 4 modules
mirroring budget_transfer: core, Operating Unit, access-all, and
e-Saraban bridges.
- budget_support_request_operating_unit: re-apply @api.constrains on the
  _check_beneficiary_reserve_right override. Odoo collects Python constraints
  from the most-derived method of each name, so overriding without the
  decorator dropped the base cross-OU reserve gate entirely instead of
  extending it.

- budget_support_request_operating_unit_access_all: the record rule domain had
  three leaf terms but only one '|', so it parsed as
  (all_ou OR ou = False) AND ou in user OUs -- narrowing access instead of
  widening it, and hiding OU-less requests from everyone.

- budget_support_request_sarabun: scope show_approve_button back to the
  submitted state; the bridge's compute was overwriting the base condition for
  every state, showing Approve on done/cancelled/draft requests.

- budget_support_request_sarabun: enclose copies of the request's attachments,
  stamped onto sarabun.document, instead of linking the request's own
  ir.attachment records. A signing position holder normally reaches e-Saraban
  only and has no read access to budget.support.request.
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