summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-09-15 11:30:29 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-09-15 11:30:29 +0700
commitb3ec9281f0afe9da2b5c6bd207289de8cc5888c4 (patch)
tree3a410746919a4e83e2b64d1526ee898718f478b2
parentd44a0982075b8ddb134647a85531e8a68608af55 (diff)
push
-rw-r--r--indoteknik_custom/report/purchase_report.xml262
1 files changed, 67 insertions, 195 deletions
diff --git a/indoteknik_custom/report/purchase_report.xml b/indoteknik_custom/report/purchase_report.xml
index a6db2923..dedd100f 100644
--- a/indoteknik_custom/report/purchase_report.xml
+++ b/indoteknik_custom/report/purchase_report.xml
@@ -26,237 +26,101 @@
</template>
<template id="report_purchaseorder_website_document">
- <t t-call="web.external_layout">
+ <t t-call="web.html_container">
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />
-
- <style>
- @page {
- margin: 120px 25px 95px 25px;
- size: A4 portrait;
- }
-
- body {
- font-family: Arial, sans-serif;
- font-size: 12px;
- color: #000;
- line-height: 1.4;
- }
-
- .header {
- position: fixed;
- top: -90px;
- left: 0;
- right: 0;
- height: 100px;
- text-align: center;
- }
-
- .footer {
- position: fixed;
- bottom: -70px;
- left: 0;
- right: 0;
- height: 70px;
- text-align: center;
- font-size: 10px;
- }
-
- .article {
- margin: 0;
- padding: 0;
- }
-
- h2 {
- text-align: center;
- margin: 0;
- color: #d32f2f;
- font-weight: bold;
- font-size: 18px;
- padding: 5px 0;
- }
-
- h4 {
- text-align: center;
- margin: 0 0 15px 0;
- font-size: 14px;
- }
-
- table.info-table {
- width: 100%;
- margin-bottom: 16px;
- font-size: 12px;
- border-collapse: collapse;
- }
-
- table.info-table td {
- padding: 5px;
- vertical-align: top;
- }
-
- table.address-table {
- width: 100%;
- margin-bottom: 20px;
- border-collapse: collapse;
- }
-
- table.address-table td {
- border: 1px solid #ccc;
- padding: 8px;
- vertical-align: top;
- width: 50%;
- }
-
- table.items-table {
- width: 100%;
- border-collapse: collapse;
- margin-top: 10px;
- font-size: 11px;
- }
-
- table.items-table th {
- background: #f2f2f2;
- border: 1px solid #ccc;
- padding: 6px;
- text-align: center;
- font-weight: bold;
- }
-
- table.items-table td {
- border: 1px solid #ccc;
- padding: 6px;
- vertical-align: top;
- }
-
- .text-right {
- text-align: right;
- }
-
- .text-center {
- text-align: center;
- }
-
- .product-description {
- background: #fafafa;
- padding: 8px;
- font-size: 10px;
- border-left: 1px solid #ccc;
- border-right: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
- }
-
- .totals-table {
- margin-top: 20px;
- margin-left: auto;
- width: 40%;
- font-size: 12px;
- border-collapse: collapse;
- }
-
- .totals-table td {
- padding: 4px;
- }
-
- .page-break {
- page-break-after: always;
- }
-
- .notes {
- margin-top: 20px;
- font-size: 11px;
- }
- </style>
<!-- Header -->
<div class="header">
- <div style="text-align: center; margin-bottom: 10px;">
- <strong>PT INDOTEKNIK DOTCOM GEMILANG</strong><br/>
- www.indoteknik.com
- </div>
- <hr style="border-top: 1px solid #000; margin: 5px 0;"/>
+ <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2498521"
+ style="width:100%; display: block;"/>
</div>
- <!-- Footer -->
- <div class="footer">
- <hr style="border-top: 1px solid #000; margin: 5px 0;"/>
- <div style="text-align: center;">
- Jalan Bandengan Utara Blok 85A No.8-9, Kec. Penjaringan, Jakarta Utara DKI Jakarta 14440<br/>
- (021) 2933 8828 | 0817-1718-1922 | sales@indoteknik.com
- </div>
- </div>
<!-- PAGE CONTENT -->
- <div class="article">
+ <div class="article" style="margin: 0 1.5cm 0 1.5cm; ">
<!-- TITLE -->
- <h2>PURCHASE ORDER</h2>
- <h4>No. <span t-field="doc.name"/></h4>
+ <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 class="info-table">
+ <table style="width:100%; margin-bottom:16px; font-size:14px;">
<tr>
- <td style="width: 33%;"><strong>Term Of Payment:</strong> <span t-field="doc.payment_term_id.name"/></td>
- <td style="width: 33%;"><strong>Order Date:</strong> <span t-field="doc.date_order" t-options='{"widget": "date"}'/></td>
- <td style="width: 33%;"><strong>Responsible:</strong> <span t-field="doc.user_id.name"/></td>
+ <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 class="address-table">
+ <table style="width:100%; margin-bottom:24px; border-collapse:separate; border-spacing:16px 0;">
<tr>
- <td>
+ <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>
+ <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.state_id.name" t-if="doc.partner_id.state_id"/> - <span t-field="doc.partner_id.zip"/>
+ <span t-field="doc.partner_id.city"/> - <span t-field="doc.partner_id.zip"/>
</td>
</tr>
</table>
<!-- ORDER LINES -->
- <table class="items-table">
+ <table style="border-collapse:collapse; width:100%; margin-top:16px;">
+ <!-- HAPUS display: table-header-group biar cuma muncul sekali -->
<thead>
- <tr>
- <th style="width: 50%;">Description</th>
- <th style="width: 10%; text-align: center;">Quantity</th>
- <th style="width: 15%; text-align: right;">Unit Price</th>
- <th style="width: 10%; text-align: center;">Taxes</th>
- <th style="width: 15%; text-align: right;">Subtotal</th>
+ <tr style="background:#f2f2f2; font-size:10px; color:#666;">
+ <th>Description</th>
+ <th style="text-align:right;">Qty</th>
+ <th style="text-align:right;">Unit</th>
+ <th style="text-align:right;">Tax</th>
+ <th style="text-align:right;">Subtotal</th>
</tr>
</thead>
<tbody>
<t t-foreach="doc.order_line" t-as="line">
- <tr>
- <td>
- <div><strong><span t-field="line.product_id.default_code" t-options='{"widget": "char"}'/></strong></div>
- <div><span t-field="line.name"/></div>
+ <tr style="page-break-inside: avoid;">
+ <td style="border:1px solid #ccc; padding:4px;">
+ <span t-field="line.name"/>
</td>
- <td class="text-center">
- <span t-field="line.product_qty"/> <span t-field="line.product_uom.name"/>
+ <td style="border:1px solid #ccc; padding:4px; text-align:right;">
+ <span t-field="line.product_qty"/> <span t-field="line.product_uom"/>
</td>
- <td class="text-right">
- <span t-esc="formatLang(line.price_unit, digits=2)"/>
+ <td style="border:1px solid #ccc; padding:4px; text-align:right;">
+ <span t-field="line.price_unit"/>
</td>
- <td class="text-center">
- <t t-set="tax_descriptions" t-value="[]"/>
- <t t-foreach="line.taxes_id" t-as="tax">
- <t t-set="tax_descriptions" t-value="tax_descriptions + [tax.amount * 100]"/>
- </t>
- <span t-esc="', '.join(map(str, tax_descriptions)) + '%'" t-if="tax_descriptions"/>
+ <td style="border:1px solid #ccc; padding:4px; text-align:right;">
+ <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.taxes_id))"/>
</td>
- <td class="text-right">
- <span t-esc="formatLang(line.price_subtotal, digits=2)"/>
+ <td style="border:1px solid #ccc; padding:4px; text-align:right;">
+ <span t-field="line.price_subtotal"/>
</td>
</tr>
+
<t t-if="line.product_id.website_description">
- <tr>
- <td colspan="5" class="product-description">
- <div t-raw="line.product_id.website_description"/>
+ <tr style="page-break-inside: avoid;">
+ <td colspan="5"
+ style="
+ border-left:1px solid #ccc;
+ border-right:1px solid #ccc;
+ border-bottom:1px solid #ccc;
+ border-top:0;
+ padding:8px 12px;
+ background:#fafafa;
+ font-size:11px;
+ line-height:1.4;
+ page-break-inside: avoid;
+ ">
+ <div style="white-space: normal;" t-raw="line.product_id.website_description"/>
</td>
</tr>
</t>
@@ -264,28 +128,36 @@
</tbody>
</table>
+
<!-- TOTALS -->
- <table class="totals-table">
+ <table style="margin-top:20px; margin-left:auto; width:40%; font-size:14px;">
<tr>
<td><strong>Subtotal</strong></td>
- <td class="text-right"><span t-esc="formatLang(doc.amount_untaxed, digits=2)"/></td>
+ <td style="text-align:right;"><span t-field="doc.amount_untaxed"/></td>
</tr>
<tr>
<td>Taxes</td>
- <td class="text-right"><span t-esc="formatLang(doc.amount_tax, digits=2)"/></td>
+ <td style="text-align:right;"><span t-field="doc.amount_tax"/></td>
</tr>
<tr>
<td><strong>Total</strong></td>
- <td class="text-right"><span t-esc="formatLang(doc.amount_total, digits=2)"/></td>
+ <td style="text-align:right;"><span t-field="doc.amount_total"/></td>
</tr>
</table>
<!-- NOTES -->
- <div class="notes" t-if="doc.notes">
- <strong>Catatan:</strong><br/>
+ <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> \ No newline at end of file
+
+
+</odoo>