report_product_labels_wizard.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report
  5. id="report_product_product_label"
  6. string="Product Label"
  7. model="product.product.label"
  8. report_type="qweb-pdf"
  9. file="product_label"
  10. name="product_labels.product_product_label"
  11. />
  12. <record id="report_product_product_label" model="ir.actions.report.xml">
  13. <field name="paperformat_id" ref="product_labels.paperformat_product_label"/>
  14. </record>
  15. <template id="product_product_label">
  16. <t t-call="report.html_container">
  17. <t t-foreach="docs" t-as="label">
  18. <t t-foreach="label.label_lines" t-as="line">
  19. <t t-foreach="range(int(line.quantity))" t-as="range_line">
  20. <div class="page">
  21. <div class="oe_structure"/>
  22. <div class="row">
  23. <table style="width: 100%; border: 1px solid black; text-align: center;">
  24. <tr style="border: 1px solid black;">
  25. <td colspan="2">
  26. <h5><span t-field="line.product_id.name"/></h5>
  27. </td>
  28. </tr>
  29. <tr style="border: 1px solid black;">
  30. <td colspan="2">
  31. <h4><span>Precio: </span><span t-field="line.product_id.list_price" /></h4>
  32. </td>
  33. </tr>
  34. <tr style="border: 1px solid black;">
  35. <td colspan="2">
  36. <span t-if="line.product_id.ean13">
  37. <img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', line.product_id.ean13, 400, 100)" style="margin-top: 3px; width:70mm; height:25mm"/>
  38. <h5><span t-esc="line.product_id.ean13" /></h5>
  39. </span>
  40. </td>
  41. </tr>
  42. </table>
  43. </div>
  44. </div>
  45. </t>
  46. </t>
  47. </t>
  48. </t>
  49. </template>
  50. </data>
  51. </openerp>