Skip to content

[15.0][FIX] budget_control_request_document_expense: uncommit RQ before submit EX#544

Merged
Pani-k-folk merged 1 commit into15.0from
15.0-fix-budget_control_request_document_expense-check_budget_precommit
Jan 23, 2026
Merged

[15.0][FIX] budget_control_request_document_expense: uncommit RQ before submit EX#544
Pani-k-folk merged 1 commit into15.0from
15.0-fix-budget_control_request_document_expense-check_budget_precommit

Conversation

@Pani-k-folk
Copy link

@Pani-k-folk Pani-k-folk commented Jan 23, 2026

แก้ไขระบบให้ uncommit request ก่อน precommit ex

STEP TO ERROR

  • สร้าง RQ และขออนุมัติตาม Flow ปกติ
  • ผู้อนุมัติคนสุดท้ายอนุมัติ => ระบบ Summit EX และ Check Budget Pre commit

สาเหตุเกิดจาก

  • เมื่อ Check Budget Pre commit ระบบไม่คืน Commit ที่ RQ ทำให้งบประมาณไม่เพียงพอ

การแก้ไข

  • เมื่อ Pre commit ให้ระบบคืนงบประมาณของ RQ ชั่วคราว ถ้า EX submit ไม่ผ่าน ระบบ Commit ที่ RQ ตามเดิม

@Pani-k-folk Pani-k-folk requested a review from Saran440 January 23, 2026 06:53
@Pani-k-folk Pani-k-folk changed the title [IMP] budget_control_request_document_expense: uncommit RQ before submit EX [15.0][IMP] budget_control_request_document_expense: uncommit RQ before submit EX Jan 23, 2026
@Pani-k-folk Pani-k-folk changed the title [15.0][IMP] budget_control_request_document_expense: uncommit RQ before submit EX [15.0][FIX] budget_control_request_document_expense: uncommit RQ before submit EX Jan 23, 2026
Copy link
Collaborator

@Saran440 Saran440 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. อธิบาย step to error หน่อยนะครับ เผื่อกลับมาอ่านอีกทีจะได้เข้าใจว่าแก้จากเคสไหน
  2. เห็นมีเพิ่ม self.env.context.get("check_budget_precommit", False) ส่วนนี้จะไม่กระทบกับกรณีปกติใช่ไหม เช่น
    • expense ไม่ได้ config ให้ auto state post เมื่อ RQ จองงบประมาณแล้ว ถ้ากด recompute จะยังจองถูกต้องไหม
    • expense ไม่ได้ config ให้ auto state post เมื่อ RQ ผ่านการอนุมัติแล้ว ระบบจะสร้าง expense = draft แล้วกด submit ระบบจะ check budget ถูกต้องไหม

@Pani-k-folk Pani-k-folk force-pushed the 15.0-fix-budget_control_request_document_expense-check_budget_precommit branch from 5b0d984 to 5232ffc Compare January 23, 2026 10:11
@Pani-k-folk
Copy link
Author

Pani-k-folk commented Jan 23, 2026

/ocabot merge patch

@Pani-k-folk Pani-k-folk merged commit f282242 into 15.0 Jan 23, 2026
4 checks passed
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.

2 participants