report_saledetails.xml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <template id="report_saledetails">
  5. <t t-set="company" t-value="env.company"/>
  6. <t t-call="web.html_container">
  7. <t t-call="web.internal_layout">
  8. <div class="page">
  9. <div class="text-center">
  10. <h2>Sales Details</h2>
  11. <t t-if="date_start and date_stop">
  12. <strong><t t-esc="date_start" t-options="{'widget': 'datetime'}"/> - <t t-esc="date_stop" t-options="{'widget': 'datetime'}"/></strong>
  13. </t>
  14. </div>
  15. <!-- Orderlines -->
  16. <h3>Products</h3>
  17. <table class="table table-sm">
  18. <thead><tr>
  19. <th>Product</th>
  20. <th>Quantity</th>
  21. <th>Price Unit</th>
  22. </tr></thead>
  23. <tbody>
  24. <tr t-foreach='products' t-as='line'>
  25. <t t-set="internal_reference" t-value="line['code'] and '[%s] ' % line['code'] or ''" />
  26. <td><t t-esc="internal_reference" /><t t-esc="line['product_name']" /></td>
  27. <td>
  28. <t t-esc="line['quantity']" />
  29. <t t-if='line["uom"] != "Units"'>
  30. <t t-esc='line["uom"]' />
  31. </t>
  32. </td>
  33. <td>
  34. <t t-esc='line["price_unit"]' />
  35. <t t-if='line["discount"] != 0'>
  36. Disc: <t t-esc='line["discount"]' />%
  37. </t>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. <br/>
  43. <h3>Payments</h3>
  44. <table class="table table-sm">
  45. <thead><tr>
  46. <th>Name</th>
  47. <th>Total</th>
  48. </tr></thead>
  49. <tbody>
  50. <tr t-foreach='payments' t-as='payment'>
  51. <td><t t-esc="payment['name']" /></td>
  52. <td><t t-esc="payment['total']" t-options="{'widget': 'float', 'precision': currency_precision}"/></td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. <br/>
  57. <h3>Taxes</h3>
  58. <table class="table table-sm">
  59. <thead><tr>
  60. <th>Name</th>
  61. <th>Tax Amount</th>
  62. <th>Base Amount</th>
  63. </tr></thead>
  64. <tbody>
  65. <tr t-foreach='taxes' t-as='tax'>
  66. <td><t t-esc="tax['name']" /></td>
  67. <td><t t-esc="tax['tax_amount']" t-options="{'widget': 'float', 'precision': currency_precision}"/></td>
  68. <td><t t-esc="tax['base_amount']" t-options="{'widget': 'float', 'precision': currency_precision}"/></td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. <br/>
  73. <br/>
  74. <strong>Total: <t t-esc='total_paid' t-options="{'widget': 'float', 'precision': currency_precision}"/></strong>
  75. </div>
  76. </t>
  77. </t>
  78. </template>
  79. </data>
  80. </openerp>