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.

199 lines
9.1 KiB

4 years ago
4 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
  4. Copyright 2018 Rémy Taymans <remy@cooptieasy.be>
  5. Copyright 2019 Houssine Bakkali <houssine@cooptieasy.be>
  6. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  7. -->
  8. <odoo>
  9. <template id="portal_my_details_emc" inherit_id="portal.portal_my_details" name="Portal user details">
  10. <input name="name" position="attributes">
  11. <attribute name="t-att-readonly">True</attribute>
  12. </input>
  13. <input name="email" position="attributes">
  14. <attribute name="t-att-readonly">True</attribute>
  15. </input>
  16. <xpath expr="//input[@name='phone']/.." position="after">
  17. <div t-attf-class="form-group #{error.get('gender') and 'o_has_error' or ''} col-xl-6">
  18. <label class="col-form-label" for="gender">Gender</label>
  19. <select name="gender" t-attf-class="form-control #{error.get('gender') or ''}">
  20. <option value=""></option>
  21. <t t-foreach="genders or []" t-as="item">
  22. <option t-att-value="item[0]" t-att-selected="item[0] == partner.gender">
  23. <t t-esc="item[1]" />
  24. </option>
  25. </t>
  26. </select>
  27. </div>
  28. <div t-attf-class="form-group #{error.get('birthdate_date') and 'o_has_error' or ''} col-xl-6">
  29. <label class="col-form-label" for="birthdate_date">Birthdate</label>
  30. <input type="date" name="birthdate_date" t-attf-class="form-control #{error.get('birthdate_date') or ''}" t-att-value="birthdate_date or partner.birthdate_date" />
  31. </div>
  32. <div t-attf-class="form-group #{error.get('iban') and 'o_has_error' or ''} col-xl-6">
  33. <label class="col-form-label" for="iban">Iban</label>
  34. <input type="input" name="iban" t-attf-class="form-control #{error.get('iban') or ''}" t-att-value="iban" />
  35. </div>
  36. </xpath>
  37. </template>
  38. <!-- Add cooperator information -->
  39. <template
  40. id="website_portal_details_form"
  41. name="Website Portal Details Form"
  42. inherit_id="portal.portal_layout">
  43. <xpath expr="//div[@class='o_portal_my_details']" position="after">
  44. <div class="o_my_details_coop" t-if="coop.member">
  45. <h3 class="page-header">Your Cooperator Details</h3>
  46. <p class="text-center">
  47. <span t-if="coop.member">
  48. You are an effective cooperator
  49. </span>
  50. <span t-if="not coop.member">
  51. You are not a cooperator
  52. </span>
  53. </p>
  54. <p t-if="coop.cooperator_register_number">
  55. <label>Cooperator Number: </label>
  56. <t t-esc="coop.cooperator_register_number"/>
  57. </p>
  58. <p t-if="coop.effective_date">
  59. <label>Cooperator Entrance Date: </label>
  60. <span t-field="coop.effective_date"/>
  61. </p>
  62. <p t-if="coop.number_of_share">
  63. <label>Number of Share: </label>
  64. <t t-esc="coop.number_of_share"/>
  65. </p>
  66. <p t-if="coop.share_ids">
  67. <div t-foreach="coop.share_ids" t-as="share">
  68. <span t-field="share.effective_date"/>:
  69. <t t-esc="share.share_number"/> x
  70. <t t-esc="share.share_short_name"/>
  71. (<span t-field="share.share_unit_price"
  72. t-field-options='{
  73. "widget": "monetary",
  74. "display_currency": "coop.company_id.currency_id"
  75. }'/>) -
  76. <span t-field="share.total_amount_line"
  77. t-field-options='{
  78. "widget": "monetary",
  79. "display_currency": "coop.company_id.currency_id"
  80. }'/>
  81. </div>
  82. </p>
  83. <p t-if="coop.total_value">
  84. <label>Total Value of Share: </label>
  85. <span t-field="coop.total_value"
  86. t-field-options='{
  87. "widget": "monetary",
  88. "display_currency": "coop.company_id.currency_id"
  89. }'/>
  90. </p>
  91. <p t-if="coop.gender">
  92. <label>Gender: </label>
  93. <t t-esc="coop.gender"/>
  94. </p>
  95. <p t-if="coop.birthdate_date">
  96. <label>Date of Birth: </label>
  97. <t t-esc="coop.birthdate_date"/>
  98. </p>
  99. <p t-if="coop_bank and coop_bank.acc_number">
  100. <label>Bank Account: </label>
  101. <t t-esc="coop_bank.acc_number"/>
  102. </p>
  103. <p t-if="coop.is_company and coop.company_register_number">
  104. <label>Company Register Number: </label>
  105. <t t-esc="coop.company_register_number"/>
  106. </p>
  107. <p t-if="coop.is_company and coop.representative">
  108. <label>Legal Representative: </label>
  109. <t t-esc="coop.representative"/>
  110. </p>
  111. <p class="text-center">
  112. <a href="/my/cooperator_certificate/pdf" class="btn btn-default">
  113. Cooperator Certificate
  114. </a>
  115. </p>
  116. </div>
  117. </xpath>
  118. </template>
  119. <template id="portal_my_home_menu_capital_request" name="Portal layout : capital request menu entries" inherit_id="portal.portal_breadcrumbs" priority="30">
  120. <xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
  121. <li t-if="page_name == 'capital request'" t-attf-class="breadcrumb-item #{'active ' if not capital_requests else ''}">
  122. <a t-if="capital_request" t-attf-href="/my/release_capital_request?{{ keep_query() }}">Capital Request</a>
  123. <t t-else="">Capital Request</t>
  124. </li>
  125. <li t-if="capital_request" class="breadcrumb-item active">
  126. <t t-esc="capital_request.number" t-if="capital_request.number"/>
  127. <t t-else=""><em>Draft Request</em></t>
  128. </li>
  129. </xpath>
  130. </template>
  131. <template id="portal_my_home_capital_release"
  132. name="Portal My Home : Easy My Coop Capital Release Requests"
  133. inherit_id="portal.portal_my_home" priority="30">
  134. <xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
  135. <t t-if="capital_request_count" t-call="portal.portal_docs_entry">
  136. <t t-set="title">Your Release Capital Requests</t>
  137. <t t-set="url" t-value="'/my/release_capital_request'"/>
  138. <t t-set="count" t-value="capital_request_count"/>
  139. </t>
  140. </xpath>
  141. </template>
  142. <template id="portal_my_capital_releases" name="My Capital Releases">
  143. <t t-call="portal.portal_layout">
  144. <t t-set="breadcrumbs_searchbar" t-value="True"/>
  145. <t t-call="portal.portal_searchbar">
  146. <t t-set="title">My Capital Releases</t>
  147. </t>
  148. <t t-if="not capital_requests">
  149. <p>There are currently no capital release request for your
  150. account.
  151. </p>
  152. </t>
  153. <t t-if="capital_requests" t-call="portal.portal_table">
  154. <thead>
  155. <tr class="active">
  156. <th>Request #</th>
  157. <th>Request Date</th>
  158. <th class='d-none d-md-table-cell'>Due Date</th>
  159. <th/>
  160. <th class="text-right">Amount Due</th>
  161. </tr>
  162. </thead>
  163. <tbody>
  164. <t t-foreach="capital_requests" t-as="capital_request">
  165. <tr>
  166. <td>
  167. <a t-att-href="capital_request.get_portal_url()" t-att-title="capital_request.number">
  168. <t t-esc="capital_request.number" t-if="capital_request.number"/>
  169. <em t-else="">Draft Request</em>
  170. </a>
  171. </td>
  172. <td><span t-field="capital_request.date_invoice"/></td>
  173. <td class='d-none d-md-table-cell'><span t-field="capital_request.date_due"/></td>
  174. <td class="tx_status">
  175. <t t-if="capital_request.state == 'open'">
  176. <span class="badge badge-pill badge-info"><i class="fa fa-fw fa-clock-o" aria-label="Opened" title="Opened" role="img"></i><span class="d-none d-md-inline"> Waiting for Payment</span></span>
  177. </t>
  178. <t t-if="capital_request.state == 'paid'">
  179. <span class="badge badge-pill badge-success"><i class="fa fa-fw fa-check" aria-label="Paid" title="Paid" role="img"></i><span class="d-none d-md-inline"> Paid</span></span>
  180. </t>
  181. <t t-if="capital_request.state == 'cancel'">
  182. <span class="badge badge-pill badge-warning"><i class="fa fa-fw fa-remove" aria-label="Cancelled" title="Cancelled" role="img"></i><span class="d-none d-md-inline"> Cancelled</span></span>
  183. </t>
  184. </td>
  185. <td class="text-right"><span t-esc="-capital_request.residual if capital_request.type == 'out_refund' else capital_request.residual" t-options='{"widget": "monetary", "display_currency": capital_request.currency_id}'/></td>
  186. </tr>
  187. </t>
  188. </tbody>
  189. </t>
  190. </t>
  191. </template>
  192. </odoo>