[16.0][ADD] budget_support_request: request budget support from central - #1179
Open
n3n wants to merge 2 commits into
Open
[16.0][ADD] budget_support_request: request budget support from central#1179n3n wants to merge 2 commits into
n3n wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
budget.support.requestworkflow (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 abudget.transfer(โอน) orbudget.commitment(จอง).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_officeris a notify-only, read-only role that gets a Todo when a request is approved.Test plan