summaryrefslogtreecommitdiff
path: root/indoteknik_custom/report/purchase_report.xml
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/report/purchase_report.xml')
-rw-r--r--indoteknik_custom/report/purchase_report.xml149
1 files changed, 149 insertions, 0 deletions
diff --git a/indoteknik_custom/report/purchase_report.xml b/indoteknik_custom/report/purchase_report.xml
new file mode 100644
index 00000000..168428a6
--- /dev/null
+++ b/indoteknik_custom/report/purchase_report.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <!-- Report Action -->
+ <record id="action_report_purchaseorder_website" model="ir.actions.report">
+ <field name="name">Purchase Order (Website)</field>
+ <field name="model">purchase.order</field>
+ <field name="report_type">qweb-pdf</field>
+ <field name="report_name">indoteknik_custom.report_purchaseorder_website</field>
+ <field name="report_file">indoteknik_custom.report_purchaseorder_website</field>
+ <field name="print_report_name">
+ ('PO - %s - %s' % (object.partner_id.name, object.name))
+ </field>
+ <field name="binding_model_id" ref="purchase.model_purchase_order"/>
+ <field name="binding_type">report</field>
+ </record>
+ </data>
+
+ <!-- Wrapper Template -->
+ <template id="report_purchaseorder_website">
+ <t t-call="web.html_container">
+ <t t-foreach="docs" t-as="doc">
+ <t t-call="indoteknik_custom.report_purchaseorder_website_document" t-lang="doc.partner_id.lang"/>
+ </t>
+ </t>
+ </template>
+
+ <template id="report_purchaseorder_website_document">
+ <t t-call="web.html_container">
+ <t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />
+
+ <!-- Header -->
+ <div class="header">
+ <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2498521"
+ style="width:100%; display: block;"/>
+ </div>
+
+
+ <!-- PAGE CONTENT -->
+ <div class="article" style="margin: 0 1.5cm 0 1.5cm; ">
+ <!-- TITLE -->
+ <h2 style="text-align:center; margin:0; color:#d32f2f; font-weight:bold;">
+ PURCHASE ORDER
+ </h2>
+ <h4 style="text-align:center; margin:0 0 20px 0;">
+ No. <span t-field="doc.name"/>
+ </h4>
+
+ <!-- TOP INFO -->
+ <table style="width:100%; margin-bottom:16px; font-size:14px;">
+ <tr>
+ <td><strong>Term Of Payment:</strong> <span t-field="doc.payment_term_id.name"/></td>
+ <td><strong>Order Date:</strong> <span t-field="doc.date_order" t-options='{"widget": "date"}'/></td>
+ <td><strong>Responsible:</strong> <span t-field="doc.user_id"/></td>
+ </tr>
+ </table>
+
+ <!-- VENDOR & DELIVERY -->
+ <table style="width:100%; margin-bottom:24px; border-collapse:separate; border-spacing:16px 0;">
+ <tr>
+ <td style="width:50%; border:1px solid #ccc; padding:8px; vertical-align:top;">
+ <strong>Alamat Pengiriman:</strong><br/>
+ PT Indoteknik (Bandengan 1 Depan)<br/>
+ Jl. Bandengan Utara Komp A 8 B<br/>
+ RT. Penjaringan, Kec. Penjaringan, Jakarta (BELAKANG INDOMARET)<br/>
+ JK 14440 - Indonesia
+ </td>
+ <td style="width:50%; border:1px solid #ccc; padding:8px; vertical-align:top;">
+ <strong>Nama Vendor:</strong><br/>
+ <span t-field="doc.partner_id.name"/><br/>
+ <span t-field="doc.partner_id.street"/><br/>
+ <span t-field="doc.partner_id.city"/> - <span t-field="doc.partner_id.zip"/>
+ </td>
+ </tr>
+ </table>
+
+ <!-- ORDER LINES -->
+ <table style="border-collapse:collapse; width:100%; margin-top:16px;">
+ <tbody>
+ <tr style="background:#f2f2f2;">
+ <td style="border:1px solid #ccc;">Description</td>
+ <td style="border:1px solid #ccc; text-align:right;">Quantity</td>
+ <td style="border:1px solid #ccc; text-align:right;">Unit Price</td>
+ <td style="border:1px solid #ccc; text-align:right;">Taxes</td>
+ <td style="border:1px solid #ccc; text-align:right;">Subtotal</td>
+ </tr>
+ </tbody>
+ <tbody>
+ <t t-foreach="doc.order_line" t-as="line">
+ <tr>
+ <td style="border:1px solid #ccc;">
+ <span t-field="line.name"/>
+ </td>
+ <td style="border:1px solid #ccc; text-align:right;">
+ <span t-field="line.product_qty"/> <span t-field="line.product_uom"/>
+ </td>
+ <td style="border:1px solid #ccc; text-align:right;">
+ <span t-field="line.price_unit"/>
+ </td>
+ <td style="border:1px solid #ccc; text-align:right;">
+ <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.taxes_id))"/>
+ </td>
+ <td style="border:1px solid #ccc; text-align:right;">
+ <span t-field="line.price_subtotal"/>
+ </td>
+ </tr>
+ <t t-if="line.product_id.website_description">
+ <tr>
+ <td colspan="5" style="margin-top: 1rem;padding: 1rem; background:#fafafa; border-left:1px solid #ccc; border-right:1px solid #ccc;">
+ <div t-raw="line.product_id.website_description"/>
+ </td>
+ </tr>
+ </t>
+ </t>
+ </tbody>
+ </table>
+
+ <!-- TOTALS -->
+ <table style="margin-top:20px; margin-left:auto; width:40%; font-size:14px;">
+ <tr>
+ <td><strong>Subtotal</strong></td>
+ <td style="text-align:right;"><span t-field="doc.amount_untaxed"/></td>
+ </tr>
+ <tr>
+ <td>Taxes</td>
+ <td style="text-align:right;"><span t-field="doc.amount_tax"/></td>
+ </tr>
+ <tr>
+ <td><strong>Total</strong></td>
+ <td style="text-align:right;"><span t-field="doc.amount_total"/></td>
+ </tr>
+ </table>
+
+ <!-- NOTES -->
+ <div style="margin-top:24px;">
+ <p t-field="doc.notes"/>
+ </div>
+ </div>
+ <!-- STATIC FOOTER -->
+ <div class="footer">
+ <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2859765"
+ style="width:100%; display: block;"/>
+ </div>
+
+ </t>
+ </template>
+
+
+</odoo>