You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: inventory PDF export via headless and report refinements
- Add admin-only /api/orders/inventory.pdf route that 303-redirects
the user agent to the Headless service (headless.bemisc.com) with
a URL pointing back at the HTML inventory report, authenticated
via the admin account's own secret key (skey query parameter).
- Expose the new export as "Inventory PDF" via a context link on
the Order model alongside the existing "Inventory Report" entry.
- Configure via BUDY_HEADLESS_URL and BUDY_HEADLESS_KEY; use
appier's url_for absolute mode so BASE_URL drives the public
report URL handed to Headless.
- Polish the A4 print stylesheet: switch the line-items table to
border-collapse: collapse so headers, footers and side rules
repeat cleanly across page breaks; keep thead/tfoot at 1pt and
body rows at 0.5pt; use a 2pt top rule (with no extra padding)
to mark order boundaries so operators can spot the transition.
- Carry thumbnails into the print output with a compact 8mm cell.
- Suffix every quantity cell (inventory and order reports, body
rows and footer totals, plus the inventory Summary total units)
with an "x" unit for readability.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
* Inventory HTML report for selected orders at `/api/orders/inventory`, available from the admin via the "Inventory Report" context link
13
13
* Per-order HTML report at `/api/orders/<id>/report`, available from the admin via the "Report" link and cross-linked from the inventory report rows
14
+
* Inventory PDF export at `/api/orders/inventory.pdf` that renders the inventory report via the Headless service and streams the resulting PDF inline; admin-only and reachable via the new "Inventory PDF" context link. Requires `BASE_URL`, `BUDY_HEADLESS_URL` and `BUDY_HEADLESS_KEY` configuration
14
15
* Reusable `report/base.html.tpl` template with a typographic, mailog-inspired look and a dedicated `report.css` stylesheet
15
16
* A4 portrait print stylesheet for the inventory report, with a per-row tick box column, repeating table header and `Page X of Y` numbering
16
17
*`scripts/load_inventory_demo.py` utility for populating a local Budy instance with sample products and orders to exercise the inventory report
0 commit comments