report_product_labels.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <report
  5. id="product.report_product_label_tython"
  6. string="Product Label Tython"
  7. model="product.product"
  8. report_type="qweb-pdf"
  9. file="product_label_tyhon"
  10. name="product_labels_tython.product_label_tython"
  11. />
  12. <record id="product.report_product_label_tython" model="ir.actions.report.xml">
  13. <field name="paperformat_id" ref="product_labels_tython.paperformat_product_label_tython"/>
  14. </record>
  15. <template id="product_label_tython">
  16. <!-- Multicompany -->
  17. <t t-if="o and 'company_id' in o">
  18. - <t t-set="company" t-value="o.company_id"/>
  19. - </t>
  20. - <t t-if="not o or not 'company_id' in o">
  21. - <t t-set="company" t-value="res_company"/>
  22. - </t>
  23. <t t-call="report.html_container">
  24. <t t-foreach="docs" t-as="product">
  25. <div class="page">
  26. <div class="oe_structure"/>
  27. <div class="row">
  28. <table style="width: 100%; border: 1px solid black; text-align: center;">
  29. <tr style="border: 1px solid black;">
  30. <td colspan="2">
  31. <h5><span t-field="product.name_template"/></h5>
  32. </td>
  33. </tr>
  34. <tr style="border: 1px solid black;">
  35. <td colspan="2">
  36. <h4><span>Ref.: </span><span t-field="product.default_code" /></h4>
  37. </td>
  38. </tr>
  39. <tr style="border: 1px solid black;">
  40. <td colspan="2">
  41. <span t-if="product.ean13">
  42. <img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', product.ean13, 600, 100)" style="margin-top: 5px; width:270px; height:50px"/>
  43. <h5><span t-esc="product.ean13" /></h5>
  44. </span>
  45. </td>
  46. </tr>
  47. </table>
  48. </div>
  49. </div>
  50. </t>
  51. </t>
  52. </template>
  53. </data>
  54. </openerp>