Skip to content

[16.0][ADD] agx_sarabun_signature_title: prepend academic/job title to signature block - #1165

Open
n3n wants to merge 1 commit into
16.0from
16.0-add-agx_sarabun-signature-title
Open

[16.0][ADD] agx_sarabun_signature_title: prepend academic/job title to signature block#1165
n3n wants to merge 1 commit into
16.0from
16.0-add-agx_sarabun-signature-title

Conversation

@n3n

@n3n n3n commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • New bridge module agx_sarabun_signature_title (phase-2 of agx_sarabun design) that prepends the signer's full academic or job title to the name line in the endorsement block PDF.
  • Adds signed_academic_title snapshot field on sarabun.routing.step, captured at signing time so later HR promotions never rewrite an already-signed หนังสือ (ADR-0009 pattern).
  • Inherits agx_sarabun.sarabun_endorsement_block via QWeb XPath to replace the bare name span with sig._signed_display_name(), rendering e.g. (ศาสตราจารย์ ดร. สมชาย ใจดี).
  • Depends on agx_sarabun and hr_employee_academic_standing_thailand; empty titles (no role match) are a no-op.

วิธีทดสอบ

  1. ติดตั้ง module: -i agx_sarabun_signature_title -u agx_sarabun บน dev DB
  2. ตั้งค่า hr.employee ให้ role = academic, academic_standing_id = ศ., ระดับการศึกษา = ปริญญาเอก พร้อมผูก user และ signature image
  3. สร้าง sarabun.document → ส่ง → ลงนามผ่าน verb ที่ show_signature = True → พิมพ์ PDF → ชื่อในบล็อกลงนามต้องแสดง (ศาสตราจารย์ ดร. ชื่อ-สกุล)
  4. ทดสอบสายงานสนับสนุน (role = support) → ชื่อต้องแสดง prefix ตำแหน่งงาน+ระดับตำแหน่ง
  5. Freeze check: หลังลงนามแล้ว แก้ไข academic_standing_id ของพนักงาน → พิมพ์เอกสารเดิมซ้ำ → ชื่อที่พิมพ์ต้องไม่เปลี่ยน (อ่านจาก signed_academic_title snapshot)
  6. กรณีที่ role ไม่ตรง (ไม่มี title) → แสดงชื่อเปล่าตามปกติ ไม่มี prefix นำหน้า

…o signature block

Phase-2 bridge module that captures academic_standing_title at signing
(snapshot) and renders it before the signer's name on the endorsement
block PDF — e.g. (ศาสตราจารย์ ดร. สมชาย ใจดี).
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