Browse Source

Reports Updated

master
cybroodoo 10 years ago
parent
commit
5cfb0b6abf
  1. 2
      sale_discount_total/static/description/index.html
  2. 69
      sale_discount_total/views/invoice_report.xml
  3. 87
      sale_discount_total/views/invoice_report.xml~
  4. 48
      sale_discount_total/views/sale_order_report.xml
  5. 40
      sale_discount_total/views/sale_order_report.xml~

2
sale_discount_total/static/description/index.html

@ -17,7 +17,7 @@
System will update the value of Discount and Total System will update the value of Discount and Total
</p> </p>
<p> <p>
These Details are also updated in Printable PDF Reports. The total discount amount will be present in Printable PDF Reports.
</p> </p>
</div> </div>
<div class="oe_row_img oe_centered oe_mt32"> <div class="oe_row_img oe_centered oe_mt32">

69
sale_discount_total/views/invoice_report.xml

@ -9,11 +9,9 @@
<th>Description</th> <th>Description</th>
<th>Quantity</th> <th>Quantity</th>
<th class="text-right">Unit Price</th> <th class="text-right">Unit Price</th>
<span t-foreach="o.invoice_line" t-as="l"> <!--<span t-if="o.amount_discount">-->
<span t-if="l.discount"> <th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th>
<th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th> <!--</span>-->
</span>
</span>
<th class="text-right">Taxes</th> <th class="text-right">Taxes</th>
<th class="text-right">Amount</th> <th class="text-right">Amount</th>
</tr> </tr>
@ -28,8 +26,11 @@
<td class="text-right"> <td class="text-right">
<span t-field="l.price_unit"/> <span t-field="l.price_unit"/>
</td> </td>
<span t-if="l.discount"><td class="text-right" groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td></span> <!--<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"> <td class="text-right">
<span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/> <span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/>
</td> </td>
@ -43,41 +44,41 @@
</xpath> </xpath>
<xpath expr="//div[@class='col-xs-4 pull-right']/table/tr[2]" position="after"> <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.type=='out_invoice' or o.type=='out_refund'">-->
<t t-if="o.discount_rate"> <!--<t t-if="o.discount_rate">-->
<tr> <tr>
<td>Discount</td> <td>Discount</td>
<td class="text-right"> <td class="text-right">
<span t-field="o.amount_discount" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/> <span t-field="o.amount_discount" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td> </td>
</tr> </tr>
</t> <!--</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> </t>
</xpath> </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> </template>
</data> </data>
</openerp> </openerp>

87
sale_discount_total/views/invoice_report.xml~

@ -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>

48
sale_discount_total/views/sale_order_report.xml

@ -4,37 +4,37 @@
<template id="report_sale_order_document" inherit_id="sale.report_saleorder_document"> <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"> <xpath expr="//div[@class='col-xs-4 pull-right']/table/tr[2]" position="after">
<t t-if="o.discount_rate"> <!--<t t-if="o.discount_rate">-->
<tr> <tr>
<td>Discount</td> <td>Discount</td>
<td class="text-right"> <td class="text-right">
<span t-field="o.amount_discount" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/> <span t-field="o.amount_discount" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td> </td>
</tr> </tr>
</t> <!--</t>-->
</xpath> </xpath>
<xpath expr="//div[@class='col-xs-4 pull-right']" position="before"> <!--<xpath expr="//div[@class='col-xs-4 pull-right']" position="before">-->
<div class="col-xs-4"> <!--<div class="col-xs-4">-->
<t t-if="o.discount_rate"> <!--<t t-if="o.discount_rate">-->
<table class="table table-condensed"> <!--<table class="table table-condensed">-->
<tr class="border-black"> <!--<tr class="border-black">-->
<td>Discount Type</td> <!--<td>Discount Type</td>-->
<td class="text-right"> <!--<td class="text-right">-->
<span t-field="o.discount_type"/> <!--<span t-field="o.discount_type"/>-->
</td> <!--</td>-->
</tr> <!--</tr>-->
<tr> <!--<tr>-->
<td>Discount Rate</td> <!--<td>Discount Rate</td>-->
<td class="text-right"> <!--<td class="text-right">-->
<span t-field="o.discount_rate"/> <!--<span t-field="o.discount_rate"/>-->
</td> <!--</td>-->
</tr> <!--</tr>-->
<tr class="border-black"></tr> <!--<tr class="border-black"></tr>-->
</table> <!--</table>-->
</t> <!--</t>-->
</div> <!--</div>-->
</xpath> <!--</xpath>-->
</template> </template>
</data> </data>
</openerp> </openerp>

40
sale_discount_total/views/sale_order_report.xml~

@ -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…
Cancel
Save