You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
203 lines
9.8 KiB
203 lines
9.8 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- Purchase order report attractive template-->
|
|
<template id="report_purchaseorder_attractive_document">
|
|
<t t-if="o and 'company_id' in o">
|
|
<t t-set="company" t-value="o.company_id"/>
|
|
</t>
|
|
<t t-if="not o or not 'company_id' in o">
|
|
<t t-set="company" t-value="res_company"/>
|
|
</t>
|
|
<div class="header row mt32 mb32">
|
|
<div class="page-header col-12">
|
|
<div t-attf-class="pull-left">
|
|
<t t-if="company.logo">
|
|
<img t-if="company.logo"
|
|
t-att-src="image_data_uri(company.logo)"
|
|
style="max-height: 80px;"/>
|
|
</t>
|
|
</div>
|
|
<div t-attf-class="pull-left"
|
|
t-attf-style="font:14px lucida-console,sans-serif; color:#{o.theme_id.company_text_color} !important;">
|
|
<span t-field="company.partner_id"/>
|
|
<br/>
|
|
<span t-field="company.partner_id.street"/>
|
|
<br/>
|
|
<span t-field="company.partner_id.street2"/>
|
|
<br/>
|
|
<span t-field="company.partner_id.city"/>
|
|
<br/>
|
|
<span t-field="company.partner_id.country_id"/>
|
|
<br/>
|
|
<span t-field="company.partner_id.vat"/>
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<t t-call="web.external_layout">
|
|
<t t-set="o" t-value="o.with_context(lang=o.partner_id.lang)"/>
|
|
<t t-set="forced_vat"
|
|
t-value="o.fiscal_position_id.foreign_vat"/> <!-- So that it appears in the footer of the report instead of the company VAT if it's set -->
|
|
<t t-set="address">
|
|
<div class="mt-4"
|
|
t-attf-style=" background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};">
|
|
<h2 t-if="o.state in ['draft', 'sent', 'to approve']">
|
|
Request for Quotation #
|
|
<span t-field="o.name"/>
|
|
</h2>
|
|
<h2 t-if="o.state in ['purchase', 'done']">Purchase Order #
|
|
<span t-field="o.name"/>
|
|
</h2>
|
|
<h2 t-if="o.state == 'cancel'">Cancelled Purchase Order #
|
|
<span t-field="o.name"/>
|
|
</h2>
|
|
</div>
|
|
</t>
|
|
|
|
<table class="table table-sm mt-4"
|
|
t-attf-style=" background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};">
|
|
<thead style="display: table-row-group">
|
|
<tr t-attf-style="color:#{o.theme_id.customer_text_color} !important;">
|
|
<th name="th_description">
|
|
<strong>Vendor</strong>
|
|
</th>
|
|
<th t-if="o.dest_address_id" class="text-center">
|
|
<strong>Shipping Address</strong>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr t-attf-style="color:#{o.theme_id.customer_text_color} !important;">
|
|
<td class="text-center">
|
|
<div t-field="o.partner_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "vat"], "no_marker": True, "phone_icons": True}'/>
|
|
</td>
|
|
<td class="text-end">
|
|
<t t-if="o.dest_address_id">
|
|
<t t-set="information_block">
|
|
<strong>Shipping address:</strong>
|
|
<div t-field="o.dest_address_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'
|
|
name="purchase_shipping_address"/>
|
|
</t>
|
|
</t>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<br></br>
|
|
<br></br>
|
|
<br></br>
|
|
<table class="table table-sm o_main_table mt-4">
|
|
<thead t-attf-style=" background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};">
|
|
<tr>
|
|
<th name="th_description">
|
|
<strong>Order Date</strong>
|
|
</th>
|
|
<th name="th_taxes">
|
|
<strong>Scheduled Date</strong>
|
|
</th>
|
|
<th name="th_date_req" class="text-center">
|
|
<strong>Approval Date</strong>
|
|
</th>
|
|
<th name="th_quantity" class="text-end">
|
|
<strong>Payment Term</strong>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr t-attf-style="color:#{o.theme_id.customer_text_color} !important;">
|
|
<td class="text-end">
|
|
<div t-if="o.date_order">
|
|
<span t-field="o.date_order" class="m-0"/>
|
|
</div>
|
|
</td>
|
|
<td class="text-end">
|
|
<div t-if="o.date_planned">
|
|
<span t-field="o.date_planned" class="m-0"/>
|
|
</div>
|
|
</td>
|
|
<td class="text-end">
|
|
<div t-if="o.state in ['purchase','done'] and o.date_approve">
|
|
<span t-field="o.date_approve" class="m-0"/>
|
|
</div>
|
|
</td>
|
|
<td class="text-end">
|
|
<div t-if="o.payment_term_id">
|
|
<span t-field="o.payment_term_id.name"
|
|
class="m-0"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<br></br>
|
|
<br></br>
|
|
<br></br>
|
|
<br></br>
|
|
<div class="page">
|
|
<div class="oe_structure"/>
|
|
|
|
<table class="table table-sm mt-4">
|
|
<thead t-attf-style=" background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};">
|
|
<tr>
|
|
<th name="th_description">
|
|
<strong>Description</strong>
|
|
</th>
|
|
<th name="th_expected_date" class="text-center">
|
|
<strong>Expected Date</strong>
|
|
</th>
|
|
<th name="th_quantity" class="text-end">
|
|
<strong>Qty</strong>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="o.order_line" t-as="order_line">
|
|
<tr t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
|
|
t-att-class="'bg-200 fw-bold o_line_section' if order_line.display_type == 'line_section' else 'fst-italic o_line_note' if order_line.display_type == 'line_note' else ''">
|
|
<t t-if="not order_line.display_type">
|
|
<td id="product">
|
|
<span t-field="order_line.name"/>
|
|
</td>
|
|
<td class="text-center">
|
|
<span t-field="order_line.date_planned"/>
|
|
</td>
|
|
<td class="text-end">
|
|
<span t-field="order_line.product_qty"/>
|
|
<span t-field="order_line.product_uom"
|
|
groups="uom.group_uom"/>
|
|
</td>
|
|
</t>
|
|
<t t-else="">
|
|
<td colspan="99" id="section">
|
|
<span t-field="order_line.name"/>
|
|
</td>
|
|
</t>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
<div id="total" class="row justify-content-end"
|
|
t-attf-style=" background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};">
|
|
<div class="col-12">
|
|
<table class="table table-sm">
|
|
<t t-set="tax_totals" t-value="o.tax_totals"/>
|
|
<t t-call="account.document_tax_totals"/>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<br></br>
|
|
<br></br>
|
|
<br></br>
|
|
<div t-attf-style=" background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};">
|
|
<span></span>
|
|
<span></span>
|
|
<span>Note</span>
|
|
<p t-field="o.notes" class="mt-4"/>
|
|
<div class="oe_structure"/>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
</odoo>
|
|
|