factura_comun_apis.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report id="factura_comun_apis"
  5. model="account.invoice"
  6. string="Factura Comun"
  7. report_type="qweb-html"
  8. name="factura_comun_apis.report_factura_apis"
  9. file="factura_comun_apis.report_factura_apis"
  10. />
  11. <record id="paperformat_lowmargin" model="report.paperformat">
  12. <field name="name">Hoja Apis</field>
  13. <field name="default" eval="True" />
  14. <field name="format">custom</field>
  15. <field name="page_height">210</field>
  16. <field name="page_width">297</field>
  17. <field name="orientation">Portrait</field>
  18. <field name="margin_top">11</field>
  19. <field name="margin_bottom">3</field>
  20. <field name="margin_left">6</field>
  21. <field name="margin_right">1</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="factura_comun_apis.factura_comun_apis" model="ir.actions.report.xml">
  27. <field name="paperformat_id" ref="factura_comun_apis.paperformat_lowmargin" />
  28. </record>
  29. <template id="report_factura_apis">
  30. <t t-call="report.html_container">
  31. <!-- <t t-foreach="[1,2]" t-as="i"> -->
  32. <div class="page">
  33. <style type="text/css">
  34. body{
  35. font-size: 3.6mm;
  36. font-family: Arial;
  37. }
  38. div{
  39. padding: 0px;
  40. }
  41. .pagina{
  42. width:19.3cm;
  43. padding-left: 2cm;
  44. padding-right: 1cm;
  45. height: 15cm;
  46. }
  47. .cabecera{
  48. width:6cm;
  49. width: 100%;
  50. }
  51. .descripcion{
  52. width: 11.2cm;
  53. font-size: 13px;
  54. padding-top: 0.2cm;
  55. float: left;
  56. min-height: 0.3cm;
  57. }
  58. .descripcion1{
  59. width: 11.2cm;
  60. font-size: 13px;
  61. padding-top: 0.2cm;
  62. float: left;
  63. min-height: 0cm;
  64. }
  65. .descripcion2{
  66. width: 13cm;
  67. font-size: 11px;
  68. float: left;
  69. min-height: 0cm;
  70. }
  71. .descripcion3{
  72. width: 15cm;
  73. font-size: 11px;
  74. float: left;
  75. min-height: 0cm;
  76. }
  77. .descripcion4{
  78. width: 15cm;
  79. font-size: 11px;
  80. float: left;
  81. min-height: 0cm;
  82. }
  83. .email{
  84. width: 13cm;
  85. font-size: 11px;
  86. float: left;
  87. min-height: 0cm;
  88. }
  89. .ciudad{
  90. width: 13cm;
  91. float: left;
  92. font-size: 11px;
  93. min-height: 0cm;
  94. }
  95. .tel{
  96. width: 13cm;
  97. float: left;
  98. font-size: 11px;
  99. min-height: 0cm;
  100. }
  101. .rucdata1{
  102. width: 13cm;
  103. float: left;
  104. font-size: 11px;
  105. min-height: 0cm;
  106. }
  107. .table-condensed>tbody>tr>td {
  108. padding: 1px !important;
  109. }
  110. .divisoria{
  111. height: 0.5cm;
  112. clear: both;
  113. }
  114. .fecha_emision_data{
  115. width: 11.5cm;
  116. float: left;
  117. min-height: 0.5cm;
  118. }
  119. .contado_x{
  120. width: 1.8cm;
  121. float: left;
  122. padding-left: 9cm;
  123. min-height: 0.5cm;
  124. }
  125. .credito_x{
  126. width: 1.8cm;
  127. float: left;
  128. padding-left: 1.6cm;
  129. min-height: 0.5cm;
  130. }
  131. .linea2{
  132. position: relative;
  133. top: -0.12cm;
  134. min-height: 0.5cm;
  135. }
  136. .razon_data{
  137. width: 12cm;
  138. float: left;
  139. min-height: 0.4cm;
  140. }
  141. .ruc_data{
  142. width: 5cm;
  143. float: left;
  144. min-height: 0.5cm;
  145. }
  146. .linea3{
  147. position: relative;
  148. top: -0.12cm;
  149. min-height: 0.3cm;
  150. }
  151. .direccion_data{
  152. width: 14cm;
  153. float: left;
  154. min-height: 0.4cm;
  155. }
  156. .linea4{
  157. position: relative;
  158. top: -0.12cm;
  159. min-height: 0.3cm;
  160. }
  161. .telefono_data{
  162. width: 10cm;
  163. float: left;
  164. min-height: 0.4cm;
  165. }
  166. .nota_remision_data{
  167. width: 4cm;
  168. float: left;
  169. min-height: 0.4cm;
  170. }
  171. .cab-articulos{
  172. height: 0.4cm;
  173. clear: both;
  174. }
  175. .articulos{
  176. height: 4.5cm;
  177. width: 14cm;
  178. }
  179. .art-col1{
  180. width:0.4cm;
  181. text-align: center;
  182. }
  183. .art-col2{
  184. padding-left: 0.8cm;
  185. width:1cm;
  186. text-align: center;
  187. }
  188. .art-col3{
  189. padding-left: 0.3cm;
  190. width:9cm;
  191. }
  192. .art-col4{
  193. width:2.8cm;
  194. text-align: right;
  195. }
  196. .art-col5{
  197. width:2.7cm;
  198. text-align: right;
  199. }
  200. .logo1{
  201. height: 1.5cm;
  202. width: 100%;
  203. top: 0px;
  204. }
  205. </style>
  206. <t t-foreach="docs" t-as="o">
  207. <div class="pagina">
  208. <div class="cabecera"> </div>
  209. <div class="divisoria"> </div>
  210. <div class="row">
  211. <div class="col-xs-4">
  212. <center>
  213. <img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="max-height: 250px;max-width: 80px;"/>
  214. </center>
  215. </div>
  216. <div class="col-xs-6">
  217. <tr>
  218. <div class="descripcion">
  219. </div>
  220. </tr>
  221. <tr>
  222. <div class="descripcion1"><b><i>APIS</i></b></div>
  223. </tr>
  224. <tr>
  225. <div class="descripcion2"><b></b></div>
  226. </tr>
  227. <tr>
  228. <div class="descripcion3"><b></b></div>
  229. </tr>
  230. <tr>
  231. <div class="descripcion4"><b>Calle Arcadio Garay Vera, a una cuadra de Av San José</b></div>
  232. </tr>
  233. <tr>
  234. <div class="email"><b>Barrio San Isidro - Ciudad del Este</b></div>
  235. </tr>
  236. <tr>
  237. <div class="ciudad"><b>apis.com.py</b></div>
  238. </tr>
  239. <tr>
  240. <div class="tel"><b>(0973) 766738</b></div>
  241. </tr>
  242. </div>
  243. </div>
  244. <div class="divisoria"> </div>
  245. <!-- <div style="border:0.3px solid #000;"></div> -->
  246. <div class="divisoria"> </div>
  247. <div class="linea3">
  248. <div class="fecha_emision_data"><b>Fecha de Factura: </b><span t-field="o.date_invoice" t-field-options='{"format": "dd MMMM yyyy"}'/></div>
  249. </div>
  250. <div class="linea2">
  251. <div class="razon_data"><b>Cliente: </b><span t-field="o.partner_id.name"/></div>
  252. <div class="ruc_data"><b>R.U.C N°: </b><span t-field="o.partner_id.ruc"/></div>
  253. </div>
  254. <div class="linea3">
  255. <div class="direccion_data">
  256. <t t-f="o.partner_id.street"><b>Direccion: </b><span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/></t>
  257. <t t-f="not o.partner_id.street"> </t>
  258. </div>
  259. </div>
  260. <div class="linea4">
  261. <div class="telefono_data"><b>Telefono: </b><span t-field="o.partner_id.phone"/></div>
  262. </div>
  263. <div class="logo1"> </div>
  264. <table class="table table-condensed table-bordered">
  265. <thead>
  266. <tr>
  267. <th class="art-col1">Código</th>
  268. <th class="art-col2">Cantidad</th>
  269. <th class="art-col3">Descripción</th>
  270. <th class="art-col4">Prec. Unitario</th>
  271. <th class="art-col5">Sub Total</th>
  272. </tr>
  273. </thead>
  274. <tbody class="sale_tbody">
  275. <tr t-foreach="o.invoice_line" t-as="l">
  276. <td class="art-col1">
  277. <!-- <span t-field="l.product_id.default_code"/> -->
  278. </td>
  279. <td class="art-col2">
  280. <span t-esc="'%.0f'%l.quantity"/>
  281. </td>
  282. <td class="art-col3">
  283. <span t-field="l.product_id.name"/>
  284. </td>
  285. <td class="art-col4">
  286. <t t-if="o.currency_id.id == 166">
  287. <span t-esc="'{0:,.0f}'.format(l.price_unit)"/>
  288. </t>
  289. <t t-if="o.currency_id.id != 166">
  290. <span t-esc="'{0:,.2f}'.format(l.price_unit)"/>
  291. </t>
  292. </td>
  293. <td class="art-col5">
  294. <t t-if="o.currency_id.id == 166">
  295. <span t-esc="'{0:,.0f}'.format(l.price_unit*l.quantity)"/>
  296. </t>
  297. <t t-if="o.currency_id.id != 166">
  298. <span t-esc="'{0:,.2f}'.format(l.price_unit*l.quantity)"/>
  299. </t>
  300. </td>
  301. </tr>
  302. </tbody>
  303. </table>
  304. <div class="logo1"> </div>
  305. <div class="row">
  306. <div class="col-xs-4 pull-right">
  307. <table class="table table-condensed">
  308. <tr class="border-black">
  309. <td><strong>Total s/ IVA</strong></td>
  310. <td class="text-right">
  311. <t t-if="o.currency_id.id == 166">
  312. <span t-esc="'{0:,.0f}'.format(o.amount_untaxed)"/>
  313. </t>
  314. <t t-if="o.currency_id.id != 166">
  315. <span t-esc="'{0:,.2f}'.format(o.amount_untaxed)"/>
  316. </t>
  317. </td>
  318. </tr>
  319. <tr>
  320. <td>IVA</td>
  321. <td class="text-right">
  322. <t t-if="o.currency_id.id == 166">
  323. <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
  324. </t>
  325. <t t-if="o.currency_id.id != 166">
  326. <span t-esc="'{0:,.2f}'.format(o.amount_tax)"/>
  327. </t>
  328. </td>
  329. </tr>
  330. <tr class="border-black">
  331. <td><strong>Total</strong></td>
  332. <td class="text-right">
  333. <t t-if="o.currency_id.id == 166">
  334. <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
  335. </t>
  336. <t t-if="o.currency_id.id != 166">
  337. <span t-esc="'{0:,.2f}'.format(o.amount_total)"/>
  338. </t>
  339. </td>
  340. </tr>
  341. </table>
  342. </div>
  343. </div>
  344. </div>
  345. <!-- <div class="logo1"> </div> -->
  346. </t>
  347. </div>
  348. <!-- </t> -->
  349. </t>
  350. </template>
  351. </data>
  352. </openerp>