5 changed files with 187 additions and 59 deletions
@ -0,0 +1,87 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<template id="report_invoice_document" inherit_id="account.report_invoice_document"> |
|||
<xpath expr="//table" position="replace"> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Description</th> |
|||
<th>Quantity</th> |
|||
<th class="text-right">Unit Price</th> |
|||
<!--<span t-foreach="o.invoice_line" t-as="l">--> |
|||
<!--<span t-if="l.discount">--> |
|||
<span t-if="o.amount_discount"> |
|||
<th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th> |
|||
</span> |
|||
<!--</span>--> |
|||
<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> |
|||
<span t-if="o.amount_discount"> |
|||
<td class="text-right" groups="sale.group_discount_per_so_line"> |
|||
<span t-field="l.discount"/> |
|||
</td> |
|||
</span> |
|||
<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> |
|||
</xpath> |
|||
|
|||
<xpath expr="//div[@class='col-xs-4 pull-right']/table/tr[2]" position="after"> |
|||
<!--<t t-if="o.type=='out_invoice' or o.type=='out_refund'">--> |
|||
<t t-if="o.discount_rate"> |
|||
<tr> |
|||
<td>Discount</td> |
|||
<td class="text-right"> |
|||
<span t-field="o.amount_discount" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
|
|||
<!--</t>--> |
|||
</xpath> |
|||
<!--<xpath expr="//div[@class='col-xs-4 pull-right']" position="before">--> |
|||
<!--<t t-if="o.type=='out_invoice' or o.type=='out_refund'">--> |
|||
<!--<div class="col-xs-4">--> |
|||
<!--<t t-if="o.discount_rate">--> |
|||
<!--<table class="table table-condensed">--> |
|||
<!--<tr class="border-black">--> |
|||
<!--<td>Discount Type</td>--> |
|||
<!--<td class="text-right">--> |
|||
<!--<span t-field="o.discount_type"/>--> |
|||
<!--</td>--> |
|||
<!--</tr>--> |
|||
<!--<tr>--> |
|||
<!--<td>Discount rate</td>--> |
|||
<!--<td class="text-right">--> |
|||
<!--<span t-field="o.discount_rate"/>--> |
|||
<!--</td>--> |
|||
<!--</tr>--> |
|||
<!--<tr class="border-black"></tr>--> |
|||
<!--</table>--> |
|||
<!--</t>--> |
|||
<!--</div>--> |
|||
<!--</t>--> |
|||
<!--</xpath>--> |
|||
</template> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,40 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<template id="report_sale_order_document" inherit_id="sale.report_saleorder_document"> |
|||
|
|||
<xpath expr="//div[@class='col-xs-4 pull-right']/table/tr[2]" position="after"> |
|||
<t t-if="o.discount_rate"> |
|||
<tr> |
|||
<td>Discount</td> |
|||
<td class="text-right"> |
|||
<span t-field="o.amount_discount" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</xpath> |
|||
|
|||
<!--<xpath expr="//div[@class='col-xs-4 pull-right']" position="before">--> |
|||
<!--<div class="col-xs-4">--> |
|||
<!--<t t-if="o.discount_rate">--> |
|||
<!--<table class="table table-condensed">--> |
|||
<!--<tr class="border-black">--> |
|||
<!--<td>Discount Type</td>--> |
|||
<!--<td class="text-right">--> |
|||
<!--<span t-field="o.discount_type"/>--> |
|||
<!--</td>--> |
|||
<!--</tr>--> |
|||
<!--<tr>--> |
|||
<!--<td>Discount Rate</td>--> |
|||
<!--<td class="text-right">--> |
|||
<!--<span t-field="o.discount_rate"/>--> |
|||
<!--</td>--> |
|||
<!--</tr>--> |
|||
<!--<tr class="border-black"></tr>--> |
|||
<!--</table>--> |
|||
<!--</t>--> |
|||
<!--</div>--> |
|||
<!--</xpath>--> |
|||
</template> |
|||
</data> |
|||
</openerp> |
Loading…
Reference in new issue