ticket_venta_gracia.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report id="ticket_venta_gracia"
  5. model="sale.order"
  6. string="Ticket"
  7. report_type="qweb-html"
  8. name="ticket_venta_gracia.report_ticket_gracia"
  9. file="ticket_venta_gracia.report_ticket_gracia"
  10. />
  11. <record id="paperformat_lowmargin" model="report.paperformat">
  12. <field name="name">Ticket Gracia</field>
  13. <field name="default" eval="True" />
  14. <field name="format">custom</field>
  15. <field name="page_height">150</field>
  16. <field name="page_width">60</field>
  17. <field name="orientation">Portrait</field>
  18. <field name="margin_top">3</field>
  19. <field name="margin_bottom">3</field>
  20. <field name="margin_left">3</field>
  21. <field name="margin_right">3</field>
  22. <field name="header_line" eval="False" />
  23. <field name="header_spacing">3</field>
  24. <field name="dpi">90</field>
  25. </record>
  26. <record id="ticket_venta_gracia.ticket_venta_gracia" model="ir.actions.report.xml">
  27. <field name="paperformat_id" ref="ticket_venta_gracia.paperformat_lowmargin" />
  28. </record>
  29. <template id="report_ticket_gracia">
  30. <t t-call="report.html_container">
  31. <!-- <t t-foreach="[1,2,3]" t-as="i"> -->
  32. <div class="page">
  33. <style>
  34. .logo{
  35. height: 1.71cm;
  36. width: 100%;
  37. top: 0px;
  38. }
  39. .table-condensed>tbody>tr>td {
  40. padding: 1px !important;
  41. }
  42. .borderless td, .borderless th {
  43. border: none !important;
  44. }
  45. .logo1{
  46. height: 2.61cm;
  47. width: 100%;
  48. top: 0px;
  49. }
  50. .logo2{
  51. height: 3.30cm;
  52. width: 100%;
  53. top: 0px;
  54. }
  55. </style>
  56. <t t-foreach="docs" t-as="o">
  57. <div class="pagina">
  58. <div class="row">
  59. <div class="col-xs-4">
  60. <!--
  61. ======================================================================
  62. CABECERA
  63. ======================================================================
  64. -->
  65. <div style="height:1.5cm;">
  66. <div style="padding-top:0.4cm;font-size:9.5px;font-family: Arial;">
  67. <div style="text-align: center;">
  68. <span t-field="o.create_date" t-options='{"format": "dd/mm/aaaa hh.mm.ss"}'/>
  69. </div>
  70. <!-- <div>
  71. <span t-esc="time.strftime('%m/%d/%Y',time.strptime(object.datetimefield,'%Y-%m-%d %H:%M:%S'))"/>
  72. </div> -->
  73. <div style="text-align: center;">
  74. <span t-field="o.name"/>-<span t-field="o.user_id"/>
  75. </div>
  76. </div>
  77. </div>
  78. <div style="height:1.5cm;">
  79. <div style="font-size:11px;font-family: Arial;">
  80. <div style="text-align: center;">
  81. <b><center><span t-field="o.company_id.name"/></center></b>
  82. </div>
  83. </div>
  84. <div style="font-size:8px;font-family: Arial;">
  85. <div style="text-align: center;">
  86. <b><center><span t-field="o.company_id.street"/></center></b>
  87. </div>
  88. </div>
  89. <div style="font-size:8px;font-family: Arial;">
  90. <div style="text-align: center;">
  91. <b><center><span t-field="o.company_id.phone"/></center></b>
  92. </div>
  93. </div>
  94. </div>
  95. <div style="height:1.5cm;">
  96. <div style="width:12cm;padding-right:5.0cm;font-size:9.5px;font-family: Arial;">
  97. <div>
  98. <b>Cliente: </b><span t-field="o.partner_id.name"/>
  99. &amp;nbsp;&amp;nbsp;
  100. <span t-field="o.partner_id.ruc"/>
  101. </div>
  102. <div>
  103. <b>Teléfono: </b><span t-field="o.partner_id.mobile"/>
  104. </div>
  105. <div>
  106. <b>N° de Legajo: </b><span t-field="o.partner_id.fax"/>
  107. </div>
  108. </div>
  109. </div>
  110. <!--
  111. ======================================================================
  112. TABLA
  113. ======================================================================
  114. -->
  115. <div style="height:3.1cm;">
  116. <div style="font-family: Arial;">
  117. <table class="table table-condensed table-bordered">
  118. <thead>
  119. <tr>
  120. <th style="font-size:10px;font-family: Arial;width:1.3cm;overflow: auto; text-align: center;"><b>Cant.</b></th>
  121. <th style="font-size:10px;font-family: Arial;width:9.5cm;overflow: auto; text-align: left;"><b>Producto</b></th>
  122. <th style="font-size:10px;font-family: Arial;width:1.9cm;overflow: auto; text-align: center;"><b>Precio</b></th>
  123. </tr>
  124. </thead>
  125. <tbody>
  126. <tr t-foreach="o.order_line" t-as="l">
  127. <!-- CANTIDAD -->
  128. <td style="font-size:10px;font-family: Arial;width:1.3cm;overflow: auto; text-align: center;">
  129. <span t-esc="'%.0f'%l.product_uom_qty"/>
  130. </td>
  131. <!-- NOMBRE DEL PRODUCTO -->
  132. <td style="font-size:10px;font-family: Arial;width:9.5cm;overflow: auto;">
  133. <span t-field="l.name"/>
  134. </td>
  135. <!-- PRECIO UNITARIO -->
  136. <td style="font-size:10px;font-family: Arial;width:1.7cm;overflow: auto; text-align: right;">
  137. <t t-if="o.currency_id.id == 166">
  138. <span t-esc="'{0:,.0f}'.format(l.product_uom_qty * l.price_unit)"/>
  139. </t>
  140. <t t-if="o.currency_id.id != 166">
  141. <span t-esc="'{0:,.2f}'.format(l.product_uom_qty * l.price_unit)"/>
  142. </t>
  143. </td>
  144. </tr>
  145. </tbody>
  146. </table>
  147. </div>
  148. </div>
  149. <table class="table table-condensed">
  150. <tbody>
  151. <tr>
  152. <td style="font-size:10px;font-family: Arial;width:1.3cm;overflow: auto; text-align: left;">
  153. <b>Sub Total: </b>
  154. </td>
  155. <!-- NOMBRE DEL PRODUCTO -->
  156. <td style="font-size:10px;font-family: Arial;width:9.5cm;overflow: auto;">
  157. </td>
  158. <!-- PRECIO UNITARIO -->
  159. <td style="font-size:10px;font-family: Arial;width:1.7cm;overflow: auto; text-align: right;">
  160. <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
  161. </td>
  162. </tr>
  163. <tr>
  164. <td style="font-size:10px;font-family: Arial;width:1.3cm;overflow: auto; text-align: left;">
  165. <b>Descuento: </b>
  166. </td>
  167. <!-- NOMBRE DEL PRODUCTO -->
  168. <td style="font-size:10px;font-family: Arial;width:9.5cm;overflow: auto;">
  169. </td>
  170. <!-- PRECIO UNITARIO -->
  171. <td style="font-size:10px;font-family: Arial;width:1.7cm;overflow: auto; text-align: right;">
  172. </td>
  173. </tr>
  174. <tr>
  175. <td style="font-size:10px;font-family: Arial;width:1.3cm;overflow: auto; text-align: left;">
  176. <b>Total: </b>
  177. </td>
  178. <!-- NOMBRE DEL PRODUCTO -->
  179. <td style="font-size:10px;font-family: Arial;width:9.5cm;overflow: auto;">
  180. </td>
  181. <!-- PRECIO UNITARIO -->
  182. <td style="font-size:10px;font-family: Arial;width:1.7cm;overflow: auto; text-align: right;">
  183. <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
  184. </td>
  185. </tr>
  186. </tbody>
  187. </table>
  188. <div style="width:12cm;font-size:9.5px;font-family: Arial;">
  189. <span t-field="o.payment_term"/> - <span t-field="o.currency_id.name"/>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </t>
  195. </div>
  196. <!-- </t> -->
  197. </t>
  198. </template>
  199. </data>
  200. </openerp>