Skip to content

[16.0][FIX] purchase_request_approval: report count + require title & vendor - #1195

Open
PiyaChaiyanit wants to merge 2 commits into
16.0from
16.0-fix-purchase_request-report-and-fields
Open

[16.0][FIX] purchase_request_approval: report count + require title & vendor#1195
PiyaChaiyanit wants to merge 2 commits into
16.0from
16.0-fix-purchase_request-report-and-fields

Conversation

@PiyaChaiyanit

Copy link
Copy Markdown
Collaborator

Summary

  • Report: replace hardcoded จำนวน 1 รายการ with len(o.line_ids) so it reflects the true line count in report_purchase_request_approval.xml.
  • PA เรื่อง (title): drop title from _prepare_approval_vals so it no longer auto-copies from purchase.request, and mark it required="1" on the PA form — force users to enter it themselves.
  • Vendor required when procurement_mode = by_requester: extend the partner_id attrs in purchase_request_procurement_mode to require the vendor when the user picks "ขอระบุเอง".

Test plan

  • Print PDF from a PA with multiple lines → "จำนวน N รายการ" reflects len(line_ids).
  • Create PA from PR → เรื่อง is empty and cannot be saved until filled; return-for-edit + resume does not overwrite an edited PA title.
  • On PR form, set โหมดจัดหา = ขอระบุเอง → save-blocked without vendor; switch to ให้พัสดุจัดหา → vendor field hidden and no longer required.

Sunny added 2 commits August 24, 2026 15:00
…eport count, PA title, vendor required

- report_purchase_request_approval: replace hardcoded "1 รายการ" with dynamic len(o.line_ids).
- PA title becomes PA-owned: drop title from _prepare_approval_vals so it no longer copies from PR, and mark title required in the form.
- purchase_request_procurement_mode: require vendor when procurement_mode = by_requester (ขอระบุเอง).
…ault, report stray marker, prepaid hint

- purchase_request_approval: default PA title to "รายงานขอซื้อ/จ้าง".
- report_purchase_request_approval: remove stray "-->" after the เอกสารคุณสมบัติ list item.
- purchase_request_kmitl: shorten prepaid vendor hint translation.
@PiyaChaiyanit PiyaChaiyanit added the status/ready-for-review Status: Issue is up for grabs label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/ready-for-review Status: Issue is up for grabs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant