report_saleorder.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <template id="report_saleorder_document">
  5. <t t-call="new_pdf_formats.new_external_layout">
  6. <div class="page">
  7. <div class="oe_structure"/>
  8. <h2>
  9. <span t-if="o.state not in ['draft','sent']">Order N° </span>
  10. <span t-if="o.state in ['draft','sent']">Presupuesto N° </span>
  11. <span t-field="o.name"/>
  12. </h2>
  13. <div class="row">
  14. <div class="col-xs-6">
  15. <div t-if="o.partner_id">
  16. <strong>Cliente:</strong>
  17. <span t-field="o.partner_id"/>
  18. </div>
  19. <div t-if="o.ruc">
  20. <strong>Cédula / R.U.C:</strong>
  21. <span t-field="o.ruc"/>
  22. </div>
  23. <div t-if="o.street">
  24. <strong>Dirección:</strong>
  25. <span t-field="o.street"/>
  26. </div>
  27. <div t-if="o.state_id">
  28. <strong>Departamento:</strong>
  29. <span t-field="o.state_id"/>
  30. </div>
  31. <div t-if="o.country_id">
  32. <strong>Pais:</strong>
  33. <span t-field="o.country_id"/>
  34. </div>
  35. <div t-if="o.phone">
  36. <strong>Teléfono:</strong>
  37. <span t-field="o.phone"/>
  38. </div>
  39. </div>
  40. <div class="col-xs-6">
  41. <div t-if="o.client_order_ref">
  42. <strong>Referencia:</strong>
  43. <span t-field="o.client_order_ref"/>
  44. </div>
  45. <div t-if="o.date_order">
  46. <strong t-if="o.state not in ['draft','sent']">Fecha del pedido:</strong>
  47. <strong t-if="o.state in ['draft','sent']">Fecha del presupuesto:</strong>
  48. <span t-field="o.date_order"/>
  49. </div>
  50. <div t-if="o.user_id.name">
  51. <strong>Vendedor:</strong>
  52. <span t-field="o.user_id.name"/>
  53. </div>
  54. <div t-if="o.payment_term">
  55. <strong>Condiciones de pago:</strong>
  56. <span t-field="o.payment_term"/>
  57. </div>
  58. </div>
  59. </div>
  60. <div style="width:20px; height:20px;"/>
  61. <table class="table table-condensed table-bordered">
  62. <thead>
  63. <tr>
  64. <th class="text-right">Cantidad</th>
  65. <th>Descripción</th>
  66. <th class="text-right">Precio unitario</th>
  67. <th class="text-right" groups="sale.group_discount_per_so_line">Desc.(%)</th>
  68. <th class="text-right">Impuestos</th>
  69. <th class="text-right">Precio</th>
  70. </tr>
  71. </thead>
  72. <tbody class="sale_tbody">
  73. <tr t-foreach="o.order_line" t-as="l">
  74. <td class="text-right">
  75. <span t-field="l.product_uom_qty"/>
  76. <span groups="product.group_uom" t-field="l.product_uom"/>
  77. </td>
  78. <td>
  79. <span t-field="l.name"/>
  80. </td>
  81. <td class="text-right">
  82. <span t-field="l.price_unit"/>
  83. </td>
  84. <td class="text-right" groups="sale.group_discount_per_so_line">
  85. <span t-field="l.discount"/>
  86. </td>
  87. <td>
  88. <span class="text-right" t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
  89. </td>
  90. <td class="text-right">
  91. <span t-field="l.price_subtotal" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
  92. </td>
  93. </tr>
  94. </tbody>
  95. </table>
  96. <div class="row">
  97. <div class="col-xs-4 pull-right">
  98. <table class="table table-condensed">
  99. <tr class="border-black">
  100. <td><strong>Total sin impuestos</strong></td>
  101. <td class="text-right">
  102. <span t-field="o.amount_untaxed" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td>Impuestos</td>
  107. <td class="text-right">
  108. <span t-field="o.amount_tax" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
  109. </td>
  110. </tr>
  111. <tr class="border-black">
  112. <td><strong>Total</strong></td>
  113. <td class="text-right">
  114. <span t-field="o.amount_total" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
  115. </td>
  116. </tr>
  117. </table>
  118. </div>
  119. </div>
  120. <div>
  121. <strong>Peso Total:</strong>
  122. <span t-field="o.total_weight"/> Kg
  123. </div>
  124. <p t-field="o.note" />
  125. <p t-if="o.payment_term.note">
  126. <strong>Condiciones de pago:</strong>
  127. <span t-field="o.payment_term.note"/>
  128. </p>
  129. <div class="oe_structure"/>
  130. </div>
  131. </t>
  132. </template>
  133. <template id="report_saleorder">
  134. <t t-call="report.html_container">
  135. <t t-foreach="doc_ids" t-as="doc_id">
  136. <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'new_pdf_formats.report_saleorder_document')"/>
  137. </t>
  138. </t>
  139. </template>
  140. </data>
  141. </openerp>