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.
98 lines
4.6 KiB
98 lines
4.6 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<template id="receipt_report_document">
|
|
<t t-call="report.external_layout">
|
|
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
|
|
<div class="page">
|
|
<div class="row">
|
|
</div>
|
|
|
|
<h2>
|
|
<span >Receipt</span>
|
|
</h2>
|
|
|
|
<div class="row mt32 mb32">
|
|
<div class="col-xs-4" t-if="o.pos_reference">
|
|
<strong>Ref: </strong>
|
|
<span t-esc="o.pos_reference" />
|
|
</div>
|
|
<div class="col-xs-4" t-if="o.date_order">
|
|
<strong>Date:</strong>
|
|
<p t-field="o.date_order"/>
|
|
</div>
|
|
|
|
<div class="col-xs-4" t-if="o.partner_id">
|
|
<strong>Customer :</strong>
|
|
<p t-field="o.partner_id.name"/>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Is there a discount on at least one line? -->
|
|
<t t-set="display_discount" t-value="any([l.discount for l in o.lines])"/>
|
|
|
|
<table class="table table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Description</th>
|
|
<th class="text-right">Quantity</th>
|
|
<th class="text-right">Unit Price</th>
|
|
<th t-if="display_discount" class="text-right">Disc.(%)</th>
|
|
<th class="text-right">Taxes</th>
|
|
<th class="text-right">Tax Excluded Price</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="invoice_tbody">
|
|
<tr t-foreach="o.lines" t-as="l">
|
|
<td><span t-field="l.name"/></td>
|
|
<td class="text-right">
|
|
<span t-field="l.qty"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="l.price_unit"/>
|
|
</td>
|
|
<td t-if="display_discount" class="text-right">
|
|
<span t-field="l.discount"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="', '.join(map(lambda x: (x.description or x.name), l.tax_ids_after_fiscal_position))"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="l.price_subtotal"
|
|
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-4 pull-right">
|
|
<table class="table table-condensed">
|
|
<tr class="border-black">
|
|
<td><strong>Tax</strong></td>
|
|
<td class="text-right">
|
|
<span t-field="o.amount_tax" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
|
</td>
|
|
</tr>
|
|
<tr class="border-black">
|
|
<td><strong>Total</strong></td>
|
|
<td class="text-right">
|
|
<span t-field="o.amount_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
|
|
<template id="receipt_report">
|
|
<t t-call="report.html_container">
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-call="order_reprinting_pos.receipt_report_document" t-lang="o.partner_id.lang"/>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
</data>
|
|
</odoo>
|
|
|