mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 13:25:20 +00:00
get_data() grouped only by Purchase Order Item while selecting Purchase Order parent columns. MariaDB allows this loose GROUP BY; Postgres rejects it with "column ... must appear in the GROUP BY clause". Add the Purchase Order PK (po.name) to the GROUP BY. po.name is 1:1 with the already-grouped po_item.name, so groups are unchanged and the result is identical on MariaDB. Adds a test (no test file existed) that runs the report and asserts the PO is listed, exercising the GROUP BY on both engines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>