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.

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