invoice_report.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <template id="report_invoice_document" inherit_id="account.report_invoice_document">
  5. <xpath expr="//table" position="replace">
  6. <table class="table table-condensed">
  7. <thead>
  8. <tr>
  9. <th>Description</th>
  10. <th>Quantity</th>
  11. <th class="text-right">Unit Price</th>
  12. <!--<span t-if="o.amount_discount">-->
  13. <th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th>
  14. <!--</span>-->
  15. <th class="text-right">Taxes</th>
  16. <th class="text-right">Amount</th>
  17. </tr>
  18. </thead>
  19. <tbody class="invoice_tbody">
  20. <tr t-foreach="o.invoice_line" t-as="l">
  21. <td><span t-field="l.name"/></td>
  22. <td>
  23. <span t-field="l.quantity"/>
  24. <span t-field="l.uos_id" groups="product.group_uom"/>
  25. </td>
  26. <td class="text-right">
  27. <span t-field="l.price_unit"/>
  28. </td>
  29. <!--<span t-if="o.amount_discount">-->
  30. <td class="text-right" groups="sale.group_discount_per_so_line">
  31. <!--<span t-field="l.discount"/>-->
  32. <span t-esc="'%.2f'%(l.discount)"/>
  33. </td>
  34. <!--</span>-->
  35. <td class="text-right">
  36. <span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/>
  37. </td>
  38. <td class="text-right">
  39. <span t-field="l.price_subtotal"
  40. t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  41. </td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </xpath>
  46. <xpath expr="//div[@class='col-xs-4 pull-right']/table/tr[2]" position="after">
  47. <t t-if="o.type=='out_invoice' or o.type=='out_refund'">
  48. <!--<t t-if="o.discount_rate">-->
  49. <tr>
  50. <td>Discount</td>
  51. <td class="text-right">
  52. <span t-field="o.amount_discount" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
  53. </td>
  54. </tr>
  55. <!--</t>-->
  56. </t>
  57. </xpath>
  58. <!--<xpath expr="//div[@class='col-xs-4 pull-right']" position="before">-->
  59. <!--<t t-if="o.type=='out_invoice' or o.type=='out_refund'">-->
  60. <!--<div class="col-xs-4">-->
  61. <!--<t t-if="o.discount_rate">-->
  62. <!--<table class="table table-condensed">-->
  63. <!--<tr class="border-black">-->
  64. <!--<td>Discount Type</td>-->
  65. <!--<td class="text-right">-->
  66. <!--<span t-field="o.discount_type"/>-->
  67. <!--</td>-->
  68. <!--</tr>-->
  69. <!--<tr>-->
  70. <!--<td>Discount rate</td>-->
  71. <!--<td class="text-right">-->
  72. <!--<span t-field="o.discount_rate"/>-->
  73. <!--</td>-->
  74. <!--</tr>-->
  75. <!--<tr class="border-black"></tr>-->
  76. <!--</table>-->
  77. <!--</t>-->
  78. <!--</div>-->
  79. <!--</t>-->
  80. <!--</xpath>-->
  81. </template>
  82. </data>
  83. </openerp>