You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
5.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="cooperator_certificat_G001_document">
  4. <t t-call="web.external_layout">
  5. <t t-set="address">
  6. <address t-field="o.commercial_partner_id"
  7. t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
  8. </t>
  9. <div class="page mt32">
  10. <h2>
  11. <span>Cooperator Certificate</span>
  12. </h2>
  13. <p name="certificate_generation_date" class="mt16">
  14. <span>Certificate generated on</span>
  15. <span t-esc="context_timestamp(datetime.datetime.now()).strftime('%d/%m/%Y')"/>
  16. </p>
  17. <p name="label_coop_number" class="mt16">
  18. <span t-field="o.name"/>
  19. is recorded in the register of cooperators under number
  20. <span t-field="o.cooperator_register_number"/>.
  21. </p>
  22. <table class="table table-sm o_main_table mt16"
  23. name="invoice_line_table">
  24. <thead>
  25. <tr>
  26. <t t-set="colspan" t-value="5"/>
  27. <th class="text-left">Effective date</th>
  28. <th class="text-right">Share type</th>
  29. <th class="text-right">Quantity</th>
  30. <th class="text-right">Unit Price</th>
  31. <th class="text-right">Total</th>
  32. </tr>
  33. </thead>
  34. <tbody class="invoice_tbody">
  35. <t t-set="nb_ligne" t-value="0"/>
  36. <t t-foreach="o.share_ids" t-as="line">
  37. <tr>
  38. <td class="text-left" name="effective_date">
  39. <span t-field="line.effective_date"/>
  40. </td>
  41. <td class="text-right" name="share_short_name">
  42. <span t-field="line.share_short_name"/>
  43. </td>
  44. <td class="text-right" name="share_number">
  45. <span t-field="line.share_number"/>
  46. </td>
  47. <td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
  48. name="share_unit_price">
  49. <span t-field="line.share_unit_price"
  50. t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  51. </td>
  52. <td class="text-right" name="total_amount_line">
  53. <span t-field="line.total_amount_line"
  54. t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  55. </td>
  56. </tr>
  57. </t>
  58. </tbody>
  59. </table>
  60. <div class="clearfix">
  61. <div name="total_table" id="total" class="row">
  62. <div t-attf-class="#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto">
  63. <table class="table table-sm">
  64. <tr class="border-black o_total">
  65. <td>
  66. <strong>Total</strong>
  67. </td>
  68. <td class="text-right">
  69. <span t-field="o.number_of_share"/>
  70. <span>share(s)</span>
  71. </td>
  72. <td class="text-right">
  73. <span t-field="o.total_value"
  74. t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
  75. </td>
  76. </tr>
  77. </table>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="row mt32">
  82. <div name="board_commitee" class="col-sm-6">
  83. <p>
  84. For the board of<span t-field="o.company_id.name"/>.
  85. </p>
  86. <p>
  87. <strong>
  88. <span t-field="o.company_id.board_representative"/>
  89. </strong>
  90. </p>
  91. <img t-if="o.company_id.signature_scan"
  92. t-attf-class="mt16 w-50"
  93. t-attf-style="{{ 'min-width: 100px; max-width: 250px' if report_type == 'pdf' else '' }}"
  94. t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"/>
  95. </div>
  96. </div>
  97. </div>
  98. </t>
  99. </template>
  100. <template id="cooperator_certificat_G001">
  101. <t t-call="web.html_container">
  102. <t t-foreach="docs" t-as="o">
  103. <t t-call="easy_my_coop.cooperator_certificat_G001_document"
  104. t-lang="o.lang"/>
  105. </t>
  106. </t>
  107. </template>
  108. </odoo>