159 lines
7.1 KiB
XML
159 lines
7.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
<template id="report_invoice_document">
|
|
<t t-call="report.external_layout">
|
|
<div class="page">
|
|
<div class="row">
|
|
<div class="col-xs-5 col-xs-offset-7">
|
|
<address t-field="o.partner_id"
|
|
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' />
|
|
<span t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></span>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>
|
|
<span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">Invoice</span>
|
|
<span t-if="o.type == 'out_invoice' and o.state == 'proforma2'">PRO-FORMA</span>
|
|
<span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>
|
|
<span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice</span>
|
|
<span t-if="o.type == 'out_refund'">Refund</span>
|
|
<span t-if="o.type == 'in_refund'">Supplier Refund</span>
|
|
<span t-if="o.type == 'in_invoice'">Supplier Invoice</span>
|
|
<span t-field="o.number"/>
|
|
</h2>
|
|
|
|
<div class="row mt32 mb32">
|
|
<div class="col-xs-2" t-if="o.name">
|
|
<strong>Description:</strong>
|
|
<p t-field="o.name"/>
|
|
</div>
|
|
<div class="col-xs-2" t-if="o.date_invoice">
|
|
<strong>Invoice Date:</strong>
|
|
<p t-field="o.date_invoice"/>
|
|
</div>
|
|
<div class="col-xs-2" t-if="o.origin">
|
|
<strong>Source:</strong>
|
|
<p t-field="o.origin"/>
|
|
</div>
|
|
<div class="col-xs-2" t-if="o.partner_id.ref">
|
|
<strong>Customer Code:</strong>
|
|
<p t-field="o.partner_id.ref"/>
|
|
</div>
|
|
<div class="col-xs-2" t-if="o.reference">
|
|
<strong>Reference:</strong>
|
|
<p t-field="o.reference"/>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="table table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Description</th>
|
|
<th>Quantity</th>
|
|
<th class="text-right">Unit Price</th>
|
|
<th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th>
|
|
<th class="text-right">Taxes</th>
|
|
<th class="text-right">Amount</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="invoice_tbody">
|
|
<tr t-foreach="o.invoice_line" t-as="l">
|
|
<td><span t-field="l.name"/></td>
|
|
<td>
|
|
<span t-field="l.quantity"/>
|
|
<span t-field="l.uos_id" groups="product.group_uom"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="l.price_unit"/>
|
|
</td>
|
|
<td class="text-right" groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
|
|
<td class="text-right">
|
|
<span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="l.price_subtotal"
|
|
t-field-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>Total Without Taxes</strong></td>
|
|
<td class="text-right">
|
|
<span t-field="o.amount_untaxed" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Taxes</td>
|
|
<td class="text-right">
|
|
<span t-field="o.amount_tax" t-field-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-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row" t-if="o.tax_line">
|
|
<div class="col-xs-6">
|
|
<table class="table table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Tax</th>
|
|
<th class="text-right">Base</th>
|
|
<th class="text-right">Amount</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr t-foreach="o.tax_line" t-as="t">
|
|
<td><span t-field="t.name"/></td>
|
|
<td class="text-right">
|
|
<span t-field="t.base"
|
|
t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="t.amount"
|
|
t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<p t-if="o.comment">
|
|
<strong>Comment:</strong>
|
|
<span t-field="o.comment"/>
|
|
</p>
|
|
<p t-if="o.payment_term.note">
|
|
<strong>Payment Term:</strong>
|
|
<span t-field="o.payment_term.note"/>
|
|
</p>
|
|
<p t-if="o.fiscal_position.note">
|
|
<strong>Fiscal Position Remark:</strong>
|
|
<span t-field="o.fiscal_position.note"/>
|
|
</p>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
|
|
<template id="report_invoice">
|
|
<t t-call="report.html_container">
|
|
<t t-foreach="doc_ids" t-as="doc_id">
|
|
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'account.report_invoice_document')"/>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
</data>
|
|
</openerp>
|