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.

141 lines
7.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Tax Shelter Certificate in the menu -->
  4. <template id="portal_my_home_menu_tax_shelter"
  5. name="Portal layout: Easy My Coop Tax Shelter Certificate Menu Entries"
  6. inherit_id="portal.portal_breadcrumbs"
  7. priority="25">
  8. <xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
  9. <li t-if="page_name == 'taxshelter' or taxshelter and taxshelter.state in ('validated', 'sent')"
  10. t-attf-class="breadcrumb-item #{'active ' if not taxshelter else ''}">
  11. <a t-if="taxshelter" t-attf-href="/my/tax_shelter_certificates?{{ keep_query() }}">Tax Shelter Certificates</a>
  12. <t t-else="">Tax Shelter Certificates</t>
  13. </li>
  14. <li t-if="taxshelter" class="breadcrumb-item active">
  15. <t t-esc="taxshelter.declaration_id.name" t-if="taxshelter.declaration_id.name"/>
  16. </li>
  17. </xpath>
  18. </template>
  19. <!-- Tax Shelter Certificate on the main page -->
  20. <template id="portal_my_home_tax_shelter"
  21. name="Portal My Home : Easy My Coop Tax Shelter Certificate Entries"
  22. inherit_id="portal.portal_my_home"
  23. priority="25">
  24. <xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
  25. <t t-if="tax_shelter_count" t-call="portal.portal_docs_entry">
  26. <t t-set="title">Tax Shelter Certificates</t>
  27. <t t-set="url" t-value="'/my/tax_shelter_certificates'"/>
  28. <t t-set="count" t-value="tax_shelter_count"/>
  29. </t>
  30. </xpath>
  31. </template>
  32. <!-- Tax Shelter Certificate page -->
  33. <template id="portal_my_tax_shelter" name="My Tax Shelter">
  34. <t t-call="portal.portal_layout">
  35. <t t-set="breadcrumbs_searchbar" t-value="True"/>
  36. <t t-call="portal.portal_searchbar">
  37. <t t-set="title">Tax Shelter Certificates</t>
  38. </t>
  39. <t t-if="not tax_shelters">
  40. <p>There are currently no tax shelter certificates for your account.</p>
  41. </t>
  42. <t t-if="tax_shelters" t-call="portal.portal_table">
  43. <thead>
  44. <tr class="active">
  45. <th>Declaration Year</th>
  46. <th class="text-right">Total Amount</th>
  47. </tr>
  48. </thead>
  49. <t t-foreach="tax_shelters" t-as="tax_shelter">
  50. <tr>
  51. <td>
  52. <a t-att-href="tax_shelter.get_portal_url()" t-att-title="tax_shelter.declaration_id.name">
  53. <t t-esc="tax_shelter.declaration_id.name" t-if="tax_shelter.declaration_id.name"/>
  54. <em t-else="">Draft Tax Shelter Certificate</em>
  55. </a>
  56. </td>
  57. <td class="text-right">
  58. <span t-field="tax_shelter.total_amount" t-options='{"widget": "monetary", "display_currency":tax_shelter.partner_id.company_id.currency_id}'/>
  59. </td>
  60. </tr>
  61. </t>
  62. </t>
  63. </t>
  64. </template>
  65. <!-- Tax Shelter Certificate Content -->
  66. <template id="portal_taxshelter_page" name="Tax Shelter Portal Template" inherit_id="portal.portal_sidebar" primary="True">
  67. <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
  68. <div class="row mt16">
  69. <!-- Sidebar -->
  70. <t t-call="portal.portal_record_sidebar">
  71. <t t-set="classes" t-value="'col-lg-auto d-print-none'"/>
  72. <t t-set="title">
  73. <h2 class="mb-0"><b t-field="taxshelter.total_amount" data-id="total_amount" t-options='{"widget": "monetary", "display_currency":taxshelter.partner_id.company_id.currency_id}'/> </h2>
  74. </t>
  75. <t t-set="entries">
  76. <ul class="list-group list-group-flush flex-wrap flex-row flex-lg-column">
  77. <li class="list-group-item flex-grow-1">
  78. <div class="o_download_pdf btn-toolbar flex-sm-nowrap">
  79. <div class="btn-group flex-grow-1 mb-1">
  80. <a id="print_taxshelter_subscription" class="btn btn-secondary btn-block o_print_btn" t-att-href="taxshelter.get_portal_url(report_type='pdf', query_string='&amp;query_string=subscription')" title="Print Subscription" target="_blank"><i class="fa fa-print"/> Subscription Certificate</a>
  81. </div>
  82. </div>
  83. <div class="o_download_pdf btn-toolbar flex-sm-nowrap">
  84. <div class="btn-group flex-grow-1 mb-1">
  85. <a id="print_taxshelter_shares" class="btn btn-secondary btn-block o_print_btn" t-att-href="taxshelter.get_portal_url(report_type='pdf', query_string='&amp;query_string=shares')" title="Print Shares" target="_blank"><i class="fa fa-print"/> Shares Certificate</a>
  86. </div>
  87. </div>
  88. </li>
  89. </ul>
  90. </t>
  91. </t>
  92. <!-- Page Content -->
  93. <!-- Room for improvement: html display
  94. <div id="taxshelter_certificate_content" class="o_portal_page_content col-12 col-lg d-flex flex-column align-items-end">
  95. <div class="o_portal_page_size">
  96. <t t-if="error or warning" t-call="easy_my_coop_website_taxshelter.portal_taxshelter_error"/>
  97. <t t-if="success and (not error and not warning)" t-call="account.portal_taxshelter_success"/>
  98. <div class="o_portal_html_view shadow">
  99. <div class="o_portal_html_loader text-center">
  100. <i class="fa fa-circle-o-notch fa-spin fa-2x fa-fw text-black-50"></i>
  101. </div>
  102. <iframe id="taxshelter_certificate_html" class="mt8 mb8" width="100%" height="100%" frameborder="0" scrolling="no" t-att-src="taxshelter.get_portal_url(report_type='html')"/>
  103. </div>
  104. </div>
  105. </div>
  106. -->
  107. </div>
  108. </xpath>
  109. </template>
  110. <!-- Room for improvement: those templates should be called if html display is implemented -->
  111. <!--
  112. <template id="portal_taxshelter_error" name="Taxshelter error/warning display">
  113. <div class="row mr16">
  114. <div t-attf-class="'col-lg-12 mr16 ml16 alert alert-dismissable' #{'alert-danger' if error else 'alert-warning'}" role="alert">
  115. <a href="#" class="close" data-dismiss="alert" aria-label="close" title="close">×</a>
  116. <t t-if="error == 'generic'" name="generic">
  117. There was an error processing this page.
  118. </t>
  119. </div>
  120. </div>
  121. </template>
  122. <template id="portal_taxshelter_success" name="Taxshelter success display">
  123. <div class="row mr16">
  124. <div class="col-lg-12 mr16 ml16 alert alert-dismissable alert-success" role="status">
  125. <a href="#" class="close" data-dismiss="alert" aria-label="close" title="close">×</a>
  126. </div>
  127. </div>
  128. </template>
  129. -->
  130. </odoo>