Files
stock-rma/rma/report/rma_report_templates.xml
2020-05-29 17:35:24 +02:00

274 lines
12 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_rma_order_line_document">
<t t-call="web.external_layout">
<t
t-set="doc"
t-value="doc.with_context({'lang':doc.partner_id.lang})"
/>
<div class="page">
<div class="oe_structure" />
<div class="row">
<div class="col-6">
<t
t-if="(doc.customer_to_supplier==False and doc.type=='customer') or (doc.supplier_to_customer==False and doc.type=='supplier')"
>
<strong>Shipping address:</strong>
<div class="mt8">
<div
t-field="doc.in_warehouse_id.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'
/>
<p
t-if="doc.in_warehouse_id.partner_id.vat"
>VAT: <span
t-field="doc.in_warehouse_id.partner_id.vat"
/></p>
</div>
</t>
<div
t-if="doc.customer_to_supplier and doc.type=='customer'"
class="mt8"
>
<strong>Shipping address:</strong>
<div
t-field="doc.supplier_address_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'
/>
<p t-if="doc.supplier_address_id.vat">VAT: <span
t-field="doc.supplier_address_id.vat"
/></p>
</div>
<div
t-if="doc.supplier_to_customer and doc.type=='supplier'"
class="mt8"
>
<strong>Shipping address:</strong>
<div
t-field="doc.customer_address_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'
/>
<p t-if="doc.customer_address_id.vat">VAT: <span
t-field="doc.customer_address_id.vat"
/></p>
</div>
</div>
<div class="col-3 offset-1">
<strong t-if="doc.type=='customer'">Customer:</strong>
<strong t-if="doc.type=='supplier'">Supplier:</strong>
<div
t-field="doc.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
/>
</div>
</div>
<h2 class="mt32">
<span t-field="doc.name" />
</h2>
<div class="row mt32 mb32" id="informations">
<div t-if="doc.origin" class="col-3">
<strong>Origin Reference:</strong>
<p t-field="doc.origin" />
</div>
<div t-if="doc.create_date" class="col-3">
<strong>Date Ordered:</strong>
<p t-field="doc.create_date" />
</div>
<div t-if="doc.requested_by.name" class="col-3">
<strong>Contact Person:</strong>
<p t-field="doc.requested_by.name" />
</div>
<div
name="operation_id"
t-if="doc.operation_id"
class="col-3"
>
<strong>Operation:</strong>
<p t-field="doc.operation_id.name" />
</div>
</div>
<table class="table table-condensed">
<thead>
<tr>
<th>Product</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
</tr>
</thead>
<tbody>
<tr>
<td><span t-field="doc.product_id" /></td>
<td class="text-right">
<span t-field="doc.product_qty" />
<span
t-field="doc.uom_id"
groups="uom.group_uom"
/>
</td>
<td class="text-right">
<span
t-field="doc.price_unit"
t-options='{"widget": "monetary", "display_currency": doc.currency_id}'
/>
</td>
</tr>
</tbody>
</table>
<div t-if="doc.description">
<strong><p>Description</p></strong>
<span t-field="doc.description" />
</div>
<div t-if="doc.conditions">
<strong><p>Term and conditions</p></strong>
<span t-field="doc.conditions" />
</div>
</div>
</t>
</template>
<template id="report_rma_order_line">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t
t-call="rma.report_rma_order_line_document"
t-lang="doc.partner_id.lang"
/>
</t>
</t>
</template>
<template id="report_rma_order_document">
<t t-call="web.external_layout">
<t
t-set="doc"
t-value="doc.with_context({'lang':doc.partner_id.lang})"
/>
<div class="page">
<div class="oe_structure" />
<div class="row">
<div class="col-6">
<t
t-if="(doc.customer_to_supplier==False and doc.type=='customer') or (doc.supplier_to_customer==False and doc.type=='supplier')"
>
<strong>Shipping address:</strong>
<div class="mt8">
<div
t-field="doc.in_warehouse_id.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'
/>
<p
t-if="doc.in_warehouse_id.partner_id.vat"
>VAT: <span
t-field="doc.in_warehouse_id.partner_id.vat"
/></p>
</div>
</t>
<div
t-if="doc.customer_to_supplier and doc.type=='customer'"
class="mt8"
>
<strong>Shipping address:</strong>
<div
t-field="doc.supplier_address_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'
/>
<p t-if="doc.supplier_address_id.vat">VAT: <span
t-field="doc.supplier_address_id.vat"
/></p>
</div>
<div
t-if="doc.supplier_to_customer and doc.type=='supplier'"
class="mt8"
>
<strong>Shipping address:</strong>
<div
t-field="doc.customer_address_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'
/>
<p t-if="doc.customer_address_id.vat">VAT: <span
t-field="doc.customer_address_id.vat"
/></p>
</div>
</div>
<div class="col-3 offset-1">
<strong t-if="doc.type=='customer'">Customer:</strong>
<strong t-if="doc.type=='supplier'">Supplier:</strong>
<div
t-field="doc.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
/>
</div>
</div>
<h2 class="mt32">
<span t-field="doc.name" />
</h2>
<div class="row mt32 mb32" id="informations">
<div t-if="doc.reference" class="col-3">
<strong>Reference:</strong>
<p t-field="doc.reference" />
</div>
<div t-if="doc.date_rma" class="col-3">
<strong>Date Ordered:</strong>
<p t-field="doc.date_rma" />
</div>
<div t-if="doc.requested_by.name" class="col-3">
<strong>Contact Person:</strong>
<p t-field="doc.requested_by.name" />
</div>
</div>
<table class="table table-condensed">
<thead>
<tr>
<th>Origin</th>
<th>Operation</th>
<th>Product</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
</tr>
</thead>
<tbody>
<tr t-foreach="doc.rma_line_ids" t-as="l">
<td><span t-field="l.origin" /></td>
<td><span t-field="l.operation_id.name" /></td>
<td><span t-field="l.product_id" /></td>
<td class="text-right">
<span t-field="l.product_qty" />
<span
t-field="l.uom_id"
groups="uom.group_uom"
/>
</td>
<td class="text-right">
<span t-field="l.price_unit" />
</td>
</tr>
</tbody>
</table>
<div t-if="doc.comment">
<strong><p>Additional Information</p></strong>
<span t-field="doc.comment" />
</div>
</div>
</t>
</template>
<template id="report_rma_order">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t
t-call="rma.report_rma_order_document"
t-lang="doc.partner_id.lang"
/>
</t>
</t>
</template>
</odoo>