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.

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