Odoo Purchase Order Template

report_purchaseorder_document

Struktur Template Odoo QWeb

  • t-call Memanggil template lain (web.external_layout)
  • t-set Menyimpan variabel (o, address, layout_document_title)
  • t-field Menampilkan field dari model (o.partner_id, o.name)
  • t-if Kondisional (cek state draft/purchase/cancel)
  • t-foreach Loop item order_line
  • t-options Opsi formatting (monetary, date_only, widget)

PT. Contoh Perusahaan

Jl. Sudirman No. 123, Jakarta Pusat
DKI Jakarta 10220, Indonesia
T: +62 21 1234567 | info@contoh.com
NPWP: 01.234.567.8-012.000

PURCHASE ORDER

PO/2026/00123
Ahmad Wijaya
VENDOR-REF-001
13 Juli 2026
27 Juli 2026

Vendor Address

PT. Supplier Utama
Jl. Gatot Subroto No. 456
Jakarta Selatan 12190
T: +62 21 9876543
NPWP: 02.345.678.9-013.000

Shipping Address

PT. Contoh Perusahaan
Jl. TB Simatupang No. 789
Jakarta Selatan 12310
T: +62 21 5551234

Description Qty Unit Price Disc. Taxes Amount
Elektronik & Komputer
Laptop ASUS ROG Strix G15
G513QC-HN086W - AMD Ryzen 7
10 Pcs Rp 15.500.000 5% PPN 11% Rp 147.250.000
Monitor LG 27" 4K UHD
27UL850-W - USB-C HDR400
10 Pcs Rp 6.200.000 0% PPN 11% Rp 62.000.000
Keyboard Mechanical Logitech
G Pro X - Switch GX Blue
20 Pcs Rp 1.850.000 10% PPN 11% Rp 33.300.000
Subtotal    Rp 242.550.000
Barang harus dikemas dengan baik dan disertai kartu garansi resmi
Aksesoris
Mouse Wireless Logitech MX Master 3S
20 Pcs Rp 1.450.000 0% PPN 11% Rp 29.000.000
USB-C Hub Adapter 7-in-1
15 Pcs Rp 450.000 0% PPN 11% Rp 6.750.000
Subtotal    Rp 35.750.000
Untaxed Amount Rp 278.300.000
Taxes
PPN 11%: Rp 30.613.000
Rp 30.613.000
Total Rp 308.913.000

Notes:

Pengiriman dilakukan secara bertahap sesuai jadwal yang disepakati. Mohon konfirmasi penerimaan dalam 3 hari kerja setelah barang diterima.

Payment Terms: 30 Days After Invoice

Referensi Struktur Template

<template id="report_purchaseorder_document">
    <t t-call="web.external_layout">           ← Layout utama Odoo
        <t t-set="o" t-value="o.with_context(...)"/  ← Set bahasa
        <t t-set="address">...</t>                ← Alamat vendor
        <t t-if="o.dest_address_id">...</t>      ← Alamat pengiriman (opsional)

        <div class="page">
            <t t-set="layout_document_title">      ← Judul dinamis
                t-if="o.state in ['draft','sent','to approve']" → RFQ
                t-if="o.state == 'purchase'" → Purchase Order
                t-if="o.state == 'cancel'" → Cancelled
            </t>

            <table class="o_main_table">            ← Tabel item
                t-foreach="filtered_lines" t-as="line"  ← Loop order line
                    t-if="not line.display_type"         ← Produk biasa
                    t-if="line.display_type == 'line_section'" ← Section header
                    t-if="line.display_type == 'line_note'"    ← Catatan
            </table>

            <div id="total">                          ← Total pajak
                t-call="purchase.document_tax_totals"
            </div>

            <p t-field="o.note"/>                   ← Catatan PO
            <span t-field="o.payment_term_id"/>       ← Syarat bayar
        </div>
    </t>
</template>