Skip to main content

T3 report

The T3 report is the PDF of an outbound DSCSA document: its transaction information, transaction history and transaction statement, in one file a person can read. The modules render it once, when the document is posted, and store it with the document. Its sections, field by field, are described for users on DSCSA documents.

How it is produced​

ItemValue
Report actionT3 Report (DSCSA) on dscsa.document (aglow_rx_tracking.action_report_dscsa_t3), QWeb PDF, in the ⚙ (Actions) print menu
Templateaglow_rx_tracking.report_dscsa_t3, one aglow_rx_tracking.report_dscsa_t3_document per document
Paper formatDSCSA T3 (US Letter): Letter, portrait, margins 12 mm top, 16 mm bottom, 10 mm left and right, 90 dpi
File nameT3-<document number>.pdf, the number with every character other than letters, digits, _, . and - replaced by -
Languagethe trading partner's language, else the user's
Contentbuilt only from the document's frozen snapshot; dates as MM/DD/YYYY; serial numbers four per row
  • Rendered once. The PDF is rendered when the document is posted, in the same transaction as the validation of the delivery, and stored as one of the document's files with its SHA-256. Printing it again (the print menu, Download T3, an email, the portal) serves the stored file; Odoo's report attachment mechanism is set to reuse it, and the report is never generated again for a posted document.
  • A PDF or nothing. Odoo renders the PDF with wkhtmltopdf. If it can't produce a PDF, the validation of the delivery is refused with "The T3 report of DSCSA document … could not be rendered as a PDF.", because a delivery isn't done without its document. Install wkhtmltopdf as Odoo's installation documentation describes.
  • The report styles are loaded by wkhtmltopdf from Odoo's own web address when the document is posted. See the known issue PF-W08-04 on DSCSA documents for what happens when that address isn't reachable.
  • Lot-level documents (customers with the small-dispenser exemption) say so in the heading and list no serial numbers.
  • Inbound documents have no T3 report of the modules: their file is the supplier's own EPCIS file.

With the 3PL add-on, a document issued in an owner's name shows the owner as the seller, and the owner profile's "Shipped on Behalf Of" Line option adds a line naming the 3PL as the shipper.

Changing the layout​

The report is a standard QWeb report, so a module can change its layout with a view that inherits aglow_rx_tracking.report_dscsa_t3_document. The template's structure and the values it receives are internal, not an extension point: check such a change after every update of the modules. A change applies only to documents posted afterwards; the stored files of earlier documents never change.