Browse Source

[REF] pretty xml

pull/84/head
robin.keunen 4 years ago
parent
commit
f7f0756641
  1. 13
      easy_my_coop/data/easy_my_coop_data.xml
  2. 116
      easy_my_coop/data/mail_template_data.xml
  3. 4
      easy_my_coop/data/paperformat.xml
  4. 30
      easy_my_coop/demo/coop.xml
  5. 6
      easy_my_coop/demo/users.xml
  6. 35
      easy_my_coop/report/cooperator_certificat_G001.xml
  7. 136
      easy_my_coop/report/cooperator_invoice_G002.xml
  8. 236
      easy_my_coop/report/cooperator_register_G001.xml
  9. 206
      easy_my_coop/report/cooperator_subscription_G001.xml
  10. 68
      easy_my_coop/report/easy_my_coop_report.xml
  11. 65
      easy_my_coop/report/layout.xml
  12. 6
      easy_my_coop/security/res_groups.xml
  13. 148
      easy_my_coop/views/account_invoice_view.xml
  14. 24
      easy_my_coop/views/account_journal_view.xml
  15. 145
      easy_my_coop/views/cooperator_register_view.xml
  16. 20
      easy_my_coop/views/email_template_view.xml
  17. 62
      easy_my_coop/views/menus.xml
  18. 224
      easy_my_coop/views/operation_request_view.xml
  19. 285
      easy_my_coop/views/product_view.xml
  20. 63
      easy_my_coop/views/res_company_view.xml
  21. 396
      easy_my_coop/views/res_partner_view.xml
  22. 301
      easy_my_coop/views/subscription_request_view.xml
  23. 43
      easy_my_coop/wizard/cooperative_history_wizard.xml
  24. 41
      easy_my_coop/wizard/create_subscription_from_partner.xml
  25. 27
      easy_my_coop/wizard/update_partner_info.xml
  26. 18
      easy_my_coop/wizard/update_share_line.xml
  27. 17
      easy_my_coop/wizard/validate_subscription_request.xml
  28. 56
      easy_my_coop_ch/views/subscription_template.xml
  29. 179
      easy_my_coop_dividend/views/dividend_views.xml
  30. 8
      easy_my_coop_eater/view/product_view.xml
  31. 27
      easy_my_coop_export_xlsx/wizard/export_global_wizard.xml
  32. 154
      easy_my_coop_fr/views/certificate_template.xml
  33. 23
      easy_my_coop_fr/views/layout_template.xml
  34. 24
      easy_my_coop_fr/views/subscription_template.xml
  35. 33
      easy_my_coop_loan/data/mail_template_data.xml
  36. 6
      easy_my_coop_loan/demo/coop.xml
  37. 451
      easy_my_coop_loan/views/loan_view.xml
  38. 14
      easy_my_coop_loan/views/menus.xml
  39. 85
      easy_my_coop_loan/views/partner_view.xml
  40. 12
      easy_my_coop_loan_website/data/website_loan_data.xml
  41. 123
      easy_my_coop_loan_website/template/loan_issue_template.xml
  42. 11
      easy_my_coop_taxshelter_report/data/mail_template_data.xml
  43. 6
      easy_my_coop_taxshelter_report/data/scheduler_data.xml
  44. 19
      easy_my_coop_taxshelter_report/demo/tax_shelter_demo.xml
  45. 32
      easy_my_coop_taxshelter_report/reports/tax_shelter_report.xml
  46. 101
      easy_my_coop_taxshelter_report/reports/tax_shelter_resold_report.xml
  47. 186
      easy_my_coop_taxshelter_report/reports/tax_shelter_shares_report.xml
  48. 157
      easy_my_coop_taxshelter_report/reports/tax_shelter_subscription_report.xml
  49. 44
      easy_my_coop_taxshelter_report/views/tax_shelter_declaration_view.xml
  50. 1690
      easy_my_coop_website/views/subscription_template.xml
  51. 348
      easy_my_coop_website_portal/views/easy_my_coop_website_portal_templates.xml
  52. 179
      easy_my_coop_website_taxshelter/views/easy_my_coop_website_taxshelter_templates.xml
  53. 27
      partner_age/view/partner_view.xml
  54. 375
      theme_light/report/header_report_G002.xml
  55. 417
      theme_light/views/layout_template.xml
  56. 73
      website_recaptcha_reloaded/views/res_config.xml
  57. 11
      website_recaptcha_reloaded/views/website_view.xml

13
easy_my_coop/data/easy_my_coop_data.xml

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record model="ir.module.category" id="module_category_cooperator_management">
<data noupdate="1">
<record model="ir.module.category"
id="module_category_cooperator_management">
<field name="name">Cooperative Management</field>
<field name="description">Manage your cooperative.</field>
<field name="sequence">3</field>
</record>
<!-- Product -->
<record id="product_category_company_share" model="product.category">
<!-- Product -->
<record id="product_category_company_share" model="product.category">
<field name="name">Company Share</field>
</record>
@ -19,7 +20,7 @@
<field name="use_date_range">True</field>
</record>
<record id="subscription_journal" model="account.journal">
<record id="subscription_journal" model="account.journal">
<field name="name">Subscription Journal</field>
<field name="code">SUBJ</field>
<field name="type">sale</field>
@ -39,5 +40,5 @@
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
</record>
</data>
</data>
</openerp>

116
easy_my_coop/data/mail_template_data.xml

@ -5,15 +5,24 @@
<data noupdate="1">
<!--Request to release capital Email template -->
<record id="email_template_release_capital" model="mail.template">
<field name="name">Request to Release Capital - Send by Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="subject">${object.company_id.name} Request to Release Capital (Ref ${object.number or 'n/a'})</field>
<field name="name">Request to Release Capital - Send by Email
</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">${object.company_id.name} Request to Release
Capital (Ref ${object.number or 'n/a'})
</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="account.model_account_invoice"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="action_cooperator_invoices"/>
<field name="report_name">${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
<field name="report_name">
${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}
</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="easy_my_coop" eval="True"/>
<field name="body_html"><![CDATA[
@ -59,10 +68,14 @@
<record id="email_template_confirmation" model="mail.template">
<field name="name">Confirmation Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">Subscription request confirmation</field>
<field name="email_to">${object.email}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="model_subscription_request"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.lang}</field>
@ -112,10 +125,15 @@
<record id="email_template_waiting_list" model="mail.template">
<field name="name">Waiting List Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="subject">Subscription request added on waiting list. </field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">Subscription request added on waiting list.
</field>
<field name="email_to">${object.email}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="model_subscription_request"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.lang}</field>
@ -167,10 +185,15 @@
<record id="email_template_confirmation_company" model="mail.template">
<field name="name">Company Confirmation Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">Subscription request confirmation</field>
<field name="email_to">${object.email},${object.company_email}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="email_to">${object.email},${object.company_email}
</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="model_subscription_request"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.lang}</field>
@ -221,15 +244,23 @@
</record>
<record id="email_template_certificat" model="mail.template">
<field name="name">Payment Received Confirmation - Send By Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="name">Payment Received Confirmation - Send By Email
</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">Payment Received Confirmation</field>
<field name="partner_to">${object.id}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="action_cooperator_report_certificat"/>
<field name="report_name">Certificat ${(object.cooperator_register_number or '')}</field>
<field name="report_template"
ref="action_cooperator_report_certificat"/>
<field name="report_name">Certificat
${(object.cooperator_register_number or '')}
</field>
<field name="lang">${object.lang}</field>
<field name="easy_my_coop" eval="True"/>
<field name="body_html"><![CDATA[
@ -276,15 +307,24 @@
</record>
<record id="email_template_certificat_increase" model="mail.template">
<field name="name">Share Increase - Payment Received Confirmation - Send By Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="name">Share Increase - Payment Received Confirmation -
Send By Email
</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">Payment Received Confirmation</field>
<field name="partner_to">${object.id}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="action_cooperator_report_certificat"/>
<field name="report_name">Certificat ${(object.cooperator_register_number or '')}</field>
<field name="report_template"
ref="action_cooperator_report_certificat"/>
<field name="report_name">Certificat
${(object.cooperator_register_number or '')}
</field>
<field name="lang">${object.lang}</field>
<field name="easy_my_coop" eval="True"/>
<field name="body_html"><![CDATA[
@ -332,14 +372,21 @@
<record id="email_template_share_transfer" model="mail.template">
<field name="name">Share transfer - Send By Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">Share transfert</field>
<field name="partner_to">${object.id}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="action_cooperator_report_certificat"/>
<field name="report_name">Certificat ${(object.cooperator_register_number or '')}</field>
<field name="report_template"
ref="action_cooperator_report_certificat"/>
<field name="report_name">Certificat
${(object.cooperator_register_number or '')}
</field>
<field name="lang">${object.lang}</field>
<field name="easy_my_coop" eval="True"/>
<field name="body_html"><![CDATA[
@ -387,14 +434,21 @@
<record id="email_template_share_update" model="mail.template">
<field name="name">Share update - Send By Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">Share update</field>
<field name="partner_to">${object.id}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="model_res_partner"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="action_cooperator_report_certificat"/>
<field name="report_name">Certificat ${(object.cooperator_register_number or '')}</field>
<field name="report_template"
ref="action_cooperator_report_certificat"/>
<field name="report_name">Certificat
${(object.cooperator_register_number or '')}
</field>
<field name="lang">${object.lang}</field>
<field name="easy_my_coop" eval="True"/>
<field name="body_html"><![CDATA[

4
easy_my_coop/data/paperformat.xml

@ -3,7 +3,7 @@
<record id="paperformat_emc_larger_logo" model="report.paperformat">
<field name="name">A4 easy my coop larger logo</field>
<field name="default" eval="True" />
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
@ -12,7 +12,7 @@
<field name="margin_bottom">20</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_line" eval="False"/>
<field name="header_spacing">45</field>
<field name="dpi">90</field>
</record>

30
easy_my_coop/demo/coop.xml

@ -18,9 +18,9 @@
</record>
<record id="bank_account_virginie_demo" model="res.partner.bank">
<field name="acc_number">FR7611808009101234567890147</field>
<field name="bank_name">Bank</field>
<field name="partner_id" ref="res_partner_cooperator_1_demo"/>
<field name="acc_number">FR7611808009101234567890147</field>
<field name="bank_name">Bank</field>
<field name="partner_id" ref="res_partner_cooperator_1_demo"/>
</record>
<record id="res_partner_cooperator_2_demo" model="res.partner">
@ -53,9 +53,9 @@
</record>
<record id="bank_account_vincent_demo" model="res.partner.bank">
<field name="acc_number">BE71096123456769</field>
<field name="bank_name">Bank</field>
<field name="partner_id" ref="res_partner_cooperator_3_demo"/>
<field name="acc_number">BE71096123456769</field>
<field name="bank_name">Bank</field>
<field name="partner_id" ref="res_partner_cooperator_3_demo"/>
</record>
<record id="res_partner_cooperator_4_demo" model="res.partner">
@ -77,7 +77,8 @@
</record>
<record id="base.main_company" model="res.company">
<field name="property_cooperator_account" ref="easy_my_coop.account_cooperator_demo"/>
<field name="property_cooperator_account"
ref="easy_my_coop.account_cooperator_demo"/>
</record>
<record id="product_template_share_type_1_demo" model="product.template">
@ -116,24 +117,29 @@
<field name="date" eval="datetime.now() - timedelta(days=12)"/>
<field name="source">manual</field>
<field name="ordered_parts">3</field>
<field name="share_product_id" model="product.template" eval="obj(ref('product_template_share_type_2_demo')).product_variant_id.id"/>
<field name="share_product_id" model="product.template"
eval="obj(ref('product_template_share_type_2_demo')).product_variant_id.id"/>
<field name="lang">en_US</field>
<field name="skip_control_ng" eval="True"/>
</record>
<record id="share_line_1_demo" model="share.line">
<field name="share_product_id" model="product.template" eval="obj(ref('product_template_share_type_1_demo')).product_variant_id.id"/>
<field name="share_product_id" model="product.template"
eval="obj(ref('product_template_share_type_1_demo')).product_variant_id.id"/>
<field name="share_number">2</field>
<field name="share_unit_price">50</field>
<field name="partner_id" ref="res_partner_cooperator_1_demo"/>
<field name="effective_date" eval="datetime.now() - timedelta(days=120)"/>
<field name="effective_date"
eval="datetime.now() - timedelta(days=120)"/>
</record>
<record id="share_line_2_demo" model="share.line">
<field name="share_product_id" model="product.template" eval="obj(ref('product_template_share_type_1_demo')).product_variant_id.id"/>
<field name="share_product_id" model="product.template"
eval="obj(ref('product_template_share_type_1_demo')).product_variant_id.id"/>
<field name="share_number">4</field>
<field name="share_unit_price">50</field>
<field name="partner_id" ref="res_partner_cooperator_2_demo"/>
<field name="effective_date" eval="datetime.now() - timedelta(days=120)"/>
<field name="effective_date"
eval="datetime.now() - timedelta(days=120)"/>
</record>
</odoo>

6
easy_my_coop/demo/users.xml

@ -20,7 +20,8 @@
<field name="partner_id" ref="res_partner_user_emc_demo"/>
<field name="login">user-emc</field>
<field name="password">demo</field>
<field name="groups_id" eval="[(4, ref('easy_my_coop.group_easy_my_coop_user'))]"/>
<field name="groups_id"
eval="[(4, ref('easy_my_coop.group_easy_my_coop_user'))]"/>
</record>
<record id="res_partner_manager_emc_demo" model="res.partner">
@ -38,7 +39,8 @@
<field name="partner_id" ref="res_partner_manager_emc_demo"/>
<field name="login">manager-emc</field>
<field name="password">demo</field>
<field name="groups_id" eval="[(4, ref('easy_my_coop.group_easy_my_coop_manager'))]"/>
<field name="groups_id"
eval="[(4, ref('easy_my_coop.group_easy_my_coop_manager'))]"/>
</record>
</odoo>

35
easy_my_coop/report/cooperator_certificat_G001.xml

@ -5,7 +5,8 @@
<t t-call="web.external_layout">
<t t-set="address">
<address t-field="o.commercial_partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<address t-field="o.commercial_partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
</t>
<div class="page mt32">
<h2>
@ -13,9 +14,9 @@
</h2>
<p name="certificate_generation_date" class="mt16">
<span> Certificate generated on </span>
<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%d/%m/%Y')"/>
</p>
<span>Certificate generated on</span>
<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%d/%m/%Y')"/>
</p>
<p name="label_coop_number" class="mt16">
<span t-field="o.name"/>
@ -24,7 +25,8 @@
</p>
<table class="table table-sm o_main_table mt16" name="invoice_line_table">
<table class="table table-sm o_main_table mt16"
name="invoice_line_table">
<thead>
<tr>
<t t-set="colspan" t-value="5"/>
@ -51,11 +53,11 @@
<td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
name="share_unit_price">
<span t-field="line.share_unit_price"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<td class="text-right" name="total_amount_line">
<span t-field="line.total_amount_line"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</t>
@ -67,14 +69,16 @@
<div t-attf-class="#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto">
<table class="table table-sm">
<tr class="border-black o_total">
<td><strong>Total</strong></td>
<td>
<strong>Total</strong>
</td>
<td class="text-right">
<span t-field="o.number_of_share"/>
<span> share(s) </span>
<span>share(s)</span>
</td>
<td class="text-right">
<span t-field="o.total_value"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
@ -85,7 +89,7 @@
<div class="row mt32">
<div name="board_commitee" class="col-sm-6">
<p>
For the board of <span t-field="o.company_id.name"/>.
For the board of<span t-field="o.company_id.name"/>.
</p>
<p>
<strong>
@ -93,9 +97,9 @@
</strong>
</p>
<img t-if="o.company_id.signature_scan"
t-attf-class="mt16 w-50"
t-attf-style="{{ 'min-width: 100px; max-width: 250px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"/>
t-attf-class="mt16 w-50"
t-attf-style="{{ 'min-width: 100px; max-width: 250px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"/>
</div>
</div>
@ -107,7 +111,8 @@
<template id="cooperator_certificat_G001">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop.cooperator_certificat_G001_document" t-lang="o.lang"/>
<t t-call="easy_my_coop.cooperator_certificat_G001_document"
t-lang="o.lang"/>
</t>
</t>
</template>

136
easy_my_coop/report/cooperator_invoice_G002.xml

@ -5,39 +5,56 @@
<t t-call="web.external_layout">
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'Tax ID'"/>: <span t-field="o.partner_id.vat"/></div>
<address t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
<div t-if="o.partner_id.vat" class="mt16"><t
t-esc="o.company_id.country_id.vat_label or 'Tax ID'"/>:
<span t-field="o.partner_id.vat"/>
</div>
</t>
<div class="page mt32">
<h2>
<span t-if="o.release_capital_request">Request to Release Capital</span>
<span t-if="o.release_capital_request">Request to Release
Capital
</span>
<span t-else="">
<span t-if="o.type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')">Invoice</span>
<span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>
<span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice</span>
<span t-if="o.type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')">
Invoice
</span>
<span t-if="o.type == 'out_invoice' and o.state == 'draft'">
Draft Invoice
</span>
<span t-if="o.type == 'out_invoice' and o.state == 'cancel'">
Cancelled Invoice
</span>
<span t-if="o.type == 'out_refund'">Credit Note</span>
<span t-if="o.type == 'in_refund'">Vendor Credit Note</span>
<span t-if="o.type == 'in_refund'">Vendor Credit Note
</span>
<span t-if="o.type == 'in_invoice'">Vendor Bill</span>
</span>
<span t-field="o.number"/>
</h2>
<div id="informations" class="row mt32 mb32">
<div class="col-auto mw-100 mb-2" t-if="o.name" name="description">
<div class="col-auto mw-100 mb-2" t-if="o.name"
name="description">
<strong>Description:</strong>
<p class="m-0" t-field="o.name"/>
</div>
<div class="col-auto mw-100 mb-2" t-if="o.date_invoice" name="invoice_date">
<div class="col-auto mw-100 mb-2" t-if="o.date_invoice"
name="invoice_date">
<strong>Request Date:</strong>
<p class="m-0" t-field="o.date_invoice"/>
</div>
<div name="reference" class="col-auto mw-100 mb-2" t-if="o.reference">
<div name="reference" class="col-auto mw-100 mb-2"
t-if="o.reference">
<strong>Structured Communication:</strong>
<p class="m-0" t-field="o.reference"/>
</div>
<div name="account_number" class="col-auto mw-100 mb-2">
<strong>Account Number:</strong>
<t t-foreach="o.company_id.bank_journal_ids" t-as="journal">
<t t-foreach="o.company_id.bank_journal_ids"
t-as="journal">
<t t-set="b" t-value="journal.bank_account_id"/>
<t t-if="o.release_capital_request and journal.get_cooperator_payment">
<p class="m-0" t-field="b.acc_number"/>
@ -53,20 +70,36 @@
</div>
</div>
<t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
<t t-set="display_discount"
t-value="any([l.discount for l in o.invoice_line_ids])"/>
<table class="table table-sm o_main_table" name="invoice_line_table">
<table class="table table-sm o_main_table"
name="invoice_line_table">
<thead>
<tr>
<t t-set="colspan" t-value="5"/>
<th class="text-left"><span>Description</span></th>
<th class="d-none text-left"><span>Source Document</span></th>
<th class="text-right"><span>Part Type</span></th>
<th class="text-right"><span>Quantity</span></th>
<th t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Unit Price</span></th>
<th class="text-left">
<span>Description</span>
</th>
<th class="d-none text-left">
<span>Source Document</span>
</th>
<th class="text-right">
<span groups="account.group_show_line_subtotals_tax_excluded">Amount</span>
<span groups="account.group_show_line_subtotals_tax_included">Total Price</span>
<span>Part Type</span>
</th>
<th class="text-right">
<span>Quantity</span>
</th>
<th t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span>Unit Price</span>
</th>
<th class="text-right">
<span groups="account.group_show_line_subtotals_tax_excluded">
Amount
</span>
<span groups="account.group_show_line_subtotals_tax_included">
Total Price
</span>
</th>
</tr>
</thead>
@ -75,26 +108,38 @@
<t t-foreach="o.invoice_line_ids" t-as="line">
<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<t t-set="current_subtotal" t-value="current_subtotal + line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded"/>
<t t-set="current_subtotal"
t-value="current_subtotal + line.price_total"
groups="account.group_show_line_subtotals_tax_included"/>
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type" name="account_invoice_line_accountable">
<td name="account_invoice_line_name"><span t-field="line.name"/></td>
<td class="d-none"><span t-field="line.origin"/></td>
<t t-if="not line.display_type"
name="account_invoice_line_accountable">
<td name="account_invoice_line_name">
<span t-field="line.name"/>
</td>
<td class="d-none">
<span t-field="line.origin"/>
</td>
<td class="text-right">
<span t-field="line.product_id.short_name"/>
</td>
<td class="text-right">
<span t-field="line.quantity"/>
<span t-field="line.uom_id" groups="uom.group_uom"/>
<span t-field="line.uom_id"
groups="uom.group_uom"/>
</td>
<td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-field="line.price_unit"/>
</td>
<td class="text-right o_price_total">
<span t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<span t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
<span t-field="line.price_subtotal"
groups="account.group_show_line_subtotals_tax_excluded"/>
<span t-field="line.price_total"
groups="account.group_show_line_subtotals_tax_included"/>
</td>
</t>
<t t-if="line.display_type == 'line_section'">
@ -116,9 +161,9 @@
<td colspan="99">
<strong class="mr16">Subtotal</strong>
<span
t-esc="current_subtotal"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
t-esc="current_subtotal"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
</tr>
</t>
@ -131,7 +176,9 @@
<div t-attf-class="#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto">
<table class="table table-sm">
<tr class="border-black o_total">
<td><strong>Total</strong></td>
<td>
<strong>Total</strong>
</td>
<td class="text-right">
<span t-field="o.amount_total"/>
</td>
@ -141,7 +188,10 @@
</div>
</div>
<p t-if="o.reference">
Please use the following communication for your payment : <b><span t-field="o.reference"/></b>
Please use the following communication for your payment :
<b>
<span t-field="o.reference"/>
</b>
</p>
<p t-if="o.comment" name="comment">
<span t-field="o.comment"/>
@ -152,13 +202,22 @@
<p t-if="o.fiscal_position_id.note" name="note">
<span t-field="o.fiscal_position_id.note"/>
</p>
<div id="qrcode" t-if="(o.partner_id.country_id.code in ['BE', 'AT', 'DE', 'FI', 'NL']) and (o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.partner_bank_id.acc_number != False)">
<div id="qrcode"
t-if="(o.partner_id.country_id.code in ['BE', 'AT', 'DE', 'FI', 'NL']) and (o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.partner_bank_id.acc_number != False)">
<p t-if="(o.partner_bank_id.qr_code_valid)">
<strong class="text-center">Scan me with your banking app.</strong><br /><br />
<img class="border border-dark rounded" t-att-src="o.partner_bank_id.build_qr_code_url(o.residual,(o.reference) if (o.reference) else o.number)"/>
<strong class="text-center">Scan me with your banking
app.
</strong>
<br/>
<br/>
<img class="border border-dark rounded"
t-att-src="o.partner_bank_id.build_qr_code_url(o.residual,(o.reference) if (o.reference) else o.number)"/>
</p>
<p t-if="(o.partner_bank_id.qr_code_valid == False)">
<strong class="text-center">The SEPA QR Code informations are not set correctly.</strong><br />
<strong class="text-center">The SEPA QR Code
informations are not set correctly.
</strong>
<br/>
</p>
</div>
</div>
@ -169,7 +228,8 @@
<template id="theme_invoice_G002">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop.theme_invoice_G002_document" t-lang="o.partner_id.lang"/>
<t t-call="easy_my_coop.theme_invoice_G002_document"
t-lang="o.partner_id.lang"/>
</t>
</t>
</template>

236
easy_my_coop/report/cooperator_register_G001.xml

@ -1,121 +1,145 @@
<odoo>
<template id="cooperator_register_G001">
<t t-call="web.html_container">
<template id="cooperator_register_G001">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="5"/>
<t t-set="data_report_header_spacing" t-value="0"/>
<t t-set="data_report_dpi" t-value="110"/>
<t t-set="data_report_margin_top" t-value="5"/>
<t t-set="data_report_header_spacing" t-value="0"/>
<t t-set="data_report_dpi" t-value="110"/>
<!--<t t-call="theme_light.report_layout_002">-->
<!--<t t-call="theme_light.report_layout_002">-->
<div class="page">
<head>
<!--<link href="/theme_light/static/css/invoice_G002.css" rel="stylesheet"/>-->
</head>
<div class="page">
<head>
<!--<link href="/theme_light/static/css/invoice_G002.css" rel="stylesheet"/>-->
</head>
<!--<t t-call="theme_light.list_header_G002"/>-->
<!--<t t-call="theme_light.list_header_G002"/>-->
<br/><br/><br/><br/><br/>
<table class="title_table">
<tr>
<td>
<span class="color_text" t-esc="time.strftime('%Y-%m-%d')"/>
</td>
<td>
<div class="title_doc" style="font-size:16px">
<span>COOPERATOR REGISTER</span>
</div>
</td>
</tr>
</table>
<br/>
<br/>
<br/>
<br/>
<br/>
<table class="title_table">
<tr>
<td>
<span class="color_text"
t-esc="time.strftime('%Y-%m-%d')"/>
</td>
<td>
<div class="title_doc" style="font-size:16px">
<span>COOPERATOR REGISTER</span>
</div>
</td>
</tr>
</table>
<br/><br/><br/><br/><br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<table class="list_line_table_head" width="100%" >
<table class="list_line_table_head" width="100%">
<t t-set="total_quantity" t-value="0"/>
<t t-set="total_amount" t-value="0"/>
<t t-set="total_quantity" t-value="0"/>
<t t-set="total_amount" t-value="0"/>
<br />
<tr>
<th width="15%" style="text-align: center;" >Number</th>
<th width="25%" style="text-align: center;" >Name</th>
<th width="20%" style="text-align: center;" >Email</th>
<th width="15%" style="text-align: center;" >Effective date</th>
<th width="10%" style="text-align: center;" >Quantity</th>
<th width="15%" style="text-align: center;" >Total</th>
</tr>
<t t-set="nb_ligne" t-value="0"/>
<br/>
<tr>
<th width="15%" style="text-align: center;">Number</th>
<th width="25%" style="text-align: center;">Name</th>
<th width="20%" style="text-align: center;">Email</th>
<th width="15%" style="text-align: center;">Effective
date
</th>
<th width="10%" style="text-align: center;">Quantity
</th>
<th width="15%" style="text-align: center;">Total</th>
</tr>
<t t-set="nb_ligne" t-value="0"/>
<t t-foreach="docs" t-as="partner">
<t t-set="new_partner" t-value="0"/>
<t t-foreach="docs" t-as="partner">
<t t-set="new_partner" t-value="0"/>
<t t-foreach="partner.share_ids" t-as="line">
<t t-set="nb_ligne" t-value="nb_ligne+1"/>
<tr height="40px">
<div t-if="(nb_ligne%2)==1" >
<div t-if="(new_partner)==0">
<td class="lgn_impair" style="text-align:left;text-indent:20px;">
<span t-field="partner.cooperator_register_number" ></span>
</td>
<td style="text-align:left">
<span t-field="partner.name" ></span>
</td>
<td style="text-align:left">
<span t-field="partner.email" ></span>
</td>
</div>
<t t-foreach="partner.share_ids" t-as="line">
<t t-set="nb_ligne" t-value="nb_ligne+1"/>
<tr height="40px">
<div t-if="(nb_ligne%2)==1">
<div t-if="(new_partner)==0">
<td class="lgn_impair"
style="text-align:left;text-indent:20px;">
<span t-field="partner.cooperator_register_number"></span>
</td>
<td style="text-align:left">
<span t-field="partner.name"></span>
</td>
<td style="text-align:left">
<span t-field="partner.email"></span>
</td>
</div>
<div t-if="(new_partner)!=0">
<td class="lgn_impair" style="text-align:left;text-indent:20px;" colspan="3">
</td>
</div>
<td>
<span t-field="line.effective_date" ></span>
</td>
<td>
<span t-field="line.share_number" ></span>
</td>
<td>
<span t-field="line.total_amount_line"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
</div>
<div t-if="(nb_ligne%2)==0" >
<div t-if="(new_partner)==0" >
<td class="lgn_pair" style="text-align:left;text-indent:20px;background-color:#ffffff">
<span t-field="partner.cooperator_register_number" ></span>
</td>
<td class="lgn_pair" style="background-color:#ffffff;text-align:left">
<span t-field="partner.name" ></span>
</td>
<td class="lgn_pair" style="background-color:#ffffff;text-align:left">
<span t-field="partner.email" ></span>
</td>
</div>
<div t-if="(new_partner)!=0" style="background-color:#ffffff">
<td class="lgn_pair" style="text-align:left;text-indent:20px;background-color:#ffffff" colspan="3">
</td>
</div>
<td class="lgn_pair" style="background-color:#ffffff">
<span t-field="line.effective_date"> </span>
</td>
<td class="lgn_pair" style="background-color:#ffffff">
<span t-field="line.share_number" ></span>
</td>
<td class="lgn_pair" style="background-color:#ffffff">
<span t-field="line.total_amount_line"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
</div>
</tr>
<t t-set="new_partner" t-value="new_partner+1"/>
</t>
</t>
</table>
</div>
</t>
<!--</t>-->
</template>
<div t-if="(new_partner)!=0">
<td class="lgn_impair"
style="text-align:left;text-indent:20px;"
colspan="3">
</td>
</div>
<td>
<span t-field="line.effective_date"></span>
</td>
<td>
<span t-field="line.share_number"></span>
</td>
<td>
<span t-field="line.total_amount_line"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
</div>
<div t-if="(nb_ligne%2)==0">
<div t-if="(new_partner)==0">
<td class="lgn_pair"
style="text-align:left;text-indent:20px;background-color:#ffffff">
<span t-field="partner.cooperator_register_number"></span>
</td>
<td class="lgn_pair"
style="background-color:#ffffff;text-align:left">
<span t-field="partner.name"></span>
</td>
<td class="lgn_pair"
style="background-color:#ffffff;text-align:left">
<span t-field="partner.email"></span>
</td>
</div>
<div t-if="(new_partner)!=0"
style="background-color:#ffffff">
<td class="lgn_pair"
style="text-align:left;text-indent:20px;background-color:#ffffff"
colspan="3">
</td>
</div>
<td class="lgn_pair"
style="background-color:#ffffff">
<span t-field="line.effective_date"></span>
</td>
<td class="lgn_pair"
style="background-color:#ffffff">
<span t-field="line.share_number"></span>
</td>
<td class="lgn_pair"
style="background-color:#ffffff">
<span t-field="line.total_amount_line"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
</div>
</tr>
<t t-set="new_partner" t-value="new_partner+1"/>
</t>
</t>
</table>
</div>
</t>
<!--</t>-->
</template>
</odoo>

206
easy_my_coop/report/cooperator_subscription_G001.xml

@ -1,106 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="cooperator_subscription_G001">
<t t-call="web.html_container">
<template id="cooperator_subscription_G001">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="5"/>
<t t-set="data_report_header_spacing" t-value="0"/>
<t t-set="data_report_dpi" t-value="110"/>
<t t-set="data_report_margin_top" t-value="5"/>
<t t-set="data_report_header_spacing" t-value="0"/>
<t t-set="data_report_dpi" t-value="110"/>
<!--<t t-call="theme_light.report_layout_002">-->
<!--<t t-call="theme_light.report_layout_002">-->
<div class="page">
<head>
<!--<link href="/theme_light/static/css/invoice_G002.css" rel="stylesheet"/>-->
</head>
<div class="page">
<head>
<!--<link href="/theme_light/static/css/invoice_G002.css" rel="stylesheet"/>-->
</head>
<!--<t t-call="theme_light.list_header_G002"/>-->
<!--<t t-call="theme_light.list_header_G002"/>-->
<br/><br/><br/><br/><br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<table class="title_table">
<tr>
<td>
<span class="color_text" t-esc="time.strftime('%Y-%m-%d')"/>
</td>
<td>
<div class="title_doc" style="font-size:16px">
<span>SUBSCRIPTION REGISTER</span>
</div>
</td>
</tr>
</table>
<table class="title_table">
<tr>
<td>
<span class="color_text"
t-esc="time.strftime('%Y-%m-%d')"/>
</td>
<td>
<div class="title_doc" style="font-size:16px">
<span>SUBSCRIPTION REGISTER</span>
</div>
</td>
</tr>
</table>
<br/><br/><br/><br/><br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<table class="list_line_table_head" width="100%" >
<br />
<tr>
<th width="15%" style="text-align: center;" >Operation number</th>
<th width="30%" style="text-align: left;text-indent:15px" >Cooperator</th>
<th width="15%" style="text-align: center;" >Subscription date</th>
<th width="25%" style="text-align: center;" >Operation type</th>
<th width="15%" style="text-align: center;" >Share number</th>
</tr>
<t t-set="nb_ligne" t-value="0"/>
<table class="list_line_table_head" width="100%">
<br/>
<tr>
<th width="15%" style="text-align: center;">Operation
number
</th>
<th width="30%"
style="text-align: left;text-indent:15px">Cooperator
</th>
<th width="15%" style="text-align: center;">Subscription
date
</th>
<th width="25%" style="text-align: center;">Operation
type
</th>
<th width="15%" style="text-align: center;">Share
number
</th>
</tr>
<t t-set="nb_ligne" t-value="0"/>
<p t-foreach="docs" t-as="transaction">
<t t-set="nb_ligne" t-value="nb_ligne+1"/>
<tr height="40px">
<div t-if="(nb_ligne%2)==1" >
<td class="lgn_impair" style="text-align:left;text-indent:10px">
<span t-field="transaction.register_number_operation" ></span>
</td>
<td style="text-align:left;text-indent:15px">
<span t-field="transaction.partner_id.name" ></span>
</td>
<td style="text-align:center">
<span t-field="transaction.date" ></span>
</td>
<td style="text-align:center">
<span t-field="transaction.type"/>
</td>
<td style="text-align:center">
<span t-field="transaction.quantity" ></span>
</td>
<p t-foreach="docs" t-as="transaction">
<t t-set="nb_ligne" t-value="nb_ligne+1"/>
<tr height="40px">
<div t-if="(nb_ligne%2)==1">
<td class="lgn_impair"
style="text-align:left;text-indent:10px">
<span t-field="transaction.register_number_operation"></span>
</td>
<td style="text-align:left;text-indent:15px">
<span t-field="transaction.partner_id.name"></span>
</td>
<td style="text-align:center">
<span t-field="transaction.date"></span>
</td>
<td style="text-align:center">
<span t-field="transaction.type"/>
</td>
<td style="text-align:center">
<span t-field="transaction.quantity"></span>
</td>
</div>
<div t-if="(nb_ligne%2)==0" >
<td class="lgn_pair" style="text-align:left;text-indent:10px;background-color:#ffffff">
<span t-field="transaction.register_number_operation" ></span>
</td>
<td class="lgn_pair" style="text-align:left;text-indent:15px;background-color:#ffffff">
<span t-field="transaction.partner_id.name" ></span>
</td>
<td style="text-align:center;background-color:#ffffff">
<span t-field="transaction.date" ></span>
</td>
<td style="text-align:center;background-color:#ffffff">
<span t-field="transaction.type"/>
</td>
<td style="text-align:center;background-color:#ffffff">
<span t-field="transaction.quantity" ></span>
</td>
</div>
</tr>
</p>
</table>
</div>
<div t-if="(nb_ligne%2)==0">
<td class="lgn_pair"
style="text-align:left;text-indent:10px;background-color:#ffffff">
<span t-field="transaction.register_number_operation"></span>
</td>
<td class="lgn_pair"
style="text-align:left;text-indent:15px;background-color:#ffffff">
<span t-field="transaction.partner_id.name"></span>
</td>
<td style="text-align:center;background-color:#ffffff">
<span t-field="transaction.date"></span>
</td>
<td style="text-align:center;background-color:#ffffff">
<span t-field="transaction.type"/>
</td>
<td style="text-align:center;background-color:#ffffff">
<span t-field="transaction.quantity"></span>
</td>
</div>
</tr>
</p>
</table>
<table width="100%" >
<br />
<tr height="40px">
<th width="15%"></th>
<th width="30%"></th>
<th width="15%"></th>
<th class="total_table color_text" width="25%"> TOTAL : </th>
<table width="100%">
<br/>
<tr height="40px">
<th width="15%"></th>
<th width="30%"></th>
<th width="15%"></th>
<th class="total_table color_text" width="25%">TOTAL :
</th>
<th class="total_table" style="text-align:center" width="15%">
<span t-esc="sum(t.quantity for t in docs)"/>
</th>
</tr>
</table>
</div>
</t>
<!--</t>-->
</template>
<th class="total_table" style="text-align:center"
width="15%">
<span t-esc="sum(t.quantity for t in docs)"/>
</th>
</tr>
</table>
</div>
</t>
<!--</t>-->
</template>
</odoo>

68
easy_my_coop/report/easy_my_coop_report.xml

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<data noupdate="1">
<report
id="action_cooperator_invoices"
model="account.invoice"
string="Capital release request"
report_type="qweb-pdf"
name="easy_my_coop.theme_invoice_G002"
file="easy_my_coop.cooperator_invoice_G002.xml"
attachment="(object.state in ('open','paid')) and ('SUBJ'+(object.number or '').replace('/','')+'.pdf')"
id="action_cooperator_invoices"
model="account.invoice"
string="Capital release request"
report_type="qweb-pdf"
name="easy_my_coop.theme_invoice_G002"
file="easy_my_coop.cooperator_invoice_G002.xml"
attachment="(object.state in ('open','paid')) and ('SUBJ'+(object.number or '').replace('/','')+'.pdf')"
/>
<report
id="action_cooperator_subscription_report"
model="subscription.register"
string="Subscription Register Report"
report_type="qweb-pdf"
name="easy_my_coop.cooperator_subscription_G001"
file="easy_my_coop.cooperator_subscription_G001.xml"
multi="True"
menu="True"
id="action_cooperator_subscription_report"
model="subscription.register"
string="Subscription Register Report"
report_type="qweb-pdf"
name="easy_my_coop.cooperator_subscription_G001"
file="easy_my_coop.cooperator_subscription_G001.xml"
multi="True"
menu="True"
/>
<report
id="action_cooperator_report_certificat"
model="res.partner"
string="Cooperator certificat"
report_type="qweb-pdf"
name="easy_my_coop.cooperator_certificat_G001"
file="easy_my_coop.cooperator_certificat_G001.xml"
multi="True"
menu="True"
<report
id="action_cooperator_report_certificat"
model="res.partner"
string="Cooperator certificat"
report_type="qweb-pdf"
name="easy_my_coop.cooperator_certificat_G001"
file="easy_my_coop.cooperator_certificat_G001.xml"
multi="True"
menu="True"
/>
<report
id="action_report_cooperator_register"
model="res.partner"
string="Cooperator register"
report_type="qweb-pdf"
name="easy_my_coop.cooperator_register_G001"
file="easy_my_coop.cooperator_register_G001.xml"
multi="True"
menu="True"
id="action_report_cooperator_register"
model="res.partner"
string="Cooperator register"
report_type="qweb-pdf"
name="easy_my_coop.cooperator_register_G001"
file="easy_my_coop.cooperator_register_G001.xml"
multi="True"
menu="True"
/>
</data>
</data>
</odoo>

65
easy_my_coop/report/layout.xml

@ -1,38 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="emc_external_layout_standard" inherit_id="web.external_layout_standard" primary="True">
<xpath expr="//div[hasclass('o_standard_footer')]" position="attributes">
<template id="emc_external_layout_standard"
inherit_id="web.external_layout_standard" primary="True">
<xpath expr="//div[hasclass('o_standard_footer')]"
position="attributes">
<attribute name="style">display: none;</attribute>
</xpath>
<xpath expr="//div[hasclass('footer', 'o_standard_footer')]" position="before">
<div class="footer o_emc_footer" name="footer" style="font-size: 0.8em;">
<xpath expr="//div[hasclass('footer', 'o_standard_footer')]"
position="before">
<div class="footer o_emc_footer" name="footer"
style="font-size: 0.8em;">
<div class="row">
<div t-att-class="'text-center col-10' if company.display_logo1 or company.display_logo2 else 'text-center col'">
<ul class="list-inline mb4">
<li t-if="company.phone" class="list-inline-item">Phone: <span t-field="company.phone"/></li>
<li t-if="company.email" class="list-inline-item">Email: <span t-field="company.email"/></li>
<li t-if="company.website" class="list-inline-item">Web: <span t-field="company.website"/></li>
<li t-if="company.vat" class="list-inline-item"><t t-esc="company.country_id.vat_label or 'Tax ID'"/>: <span t-field="company.vat"/></li>
<li t-if="company.phone" class="list-inline-item">
Phone:
<span t-field="company.phone"/>
</li>
<li t-if="company.email" class="list-inline-item">
Email:
<span t-field="company.email"/>
</li>
<li t-if="company.website" class="list-inline-item">
Web:
<span t-field="company.website"/>
</li>
<li t-if="company.vat" class="list-inline-item"><t
t-esc="company.country_id.vat_label or 'Tax ID'"/>
:
<span t-field="company.vat"/>
</li>
</ul>
<div name="financial_infos">
<span t-field="company.report_footer"/>
</div>
<div t-if="report_type == 'pdf'" class="text-muted text-center">
Page: <span class="page"/> / <span class="topage"/>
<div t-if="report_type == 'pdf'"
class="text-muted text-center">
Page:
<span class="page"/>
/
<span class="topage"/>
</div>
</div>
<div name="logos" class="col-2 text-center" t-if="company.display_logo1 or company.display_logo2">
<div name="logos" class="col-2 text-center"
t-if="company.display_logo1 or company.display_logo2">
<img class="img img-responsive"
t-if="company.display_logo1"
t-attf-src="data:image/*;base64,{{company.bottom_logo1}}"
style="display: block; margin: auto; max-width: 100%; max-height: 3em;"/>
t-if="company.display_logo1"
t-attf-src="data:image/*;base64,{{company.bottom_logo1}}"
style="display: block; margin: auto; max-width: 100%; max-height: 3em;"/>
<img class="img img-responsive"
t-if="company.display_logo2"
t-attf-src="data:image/*;base64,{{company.bottom_logo2}}"
style="display: block; margin: auto; max-width: 100%; max-height: 3em;"/>
t-if="company.display_logo2"
t-attf-src="data:image/*;base64,{{company.bottom_logo2}}"
style="display: block; margin: auto; max-width: 100%; max-height: 3em;"/>
</div>
</div>
</div>
@ -40,15 +62,16 @@
</template>
<template
id="emc_external_layout_larger_logo"
inherit_id="easy_my_coop.emc_external_layout_standard"
primary="True">
id="emc_external_layout_larger_logo"
inherit_id="easy_my_coop.emc_external_layout_standard"
primary="True">
<!--
This template should be used with the special paperformat
that extend margin. See paperformat in data.
-->
<xpath expr="//div[hasclass('header')]//div//img" position="attributes">
<attribute name="style">min-height: 75px; max-height: 75px;</attribute>
<attribute name="style">min-height: 75px; max-height: 75px;
</attribute>
</xpath>
</template>

6
easy_my_coop/security/res_groups.xml

@ -3,13 +3,15 @@
<record id="group_easy_my_coop_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_category_cooperator_management"/>
<field name="implied_ids" eval="[(6, 0, [ref('base.group_user'), ref('account.group_account_invoice')])]"/>
<field name="implied_ids"
eval="[(6, 0, [ref('base.group_user'), ref('account.group_account_invoice')])]"/>
</record>
<record id="group_easy_my_coop_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="module_category_cooperator_management"/>
<field name="implied_ids" eval="[(4, ref('group_easy_my_coop_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
<field name="users"
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
</openerp>

148
easy_my_coop/views/account_invoice_view.xml

@ -1,73 +1,93 @@
<odoo>
<record id="invoice_form" model="ir.ui.view">
<field name="name">account.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form" />
<field name="arch" type="xml">
<field name="move_id" position="after">
<field name="subscription_request" />
</field>
</field>
</record>
<record id="invoice_form" model="ir.ui.view">
<field name="name">account.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<field name="move_id" position="after">
<field name="subscription_request"/>
</field>
</field>
</record>
<record id="action_invoice_tree_coop" model="ir.actions.act_window">
<field name="name">Cooperator Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','in',('out_invoice', 'out_refund')),('release_capital_request','=',True)]</field>
<field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
<record id="action_invoice_tree_coop" model="ir.actions.act_window">
<field name="name">Cooperator Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity
</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','in',('out_invoice',
'out_refund')),('release_capital_request','=',True)]
</field>
<field name="context">{'default_type':'out_invoice',
'type':'out_invoice', 'journal_type': 'sale'}
</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a customer invoice
</p><p>
Create invoices, register payments and keep track of the discussions with your customers.
</p>
</field>
</record>
</p>
<p>
Create invoices, register payments and keep track of the
discussions with your customers.
</p>
</field>
</record>
<record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="account.invoice_tree"/>
<field name="act_window_id" ref="action_invoice_tree_coop"/>
</record>
<record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="account.invoice_tree"/>
<field name="act_window_id" ref="action_invoice_tree_coop"/>
</record>
<record id="action_invoice_tree1_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="account.invoice_form"/>
<field name="act_window_id" ref="action_invoice_tree_coop"/>
</record>
<record id="action_invoice_tree1_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="account.invoice_form"/>
<field name="act_window_id" ref="action_invoice_tree_coop"/>
</record>
<record id="account.action_invoice_tree1" model="ir.actions.act_window">
<field name="name">Customer Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','in',('out_invoice', 'out_refund')),('release_capital_request','=',False)]</field>
<field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
<record id="account.action_invoice_tree1" model="ir.actions.act_window">
<field name="name">Customer Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity
</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','in',('out_invoice',
'out_refund')),('release_capital_request','=',False)]
</field>
<field name="context">{'default_type':'out_invoice',
'type':'out_invoice', 'journal_type': 'sale'}
</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a customer invoice
</p><p>
Create invoices, register payments and keep track of the discussions with your customers.
</p>
</field>
</record>
</p>
<p>
Create invoices, register payments and keep track of the
discussions with your customers.
</p>
</field>
</record>
<record id="account.action_invoice_refund_out_tree" model="ir.actions.act_window">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,kanban,calendar,graph,pivot</field>
<field name="view_id" ref="account.invoice_tree"/>
<field name="domain">[('type','in', ['out_invoice', 'out_refund']), ('state', 'not in', ['draft', 'cancel']),('release_capital_request','=',False)]</field>
<field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
</record>
<record id="account.action_invoice_refund_out_tree"
model="ir.actions.act_window">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,kanban,calendar,graph,pivot</field>
<field name="view_id" ref="account.invoice_tree"/>
<field name="domain">[('type','in', ['out_invoice', 'out_refund']),
('state', 'not in', ['draft',
'cancel']),('release_capital_request','=',False)]
</field>
<field name="context">{'default_type':'out_invoice',
'type':'out_invoice', 'journal_type': 'sale'}
</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
</record>
</odoo>

24
easy_my_coop/views/account_journal_view.xml

@ -1,26 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_account_journal_form_coop" model="ir.ui.view">
<record id="view_account_journal_form_coop" model="ir.ui.view">
<field name="name">account.journal.form</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="bank_id" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="get_general_payment"/>
</field>
<field name="bank_id" position="after">
<field name="get_cooperator_payment"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="get_general_payment"/>
</field>
</field>
</record>
</record>
<record id="view_account_bank_journal_form_coop" model="ir.ui.view">
<record id="view_account_bank_journal_form_coop" model="ir.ui.view">
<field name="name">account.bank.journal.form</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_bank_journal_form"/>
<field name="arch" type="xml">
<field name="currency_id" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="get_general_payment"/>
</field>
<field name="currency_id" position="after">
<field name="get_cooperator_payment"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="get_general_payment"/>
</field>
</field>
</record>
</odoo>

145
easy_my_coop/views/cooperator_register_view.xml

@ -1,77 +1,84 @@
<odoo>
<record id="subscription_register_tree" model="ir.ui.view">
<field name="name">subscription.register.tree</field>
<field name="model">subscription.register</field>
<field name="arch" type="xml">
<tree string="Subscription Register">
<record id="subscription_register_tree" model="ir.ui.view">
<field name="name">subscription.register.tree</field>
<field name="model">subscription.register</field>
<field name="arch" type="xml">
<tree string="Subscription Register">
<field name="register_number_operation"/>
<field name="date"/>
<field name="partner_id"/>
<field name="share_short_name"/>
<field name="quantity" sum="Total quantity"/>
<field name="share_unit_price"/>
<field name="total_amount_line" sum="Total amount"/>
<field name="type"/>
</tree>
</field>
</record>
<field name="date"/>
<field name="partner_id"/>
<field name="share_short_name"/>
<field name="quantity" sum="Total quantity"/>
<field name="share_unit_price"/>
<field name="total_amount_line" sum="Total amount"/>
<field name="type"/>
</tree>
</field>
</record>
<record id="subscription_register_form" model="ir.ui.view">
<field name="name">subscription.register.form</field>
<field name="model">subscription.register</field>
<field name="arch" type="xml">
<form string="Subscription Register">
<record id="subscription_register_form" model="ir.ui.view">
<field name="name">subscription.register.form</field>
<field name="model">subscription.register</field>
<field name="arch" type="xml">
<form string="Subscription Register">
<group>
<group>
<field name="register_number_operation"/>
<field name="date"/>
<field name="partner_id"/>
<field name="share_short_name"/>
<field name="quantity"/>
<field name="share_unit_price"/>
<field name="total_amount_line"/>
</group>
<group>
<field name="partner_id_to" attrs="{'invisible':[('type','!=','transfer')]}"/>
<field name="type"/>
<field name="share_to_short_name"/>
<field name="quantity_to"/>
<field name="share_to_unit_price"/>
<field name="user_id" invisible="True"/>
</group>
</group>
</form>
</field>
</record>
<group>
<field name="register_number_operation"/>
<field name="date"/>
<field name="partner_id"/>
<field name="share_short_name"/>
<field name="quantity"/>
<field name="share_unit_price"/>
<field name="total_amount_line"/>
</group>
<group>
<field name="partner_id_to"
attrs="{'invisible':[('type','!=','transfer')]}"/>
<field name="type"/>
<field name="share_to_short_name"/>
<field name="quantity_to"/>
<field name="share_to_unit_price"/>
<field name="user_id" invisible="True"/>
</group>
</group>
</form>
</field>
</record>
<record id="view_subscription_register_filter" model="ir.ui.view">
<field name="name">Subscription Register Search</field>
<field name="model">subscription.register</field>
<field name="arch" type="xml">
<search string="Search Subscription Register">
<field name="partner_id"
filter_domain="[('partner_id','ilike',self)]"/>
<field name="register_number_operation"/>
<separator/>
<filter string="Subscription" name="type_subscription" domain="[('type','=','subscription')]"/>
<filter string="Transfer" name="type_transfer" domain="[('type','=','transfer')]"/>
<filter string="Sell back" name="type_sell_back" domain="[('type','=','sell_back')]"/>
<filter string="Convert" name="type_convert" domain="[('type','=','convert')]"/>
<separator/>
<group expand="0" name="group_by" string="Group By">
<filter name="entry_type" string="Entry type" context="{'group_by' : 'type'}" />
<filter name="subscription_date" string="Subscription Date" context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
<record id="view_subscription_register_filter" model="ir.ui.view">
<field name="name">Subscription Register Search</field>
<field name="model">subscription.register</field>
<field name="arch" type="xml">
<search string="Search Subscription Register">
<field name="partner_id"
filter_domain="[('partner_id','ilike',self)]"/>
<field name="register_number_operation"/>
<separator/>
<filter string="Subscription" name="type_subscription"
domain="[('type','=','subscription')]"/>
<filter string="Transfer" name="type_transfer"
domain="[('type','=','transfer')]"/>
<filter string="Sell back" name="type_sell_back"
domain="[('type','=','sell_back')]"/>
<filter string="Convert" name="type_convert"
domain="[('type','=','convert')]"/>
<separator/>
<group expand="0" name="group_by" string="Group By">
<filter name="entry_type" string="Entry type"
context="{'group_by' : 'type'}"/>
<filter name="subscription_date" string="Subscription Date"
context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
<record id="subscription_register_action" model="ir.actions.act_window">
<field name="name">Subscription Register</field>
<field name="res_model">subscription.register</field>
<field name="view_type">form</field>
<field name="view_id" ref="subscription_register_tree"/>
<field name="search_view_id" ref="view_subscription_register_filter"/>
</record>
<record id="subscription_register_action" model="ir.actions.act_window">
<field name="name">Subscription Register</field>
<field name="res_model">subscription.register</field>
<field name="view_type">form</field>
<field name="view_id" ref="subscription_register_tree"/>
<field name="search_view_id" ref="view_subscription_register_filter"/>
</record>
</odoo>

20
easy_my_coop/views/email_template_view.xml

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.actions.act_window"
id="action_easy_my_coop_email_templates">
<field name="name">Mail Templates</field>
<field name="res_model">mail.template</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="domain">[('easy_my_coop','=',True)]</field>
<field name="view_id" ref="mail.email_template_tree" />
<field name="search_view_id" ref="mail.view_email_template_search" />
</record>
<record model="ir.actions.act_window"
id="action_easy_my_coop_email_templates">
<field name="name">Mail Templates</field>
<field name="res_model">mail.template</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="domain">[('easy_my_coop','=',True)]</field>
<field name="view_id" ref="mail.email_template_tree"/>
<field name="search_view_id" ref="mail.view_email_template_search"/>
</record>
</odoo>

62
easy_my_coop/views/menus.xml

@ -4,23 +4,55 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<menuitem name="Easy-My Coop" id="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="40" />
<menuitem name="Easy-My Coop" id="menu_main_easy_my_coop"
groups="easy_my_coop.group_easy_my_coop_user" sequence="40"/>
<menuitem name="Share Management" id="menu_easy_my_coop_main_subscription" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="10" />
<menuitem name="Subscriptions" id="menu_easy_my_coop_subscription_request" action="subscription_request_action" parent="menu_easy_my_coop_main_subscription" sequence="110" />
<menuitem name="Register Payment" id="menu_action_invoice_tree_coop" action="action_invoice_tree_coop" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_user" sequence="130" />
<menuitem name="Cooperator Candidates" id="menu_easy_my_coop_cooperator_candidate" action="action_partner_cooperator_candidate_form" parent="menu_easy_my_coop_main_subscription" sequence="140" />
<menuitem name="Subscription Register" id="menu_easy_my_coop_subscription_register" action="subscription_register_action" parent="menu_easy_my_coop_main_subscription" sequence="150" />
<menuitem name="Operation request" id="menu_easy_my_coop_operation_request" action="operation_request_action" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_user" sequence="160" />
<!-- <menuitem name="Share Lines" id="menu_easy_my_coop_share_line" action="share_line_action" parent="menu_easy_my_coop_main_subscription" groups="base.group_erp_manager" sequence="170" />-->
<menuitem name="Share Management" id="menu_easy_my_coop_main_subscription"
parent="menu_main_easy_my_coop"
groups="easy_my_coop.group_easy_my_coop_user" sequence="10"/>
<menuitem name="Subscriptions" id="menu_easy_my_coop_subscription_request"
action="subscription_request_action"
parent="menu_easy_my_coop_main_subscription" sequence="110"/>
<menuitem name="Register Payment" id="menu_action_invoice_tree_coop"
action="action_invoice_tree_coop"
parent="menu_easy_my_coop_main_subscription"
groups="easy_my_coop.group_easy_my_coop_user" sequence="130"/>
<menuitem name="Cooperator Candidates"
id="menu_easy_my_coop_cooperator_candidate"
action="action_partner_cooperator_candidate_form"
parent="menu_easy_my_coop_main_subscription" sequence="140"/>
<menuitem name="Subscription Register"
id="menu_easy_my_coop_subscription_register"
action="subscription_register_action"
parent="menu_easy_my_coop_main_subscription" sequence="150"/>
<menuitem name="Operation request" id="menu_easy_my_coop_operation_request"
action="operation_request_action"
parent="menu_easy_my_coop_main_subscription"
groups="easy_my_coop.group_easy_my_coop_user" sequence="160"/>
<!-- <menuitem name="Share Lines" id="menu_easy_my_coop_share_line" action="share_line_action" parent="menu_easy_my_coop_main_subscription" groups="base.group_erp_manager" sequence="170" />-->
<menuitem name="Contacts" id="menu_easy_my_coop_main_coop" parent="menu_main_easy_my_coop" sequence="20"/>
<menuitem name="Cooperators" id="menu_easy_my_coop_cooperator" action="action_partner_cooperator_form" parent="menu_easy_my_coop_main_coop" sequence="210" />
<menuitem name="Company representative" id="menu_easy_my_coop_company_representative" action="action_company_representative_form" parent="menu_easy_my_coop_main_coop" groups="base.group_erp_manager" sequence="220" />
<menuitem name="Contacts" id="menu_easy_my_coop_main_coop"
parent="menu_main_easy_my_coop" sequence="20"/>
<menuitem name="Cooperators" id="menu_easy_my_coop_cooperator"
action="action_partner_cooperator_form"
parent="menu_easy_my_coop_main_coop" sequence="210"/>
<menuitem name="Company representative"
id="menu_easy_my_coop_company_representative"
action="action_company_representative_form"
parent="menu_easy_my_coop_main_coop"
groups="base.group_erp_manager" sequence="220"/>
<menuitem name="Reporting" id="menu_easy_my_coop_main_reporting" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="30" />
<menuitem name="Reporting" id="menu_easy_my_coop_main_reporting"
parent="menu_main_easy_my_coop"
groups="easy_my_coop.group_easy_my_coop_user" sequence="30"/>
<menuitem name="Configuration" id="menu_easy_my_coop_config" parent="menu_main_easy_my_coop" sequence="40" groups="group_easy_my_coop_manager" />
<menuitem name="Share type" id="menu_easy_my_coop_share_product" action="share_product_action" parent="menu_easy_my_coop_config" sequence="410" />
<menuitem name="Mail Templates" id="menu_easy_my_coop_templates" action="action_easy_my_coop_email_templates" parent="menu_easy_my_coop_config" sequence="430" />
<menuitem name="Configuration" id="menu_easy_my_coop_config"
parent="menu_main_easy_my_coop" sequence="40"
groups="group_easy_my_coop_manager"/>
<menuitem name="Share type" id="menu_easy_my_coop_share_product"
action="share_product_action" parent="menu_easy_my_coop_config"
sequence="410"/>
<menuitem name="Mail Templates" id="menu_easy_my_coop_templates"
action="action_easy_my_coop_email_templates"
parent="menu_easy_my_coop_config" sequence="430"/>
</odoo>

224
easy_my_coop/views/operation_request_view.xml

@ -1,105 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="operation_request_tree" model="ir.ui.view">
<field name="name">operation.request.tree</field>
<field name="model">operation.request</field>
<field name="arch" type="xml">
<tree string="Operation requests" colors="green:state in ('approved'); blue:state in ('draft');grey: state in ('done')">
<field name="request_date"/>
<field name="partner_id"/>
<field name="operation_type"/>
<field name="quantity"/>
<field name="user_id"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="operation_request_tree" model="ir.ui.view">
<field name="name">operation.request.tree</field>
<field name="model">operation.request</field>
<field name="arch" type="xml">
<tree string="Operation requests"
colors="green:state in ('approved'); blue:state in ('draft');grey: state in ('done')">
<field name="request_date"/>
<field name="partner_id"/>
<field name="operation_type"/>
<field name="quantity"/>
<field name="user_id"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="operation_request_form" model="ir.ui.view">
<field name="name">operation.request.form</field>
<field name="model">operation.request</field>
<field name="arch" type="xml">
<form string="Operation request">
<header>
<button string="Submit" type="object" name="submit_operation" states="draft"/>
<button string="Approve" type="object" name="approve_operation" states="waiting"/>
<button string="Refuse" type="object" name="refuse_operation" states="waiting"/>
<button string="Cancel" type="object" name="cancel_operation" states="draft,waiting,approved"/>
<button string="Draft" type="object" name="reset_to_draft" states="waiting,cancelled"/>
<button string="Execute" type="object" name="execute_operation" states="approved"/>
<field name="state" widget="statusbar" statusbar_visible="draft,done,cancelled,refused" statusbar_colors='{"draft":"grey","done":"green","cancelled":"orange","refused":"red"}'/>
<record id="operation_request_form" model="ir.ui.view">
<field name="name">operation.request.form</field>
<field name="model">operation.request</field>
<field name="arch" type="xml">
<form string="Operation request">
<header>
<button string="Submit" type="object"
name="submit_operation" states="draft"/>
<button string="Approve" type="object"
name="approve_operation" states="waiting"/>
<button string="Refuse" type="object"
name="refuse_operation" states="waiting"/>
<button string="Cancel" type="object"
name="cancel_operation"
states="draft,waiting,approved"/>
<button string="Draft" type="object" name="reset_to_draft"
states="waiting,cancelled"/>
<button string="Execute" type="object"
name="execute_operation" states="approved"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,done,cancelled,refused"
statusbar_colors='{"draft":"grey","done":"green","cancelled":"orange","refused":"red"}'/>
</header>
<sheet>
<group>
<group>
<field name="request_date" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="operation_type" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="receiver_not_member" attrs="{'invisible':[('operation_type','!=','transfer')]}"/>
<field name="partner_id" options="{'no_create':True}" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="partner_id_to" options="{'no_create':True}" attrs="{'invisible':['|',('operation_type','!=','transfer'), ('receiver_not_member','=',True)]}"/>
</group>
<group>
<field name="user_id"/>
<field name="share_product_id" attrs="{'readonly':[('state','!=','draft')]}" widget="selection"/>
<field name="share_short_name" readonly="True"/>
<field name="share_to_product_id" attrs="{'invisible':[('operation_type','!=','convert')],'required':[('operation_type','=','convert')],'readonly':[('state','!=','draft')]}" widget="selection"/>
<field name="share_to_short_name" readonly="True"/>
<field name="quantity" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="share_unit_price" readonly="True"/>
<field name="subscription_amount" readonly="True" />
</group>
</group>
<group>
<field name="subscription_request" attrs="{'invisible':['|',('operation_type','!=','transfer'),('receiver_not_member','=',False)]}" context="{'default_is_operation': True, 'default_ordered_parts':quantity,'default_share_product_id': share_product_id, 'default_source':'operation'}">
<tree>
<field name="name"/>
<field name="birthdate"/>
<field name="phone"/>
<field name="email"/>
<field name="iban"/>
<field name="state" invisible="True"/>
</tree>
<form string="Subscription Requests">
<sheet>
<group>
<group>
<field name="name"/>
<field name="firstname"/>
<field name="lastname"/>
<field name="birthdate"/>
<field name="gender"/>
<field name="email"/>
<field name="phone"/>
<field name="iban"/>
</group>
<group>
<field name="address"/>
<field name="zip_code"/>
<field name="city"/>
<field name="country_id"/>
<field name="lang"/>
<field name="validated"/>
<field name="skip_control_ng"/>
<field name="ordered_parts" invisible="True"/>
<field name="source" invisible="True"/>
<field name="state" invisible="True"/>
<field name="share_product_id" invisible="True"/>
</group>
</group>
</sheet>
</form>
</field>
</group>
</sheet>
</form>
</field>
</record>
<sheet>
<group>
<group>
<field name="request_date"
attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="operation_type"
attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="receiver_not_member"
attrs="{'invisible':[('operation_type','!=','transfer')]}"/>
<field name="partner_id"
options="{'no_create':True}"
attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="partner_id_to"
options="{'no_create':True}"
attrs="{'invisible':['|',('operation_type','!=','transfer'), ('receiver_not_member','=',True)]}"/>
</group>
<group>
<field name="user_id"/>
<field name="share_product_id"
attrs="{'readonly':[('state','!=','draft')]}"
widget="selection"/>
<field name="share_short_name" readonly="True"/>
<field name="share_to_product_id"
attrs="{'invisible':[('operation_type','!=','convert')],'required':[('operation_type','=','convert')],'readonly':[('state','!=','draft')]}"
widget="selection"/>
<field name="share_to_short_name" readonly="True"/>
<field name="quantity"
attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="share_unit_price" readonly="True"/>
<field name="subscription_amount" readonly="True"/>
</group>
</group>
<group>
<field name="subscription_request"
attrs="{'invisible':['|',('operation_type','!=','transfer'),('receiver_not_member','=',False)]}"
context="{'default_is_operation': True, 'default_ordered_parts':quantity,'default_share_product_id': share_product_id, 'default_source':'operation'}">
<tree>
<field name="name"/>
<field name="birthdate"/>
<field name="phone"/>
<field name="email"/>
<field name="iban"/>
<field name="state" invisible="True"/>
</tree>
<form string="Subscription Requests">
<sheet>
<group>
<group>
<field name="name"/>
<field name="firstname"/>
<field name="lastname"/>
<field name="birthdate"/>
<field name="gender"/>
<field name="email"/>
<field name="phone"/>
<field name="iban"/>
</group>
<group>
<field name="address"/>
<field name="zip_code"/>
<field name="city"/>
<field name="country_id"/>
<field name="lang"/>
<field name="validated"/>
<field name="skip_control_ng"/>
<field name="ordered_parts"
invisible="True"/>
<field name="source"
invisible="True"/>
<field name="state"
invisible="True"/>
<field name="share_product_id"
invisible="True"/>
</group>
</group>
</sheet>
</form>
</field>
</group>
</sheet>
</form>
</field>
</record>
<record id="operation_request_action" model="ir.actions.act_window">
<field name="name">Operation request</field>
<field name="res_model">operation.request</field>
<field name="view_type">form</field>
<field name="view_id" ref="operation_request_tree"/>
</record>
<record id="operation_request_action" model="ir.actions.act_window">
<field name="name">Operation request</field>
<field name="res_model">operation.request</field>
<field name="view_type">form</field>
<field name="view_id" ref="operation_request_tree"/>
</record>
</odoo>

285
easy_my_coop/views/product_view.xml

@ -1,153 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="product_template_share_form_view" model="ir.ui.view">
<field name="name">product.template.share.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='purchase_ok']/.." position="after">
<div groups="easy_my_coop.group_easy_my_coop_manager">
<field name="is_share"/>
<label for="is_share"/>
</div>
<div attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_easy_my_coop_user">
<field name="display_on_website"/>
<label for="display_on_website"/>
</div>
</xpath>
<page name="general_information" position="after">
<page string="Share Information" name="share_information" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_easy_my_coop_user">
<group>
<group name="Info" string="Info">
<field name="short_name"/>
<field name="default_share_product"/>
<field name="mail_template"/>
</group>
<group name="configuration" string="Configuration">
<field name="force_min_qty"/>
<field name="minimum_quantity"/>
<field name="customer" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="by_company"/>
<field name="by_individual"/>
</group>
</group>
</page>
<record id="product_template_share_form_view" model="ir.ui.view">
<field name="name">product.template.share.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='purchase_ok']/.." position="after">
<div groups="easy_my_coop.group_easy_my_coop_manager">
<field name="is_share"/>
<label for="is_share"/>
</div>
<div attrs="{'invisible':[('is_share','=',False)]}"
groups="easy_my_coop.group_easy_my_coop_user">
<field name="display_on_website"/>
<label for="display_on_website"/>
</div>
</xpath>
<page name="general_information" position="after">
<page string="Share Information" name="share_information"
attrs="{'invisible':[('is_share','=',False)]}"
groups="easy_my_coop.group_easy_my_coop_user">
<group>
<group name="Info" string="Info">
<field name="short_name"/>
<field name="default_share_product"/>
<field name="mail_template"/>
</group>
<group name="configuration" string="Configuration">
<field name="force_min_qty"/>
<field name="minimum_quantity"/>
<field name="customer"
attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="by_company"/>
<field name="by_individual"/>
</group>
</group>
</page>
</field>
</record>
<record id="share_product_filter" model="ir.ui.view">
<field name="name">product.template.share.filter</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<xpath expr="." position="inside">
<group expand="0" name="group_by" string="Group By">
<filter name="Creation Date" context="{'group_by': 'create_date'}"/>
</group>
</xpath>
</field>
</record>
</page>
</field>
</record>
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<field name="default_code" position="attributes">
<attribute name="attrs">{'required': [('is_share', '=', True)]}</attribute>
</field>
</field>
</record>
<record id="share_product_filter" model="ir.ui.view">
<field name="name">product.template.share.filter</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<xpath expr="." position="inside">
<group expand="0" name="group_by" string="Group By">
<filter name="Creation Date"
context="{'group_by': 'create_date'}"/>
</group>
</xpath>
</field>
</record>
<record id="share_product_action" model="ir.actions.act_window">
<field name="name">Share type</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<!-- <field name="context">{"search_default_filter_to_purchase":1}</field> -->
<field name="search_view_id" eval="False" /> <!-- Force empty -->
<field name="view_id" eval="False" /> <!-- Force empty -->
<field name="domain">[('is_share','=',True)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new share product.
</p>
</field>
</record>
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<field name="default_code" position="attributes">
<attribute name="attrs">{'required': [('is_share', '=',
True)]}
</attribute>
</field>
</field>
</record>
<record id="share_product_action" model="ir.actions.act_window">
<field name="name">Share type</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<!-- <field name="context">{"search_default_filter_to_purchase":1}</field> -->
<field name="search_view_id" eval="False"/> <!-- Force empty -->
<field name="view_id" eval="False"/> <!-- Force empty -->
<field name="domain">[('is_share','=',True)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new share product.
</p>
</field>
</record>
<!-- overriding product views to not display share product in the purchase and sale views-->
<record id="product.product_normal_action" model="ir.actions.act_window">
<field name="name">Product</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form,kanban</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="product.product_search_form_view"/>
<field name="view_id" eval="False"/> <!-- Force empty -->
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p><p>
You must define a product for everything you sell, whether it's
a physical product, a consumable or a service you offer to
customers.
</p><p>
The product form contains information to simplify the sale
process: price, notes in the quotation, accounting data,
procurement methods, etc.
</p>
</field>
</record>
<!-- overriding product views to not display share product in the purchase and sale views-->
<record id="product.product_template_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,form,kanban</field>
<field name="view_type">form</field>
<field name="view_id" ref="product.product_template_kanban_view"/>
<field name="context">{"search_default_filter_to_sell":1}</field>
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p><p>
You must define a product for everything you sell, whether it's a physical product, a consumable or a service you offer to customers.
</p><p>
The product form contains information to simplify the sale process: price, notes in the quotation, accounting data, procurement methods, etc.
</p>
</field>
</record>
<record id="product.product_normal_action" model="ir.actions.act_window">
<field name="name">Product</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form,kanban</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="product.product_search_form_view"/>
<field name="view_id" eval="False"/> <!-- Force empty -->
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p>
<p>
You must define a product for everything you sell, whether it's
a physical product, a consumable or a service you offer to
customers.
</p>
<p>
The product form contains information to simplify the sale
process: price, notes in the quotation, accounting data,
procurement methods, etc.
</p>
</field>
</record>
<!-- move this action to another module cause the original action has been
moved to purchase module. So we want to avoid make purchase module installed
<record id="product.product_normal_action_puchased" model="ir.actions.act_window">
<record id="product.product_template_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,form,kanban</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"search_default_filter_to_purchase":1}</field>
<field name="search_view_id" eval="False"/> Force empty
<field name="view_id" eval="False"/> Force empty
<field name="view_id" ref="product.product_template_kanban_view"/>
<field name="context">{"search_default_filter_to_sell":1}</field>
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p><p>
You must define a product for everything you purchase, whether
it's a physical product, a consumable or services you buy to
subcontractants.
</p><p>
The product form contains detailed information to improve the
purchase process: prices, procurement logistics, accounting data,
available vendors, etc.
</p>
<p class="oe_view_nocontent_create">
Click to define a new product.
</p>
<p>
You must define a product for everything you sell, whether it's
a physical product, a consumable or a service you offer to
customers.
</p>
<p>
The product form contains information to simplify the sale
process: price, notes in the quotation, accounting data,
procurement methods, etc.
</p>
</field>
</record> -->
</record>
<!-- move this action to another module cause the original action has been
moved to purchase module. So we want to avoid make purchase module installed
<record id="product.product_normal_action_puchased" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"search_default_filter_to_purchase":1}</field>
<field name="search_view_id" eval="False"/> Force empty
<field name="view_id" eval="False"/> Force empty
<field name="domain">[('is_share','=',False)]</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p><p>
You must define a product for everything you purchase, whether
it's a physical product, a consumable or services you buy to
subcontractants.
</p><p>
The product form contains detailed information to improve the
purchase process: prices, procurement logistics, accounting data,
available vendors, etc.
</p>
</field>
</record> -->
</odoo>

63
easy_my_coop/views/res_company_view.xml

@ -1,34 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record model="ir.ui.view" id="view_company_inherit_form2">
<field name="name">res.company.form.easymy.coop</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="model">res.company</field>
<field name="arch" type="xml">
<group name="social_media" position="before">
<group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_easy_my_coop_user">
<field name="unmix_share_type"/>
<field name="allow_id_card_upload"/>
<field name="create_user"/>
<field name="display_logo1"/>
<field name="bottom_logo1"/>
<field name="display_logo2"/>
<field name="bottom_logo2"/>
<field name="coop_email_contact"/>
<field name="subscription_maximum_amount"/>
<field name="property_cooperator_account"/>
<field name="default_country_id"/>
<field name="default_lang_id"/>
<field name="board_representative"/>
<field name="signature_scan"/>
<field name="display_data_policy_approval"/>
<field name="data_policy_approval_required"/>
<field name="data_policy_approval_text"/>
<field name="display_internal_rules_approval"/>
<field name="internal_rules_approval_required"/>
<field name="internal_rules_approval_text"/>
</group>
</group>
</field>
</record>
<record model="ir.ui.view" id="view_company_inherit_form2">
<field name="name">res.company.form.easymy.coop</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="model">res.company</field>
<field name="arch" type="xml">
<group name="social_media" position="before">
<group name="coop_grp" string="EasyMy Coop"
groups="easy_my_coop.group_easy_my_coop_user">
<field name="unmix_share_type"/>
<field name="allow_id_card_upload"/>
<field name="create_user"/>
<field name="display_logo1"/>
<field name="bottom_logo1"/>
<field name="display_logo2"/>
<field name="bottom_logo2"/>
<field name="coop_email_contact"/>
<field name="subscription_maximum_amount"/>
<field name="property_cooperator_account"/>
<field name="default_country_id"/>
<field name="default_lang_id"/>
<field name="board_representative"/>
<field name="signature_scan"/>
<field name="display_data_policy_approval"/>
<field name="data_policy_approval_required"/>
<field name="data_policy_approval_text"/>
<field name="display_internal_rules_approval"/>
<field name="internal_rules_approval_required"/>
<field name="internal_rules_approval_text"/>
</group>
</group>
</field>
</record>
</odoo>

396
easy_my_coop/views/res_partner_view.xml

@ -1,171 +1,225 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2019 Coop IT Easy
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<data>
<record id="view_partner_form_easy_my_coop" model="ir.ui.view">
<field name="name">res.partner.form.easy_my_coop</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<sheet position="before">
<header>
<button string="Create Subscription" name="%(action_view_create_subscription)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_user"/>
<button id="action_view_update_partner_info" string="Update info" name="%(action_view_update_partner_info)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_user"/>
</header>
</sheet>
<xpath expr="/form/sheet/group" position='before'>
<group>
<group>
<field name="representative" attrs="{'invisible':['|',('parent_id','=',False),('is_company','=',True)]}"/>
<field name="cooperator_register_number" readonly="True" attrs="{'invisible':[('member','=',False)]}"/>
<field name="company_register_number" readonly="True" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="coop_candidate" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="cooperator" invisible="True" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="member" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="cooperator_type" attrs="{'invisible':[('member','=',False)]}"/>
<field name="effective_date" attrs="{'invisible':[('member','=',False)]}"/>
</group>
<group>
<field name="gender" attrs="{'invisible':[('is_company','=',True)]}"/>
</group>
<group name="approvals">
<field name="internal_rules_approved" />
<field name="data_policy_approved" />
</group>
</group>
</xpath>
<page name='sales_purchases' position="after">
<page string="Shares" name="share" attrs="{'invisible':[('member','=',False)]}" groups="easy_my_coop.group_easy_my_coop_user">
<group>
<field name="number_of_share"/>
<field name="total_value"/>
</group>
<field name="share_ids">
<tree create="false">
<field name="effective_date"/>
<field name="share_short_name"/>
<field name="share_number" sum="Total of shares"/>
<field name="share_unit_price"/>
<field name="total_amount_line" sum="Total subscribed amount"/>
</tree>
</field>
</page>
<page string="Share subscriptions" name="share_subscription" attrs="{'invisible':[('cooperator','=',False)]}" groups="easy_my_coop.group_easy_my_coop_user">
<field name="subscription_request_ids">
<tree create="false" delete="false" edit="false">
<field name="share_short_name"/>
<field name="ordered_parts" sum="Total of shares"/>
<field name="share_unit_price"/>
<field name="subscription_amount" sum="Total subscribed amount"/>
<field name="type"/>
<field name="state"/>
</tree>
</field>
</page>
</page>
</field>
</record>
<record id="view_partner_tree_easy_my_coop" model="ir.ui.view">
<field name="name">res.partner.tree.easy_my_coop</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='display_name']" position='after'>
<field name="cooperator_register_number" />
<field name="cooperator_type"/>
<field name="effective_date"/>
</xpath>
</field>
</record>
<record id="view_res_partner_filter_coop" model="ir.ui.view">
<field name="name">res.partner.select</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<filter name="supplier" position='after'>
<filter string="Cooperators" name="cooperators" domain="[('member','=',1)]" help="Cooperator Partners"/>
<filter string="Old Cooperators" name="old_cooperators" domain="[('old_member','=',1)]" help="Cooperator Partners"/>
<filter string="Cooperator Candidates" name="cooperator_candidates" domain="[('coop_candidate','=',1)]" help="Cooperator Partners"/>
</filter>
<filter name="salesperson" position="before">
<filter string="Cooperator Type" name="group_by_cooperator_type" context="{'group_by': 'cooperator_type'}"/>
</filter>
</field>
</record>
<record id="action_partner_cooperator_form" model="ir.actions.act_window">
<field name="name">Cooperators</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">['|', ('cooperator','=',True), '|', ('member','=',True),('old_member','=', True)]</field>
<field name="context">{'default_cooperator':1, 'search_default_cooperators':1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a contact in your address book.
</p><p>
OpenERP helps you easily track all activities related to
a cooperator: discussions, history of business opportunities,
documents, etc.
</p>
</field>
</record>
<record id="action_partner_cooperator_candidate_form" model="ir.actions.act_window">
<field name="name">Cooperator candidates</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[('cooperator','=',True)]</field>
<field name="context">{'default_cooperator':1, 'search_default_cooperator_candidates':1}</field>
<field name="filter" eval="True"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a contact in your address book.
</p><p>
OpenERP helps you easily track all activities related to
a cooperator: discussions, history of business opportunities,
documents, etc.
</p>
</field>
</record>
<record id="action_company_representative_form" model="ir.actions.act_window">
<field name="name">Company representative</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[('cooperator','=',True),('representative','=',True)]</field>
<field name="filter" eval="True"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a contact in your address book.
</p><p>
OpenERP helps you easily track all activities related to
a cooperator: discussions, history of business opportunities,
documents, etc.
</p>
</field>
</record>
<record id="remove_partner_follower" model="ir.ui.view">
<field name="name">res.partner.remove.follower.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="mail.res_partner_view_form_inherit_mail"/>
<field name="arch" type="xml">
<field name="message_follower_ids" position="replace"/>
</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2019 Coop IT Easy
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<data>
<record id="view_partner_form_easy_my_coop" model="ir.ui.view">
<field name="name">res.partner.form.easy_my_coop</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<sheet position="before">
<header>
<button string="Create Subscription"
name="%(action_view_create_subscription)d"
type="action"
context="{'default_active_id': active_id}"
groups="easy_my_coop.group_easy_my_coop_user"/>
<button id="action_view_update_partner_info"
string="Update info"
name="%(action_view_update_partner_info)d"
type="action"
context="{'default_active_id': active_id}"
groups="easy_my_coop.group_easy_my_coop_user"/>
</header>
</sheet>
<xpath expr="/form/sheet/group" position='before'>
<group>
<group>
<field name="representative"
attrs="{'invisible':['|',('parent_id','=',False),('is_company','=',True)]}"/>
<field name="cooperator_register_number"
readonly="True"
attrs="{'invisible':[('member','=',False)]}"/>
<field name="company_register_number"
readonly="True"
attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="coop_candidate"
groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="cooperator" invisible="True"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="member"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="cooperator_type"
attrs="{'invisible':[('member','=',False)]}"/>
<field name="effective_date"
attrs="{'invisible':[('member','=',False)]}"/>
</group>
<group>
<field name="gender"
attrs="{'invisible':[('is_company','=',True)]}"/>
</group>
<group name="approvals">
<field name="internal_rules_approved"/>
<field name="data_policy_approved"/>
</group>
</group>
</xpath>
<page name='sales_purchases' position="after">
<page string="Shares" name="share"
attrs="{'invisible':[('member','=',False)]}"
groups="easy_my_coop.group_easy_my_coop_user">
<group>
<field name="number_of_share"/>
<field name="total_value"/>
</group>
<field name="share_ids">
<tree create="false">
<field name="effective_date"/>
<field name="share_short_name"/>
<field name="share_number"
sum="Total of shares"/>
<field name="share_unit_price"/>
<field name="total_amount_line"
sum="Total subscribed amount"/>
</tree>
</field>
</page>
<page string="Share subscriptions" name="share_subscription"
attrs="{'invisible':[('cooperator','=',False)]}"
groups="easy_my_coop.group_easy_my_coop_user">
<field name="subscription_request_ids">
<tree create="false" delete="false" edit="false">
<field name="share_short_name"/>
<field name="ordered_parts"
sum="Total of shares"/>
<field name="share_unit_price"/>
<field name="subscription_amount"
sum="Total subscribed amount"/>
<field name="type"/>
<field name="state"/>
</tree>
</field>
</page>
</page>
</field>
</record>
<record id="view_partner_tree_easy_my_coop" model="ir.ui.view">
<field name="name">res.partner.tree.easy_my_coop</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='display_name']"
position='after'>
<field name="cooperator_register_number"/>
<field name="cooperator_type"/>
<field name="effective_date"/>
</xpath>
</field>
</record>
<record id="view_res_partner_filter_coop" model="ir.ui.view">
<field name="name">res.partner.select</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<filter name="supplier" position='after'>
<filter string="Cooperators" name="cooperators"
domain="[('member','=',1)]"
help="Cooperator Partners"/>
<filter string="Old Cooperators" name="old_cooperators"
domain="[('old_member','=',1)]"
help="Cooperator Partners"/>
<filter string="Cooperator Candidates"
name="cooperator_candidates"
domain="[('coop_candidate','=',1)]"
help="Cooperator Partners"/>
</filter>
<filter name="salesperson" position="before">
<filter string="Cooperator Type"
name="group_by_cooperator_type"
context="{'group_by': 'cooperator_type'}"/>
</filter>
</field>
</record>
<record id="action_partner_cooperator_form"
model="ir.actions.act_window">
<field name="name">Cooperators</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">['|', ('cooperator','=',True), '|',
('member','=',True),('old_member','=', True)]
</field>
<field name="context">{'default_cooperator':1,
'search_default_cooperators':1}
</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a contact in your address book.
</p>
<p>
OpenERP helps you easily track all activities related to
a cooperator: discussions, history of business
opportunities,
documents, etc.
</p>
</field>
</record>
<record id="action_partner_cooperator_candidate_form"
model="ir.actions.act_window">
<field name="name">Cooperator candidates</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[('cooperator','=',True)]</field>
<field name="context">{'default_cooperator':1,
'search_default_cooperator_candidates':1}
</field>
<field name="filter" eval="True"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a contact in your address book.
</p>
<p>
OpenERP helps you easily track all activities related to
a cooperator: discussions, history of business
opportunities,
documents, etc.
</p>
</field>
</record>
<record id="action_company_representative_form"
model="ir.actions.act_window">
<field name="name">Company representative</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">
[('cooperator','=',True),('representative','=',True)]
</field>
<field name="filter" eval="True"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a contact in your address book.
</p>
<p>
OpenERP helps you easily track all activities related to
a cooperator: discussions, history of business
opportunities,
documents, etc.
</p>
</field>
</record>
<record id="remove_partner_follower" model="ir.ui.view">
<field name="name">res.partner.remove.follower.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id"
ref="mail.res_partner_view_form_inherit_mail"/>
<field name="arch" type="xml">
<field name="message_follower_ids" position="replace"/>
</field>
</record>
</data>
</odoo>

301
easy_my_coop/views/subscription_request_view.xml

@ -1,28 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="subscription_request_tree" model="ir.ui.view">
<record id="subscription_request_tree" model="ir.ui.view">
<field name="name">subscription.request.tree</field>
<field name="model">subscription.request</field>
<field name="arch" type="xml">
<!-- fixme no colors in v12 ? -->
<tree string="Subscription Requests" colors="red:validated == False; blue:state in ('draft'); grey: state in ('done')">
<!-- fixme no colors in v12 ? -->
<tree string="Subscription Requests"
colors="red:validated == False; blue:state in ('draft'); grey: state in ('done')">
<field name="name"/>
<field name="company_name"/>
<field name="date" string="Request Date"/>
<field name="type"/>
<field name="share_short_name" string="Share Type"/>
<field name="ordered_parts" string="Quantity" sum="Total ordered parts"/>
<field name="subscription_amount" sum="Total amount"/>
<field name="email"/>
<field name="iban"/>
<field name="partner_id"/>
<field name="source"/>
<field name="state"/>
<field name="validated" invisible="True"/>
<button type="object" string="Validate" aria-label="Validate" name="validate_subscription_request" attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/>
<button type="object" string="Block" aria-label="Block" name="block_subscription_request" states="draft" groups="easy_my_coop.group_easy_my_coop_user"/>
<button type="object" string="Unblock" aria-label="Unblock" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="type"/>
<field name="share_short_name" string="Share Type"/>
<field name="ordered_parts" string="Quantity"
sum="Total ordered parts"/>
<field name="subscription_amount" sum="Total amount"/>
<field name="email"/>
<field name="iban"/>
<field name="partner_id"/>
<field name="source"/>
<field name="state"/>
<field name="validated" invisible="True"/>
<button type="object" string="Validate" aria-label="Validate"
name="validate_subscription_request"
attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/>
<button type="object" string="Block" aria-label="Block"
name="block_subscription_request" states="draft"
groups="easy_my_coop.group_easy_my_coop_user"/>
<button type="object" string="Unblock" aria-label="Unblock"
name="unblock_subscription_request" states="block"
groups="easy_my_coop.group_easy_my_coop_user"/>
</tree>
</field>
</record>
@ -31,73 +39,91 @@
<field name="name">subscription.request.form</field>
<field name="model">subscription.request</field>
<field name="arch" type="xml">
<form string="Subscription Requests">
<header>
<button string="Validate" type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/>
<button string="Waiting list" type="object" name="put_on_waiting_list" states="draft"/>
<button string="Cancel" type="object" name="cancel_subscription_request" states="draft,waiting,done,block" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,cancelled,done,failed"/>
</header>
<sheet>
<group>
<group>
<field name="validated" invisible="True"/>
<field name="already_cooperator"/>
<field name="is_company" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="is_operation" invisible="True"/>
<field name="company_name" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="company_email" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="company_type" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="company_register_number" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="name"/>
<field name="firstname"/>
<field name="lastname"/>
<field name="birthdate"/>
<field name="gender"/>
<field name="email"/>
<field name="phone"/>
<field name="contact_person_function" attrs="{'invisible':[('is_company','=',False)]}"/>
<!-- todo highlight iban if not valid -->
<field name="iban"/>
<field name="address"/>
<field name="zip_code"/>
<field name="city"/>
<field name="country_id" options="{'no_create':True}"/>
</group>
<group>
<field name="capital_release_request_date" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="date"/>
<field name="source"/>
<field name="ordered_parts"/>
<field name="share_product_id" widget="selection"/>
<field name="share_short_name"/>
<field name="share_unit_price"/>
<field name="subscription_amount"/>
<field name="partner_id" options="{'no_create':True}"/>
<field name="type"/>
<field name="lang"/>
<field name="skip_control_ng"/>
<field name="data_policy_approved"/>
</group>
</group>
<notebook>
<page name="capital_release_request" string="Capital release request">
<field name="capital_release_request">
<tree options="{'no_create':True}">
<field string="Cooperator" name="partner_id"/>
<field name="date_invoice"/>
<field name="number"/>
<field string="Reference" name="reference"/>
<field name="date_due"/>
<field name="amount_total_signed"/>
<field name="residual_signed"/>
<field name="state"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
<form string="Subscription Requests">
<header>
<button string="Validate" type="object"
name="validate_subscription_request"
attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/>
<button string="Waiting list" type="object"
name="put_on_waiting_list" states="draft"/>
<button string="Cancel" type="object"
name="cancel_subscription_request"
states="draft,waiting,done,block"
groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,cancelled,done,failed"/>
</header>
<sheet>
<group>
<group>
<field name="validated" invisible="True"/>
<field name="already_cooperator"/>
<field name="is_company"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="is_operation" invisible="True"/>
<field name="company_name"
attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="company_email"
attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="company_type"
attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="company_register_number"
attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="name"/>
<field name="firstname"/>
<field name="lastname"/>
<field name="birthdate"/>
<field name="gender"/>
<field name="email"/>
<field name="phone"/>
<field name="contact_person_function"
attrs="{'invisible':[('is_company','=',False)]}"/>
<!-- todo highlight iban if not valid -->
<field name="iban"/>
<field name="address"/>
<field name="zip_code"/>
<field name="city"/>
<field name="country_id"
options="{'no_create':True}"/>
</group>
<group>
<field name="capital_release_request_date"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="date"/>
<field name="source"/>
<field name="ordered_parts"/>
<field name="share_product_id" widget="selection"/>
<field name="share_short_name"/>
<field name="share_unit_price"/>
<field name="subscription_amount"/>
<field name="partner_id"
options="{'no_create':True}"/>
<field name="type"/>
<field name="lang"/>
<field name="skip_control_ng"/>
<field name="data_policy_approved"/>
</group>
</group>
<notebook>
<page name="capital_release_request"
string="Capital release request">
<field name="capital_release_request">
<tree options="{'no_create':True}">
<field string="Cooperator"
name="partner_id"/>
<field name="date_invoice"/>
<field name="number"/>
<field string="Reference" name="reference"/>
<field name="date_due"/>
<field name="amount_total_signed"/>
<field name="residual_signed"/>
<field name="state"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@ -106,19 +132,25 @@
<field name="model">subscription.request</field>
<field name="arch" type="xml">
<search string="Search Subscription Request">
<field name="name"/>
<field name="partner_id"/>
<separator/>
<filter string="Draft" name="state_draft" domain="[('state','=','draft')]"/>
<filter string="Paid" name="state_paid" domain="[('state','=','paid')]"/>
<filter string="Done" name="state_done" domain="[('state','=','done')]"/>
<separator/>
<filter string="Not Validated" name="Not Validated" domain="[('validated', '=', False)]"/>
<group expand="0" name="group_by" string="Group By">
<filter name="request_type" string="Request type" context="{'group_by' : 'type'}" />
<filter name="date" string="Request Date" context="{'group_by': 'date'}"/>
</group>
</search>
<field name="name"/>
<field name="partner_id"/>
<separator/>
<filter string="Draft" name="state_draft"
domain="[('state','=','draft')]"/>
<filter string="Paid" name="state_paid"
domain="[('state','=','paid')]"/>
<filter string="Done" name="state_done"
domain="[('state','=','done')]"/>
<separator/>
<filter string="Not Validated" name="Not Validated"
domain="[('validated', '=', False)]"/>
<group expand="0" name="group_by" string="Group By">
<filter name="request_type" string="Request type"
context="{'group_by' : 'type'}"/>
<filter name="date" string="Request Date"
context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
@ -136,31 +168,34 @@
<field name="name">share.line.form</field>
<field name="model">share.line</field>
<field name="arch" type="xml">
<form string="Share line">
<header>
<button string="Update info" name="%(action_view_update_share_line_info)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
</header>
<sheet>
<group>
<group>
<field name="partner_id"/>
<field name="share_product_id"/>
<field name="share_number"/>
</group>
<group>
<field name="share_short_name"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="total_amount_line"/>
</group>
</group>
</sheet>
</form>
</field>
<form string="Share line">
<header>
<button string="Update info"
name="%(action_view_update_share_line_info)d"
type="action"
context="{'default_active_id': active_id}"
groups="easy_my_coop.group_easy_my_coop_manager"/>
</header>
<sheet>
<group>
<group>
<field name="partner_id"/>
<field name="share_product_id"/>
<field name="share_number"/>
</group>
<group>
<field name="share_short_name"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="total_amount_line"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="share_line_tree" model="ir.ui.view">
<record id="share_line_tree" model="ir.ui.view">
<field name="name">share.line.tree</field>
<field name="model">share.line</field>
<field name="arch" type="xml">
@ -168,10 +203,10 @@
<field name="partner_id"/>
<field name="share_product_id"/>
<field name="share_number"/>
<field name="share_short_name"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="total_amount_line"/>
<field name="share_short_name"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="total_amount_line"/>
</tree>
</field>
</record>
@ -181,18 +216,20 @@
<field name="model">share.line</field>
<field name="arch" type="xml">
<search string="Search Share Line">
<field name="partner_id"/>
<field name="effective_date"/>
<separator/>
<group name="group_by" string="Group By">
<filter name="cooperator" string="Cooperator" context="{'group_by' : 'partner_id'}" />
<filter name="effective_date" string="Effective date" context="{'group_by': 'effective_date'}"/>
</group>
</search>
<field name="partner_id"/>
<field name="effective_date"/>
<separator/>
<group name="group_by" string="Group By">
<filter name="cooperator" string="Cooperator"
context="{'group_by' : 'partner_id'}"/>
<filter name="effective_date" string="Effective date"
context="{'group_by': 'effective_date'}"/>
</group>
</search>
</field>
</record>
<record id="share_line_action" model="ir.actions.act_window">
<record id="share_line_action" model="ir.actions.act_window">
<field name="name">Share Lines</field>
<field name="res_model">share.line</field>
<field name="view_type">form</field>

43
easy_my_coop/wizard/cooperative_history_wizard.xml

@ -5,26 +5,29 @@
<field name="name">cooperative.history.wizard.form</field>
<field name="model">cooperative.history.report</field>
<field name="arch" type="xml">
<form string="Reporting" version="7.0">
<separator string="Cooperative History"/>
<group>
<field name="report"/>
</group>
<label string="This report allows you to print a pdf of history and number of share for each cooperator"/>
<group>
<field name="display_cooperator"/>
</group>
<form string="Reporting" version="7.0">
<separator string="Cooperative History"/>
<group>
<field name="report"/>
</group>
<label string="This report allows you to print a pdf of history and number of share for each cooperator"/>
<group>
<field name="display_cooperator"/>
</group>
<footer>
<button name="check_report" string="Print" type="object" default_focus="1" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
<footer>
<button name="check_report" string="Print" type="object"
default_focus="1" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link"
special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_cooperative_history_wizard" model="ir.actions.act_window">
<record id="action_cooperative_history_wizard"
model="ir.actions.act_window">
<field name="name">Cooperative history</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">cooperative.history.report</field>
@ -35,7 +38,11 @@
<field name="multi">True</field>
</record>
<menuitem id="menu_easy_my_coop_reporting" name="Reporting" parent="menu_main_easy_my_coop" sequence="20"/>
<menuitem id="menu_coop_history_wizard_report" name="Cooperative history report" parent="menu_easy_my_coop_reporting" action="action_cooperative_history_wizard" sequence="10"/>
<menuitem id="menu_easy_my_coop_reporting" name="Reporting"
parent="menu_main_easy_my_coop" sequence="20"/>
<menuitem id="menu_coop_history_wizard_report"
name="Cooperative history report"
parent="menu_easy_my_coop_reporting"
action="action_cooperative_history_wizard" sequence="10"/>
</data>
</openerp>

41
easy_my_coop/wizard/create_subscription_from_partner.xml

@ -7,37 +7,46 @@
<field name="arch" type="xml">
<form string="Create Subscription">
<p class="oe_grey">
Subscription request will be created with data from the partner.
Subscription request will be created with data from the
partner.
</p>
<group>
<field name="is_company" invisible="True"/>
<field name="cooperator" invisible="True"/>
<field name="representative_name" attrs="{'invisible':[('is_company','=',False)],'required':[('is_company','=',True)]}"/>
<field name="representative_email" attrs="{'invisible':[('is_company','=',False)],'required':[('is_company','=',True)]}"/>
<field name="email"/>
<field name="register_number" attrs="{'invisible':[('is_company','=',False)],'required':[('is_company','=',True)]}"/>
<field name="bank_account"/>
<field name="share_product" widget="selection"/>
<field name="share_qty"/>
<field name="share_unit_price"/>
<field name="subscription_amount"/>
<field name="is_company" invisible="True"/>
<field name="cooperator" invisible="True"/>
<field name="representative_name"
attrs="{'invisible':[('is_company','=',False)],'required':[('is_company','=',True)]}"/>
<field name="representative_email"
attrs="{'invisible':[('is_company','=',False)],'required':[('is_company','=',True)]}"/>
<field name="email"/>
<field name="register_number"
attrs="{'invisible':[('is_company','=',False)],'required':[('is_company','=',True)]}"/>
<field name="bank_account"/>
<field name="share_product" widget="selection"/>
<field name="share_qty"/>
<field name="share_unit_price"/>
<field name="subscription_amount"/>
</group>
<footer>
<button name="create_subscription" string="Create Subscription" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-default" special="cancel"/>
<button name="create_subscription"
string="Create Subscription" type="object"
class="btn-primary"/>
<button string="Cancel" class="btn-default"
special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_view_create_subscription" model="ir.actions.act_window">
<record id="action_view_create_subscription"
model="ir.actions.act_window">
<field name="name">Create Subscription</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">partner.create.subscription</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_user'))]"/>
<field name="groups_id"
eval="[(4,ref('easy_my_coop.group_easy_my_coop_user'))]"/>
</record>
</data>

27
easy_my_coop/wizard/update_partner_info.xml

@ -10,30 +10,35 @@
Update Cooperator Info.
</p>
<group>
<field name="is_company" invisible="True"/>
<field name="all"/>
<field name="birthdate"/>
<field name="legal_form"/>
<field name="representative_function"/>
<field name="cooperator" readonly="True"/>
<field name="register_number" attrs="{'required':['|', ('is_company', '=', True), ('all', '=', False)], 'invisible':[('is_company', '=', False)]}"/>
<field name="is_company" invisible="True"/>
<field name="all"/>
<field name="birthdate"/>
<field name="legal_form"/>
<field name="representative_function"/>
<field name="cooperator" readonly="True"/>
<field name="register_number"
attrs="{'required':['|', ('is_company', '=', True), ('all', '=', False)], 'invisible':[('is_company', '=', False)]}"/>
</group>
<footer>
<button name="update" string="Update Info" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-default" special="cancel"/>
<button name="update" string="Update Info" type="object"
class="btn-primary"/>
<button string="Cancel" class="btn-default"
special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_view_update_partner_info" model="ir.actions.act_window">
<record id="action_view_update_partner_info"
model="ir.actions.act_window">
<field name="name">Update Cooperator Info</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">partner.update.info</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_user'))]"/>
<field name="groups_id"
eval="[(4,ref('easy_my_coop.group_easy_my_coop_user'))]"/>
</record>
</data>

18
easy_my_coop/wizard/update_share_line.xml

@ -10,26 +10,30 @@
Update Share Line Info.
</p>
<group>
<field name="cooperator" readonly="True"/>
<field name="share_line" readonly="True"/>
<field name="effective_date"/>
<field name="cooperator" readonly="True"/>
<field name="share_line" readonly="True"/>
<field name="effective_date"/>
</group>
<footer>
<button name="update" string="Update Info" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-default" special="cancel"/>
<button name="update" string="Update Info" type="object"
class="btn-primary"/>
<button string="Cancel" class="btn-default"
special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_view_update_share_line_info" model="ir.actions.act_window">
<record id="action_view_update_share_line_info"
model="ir.actions.act_window">
<field name="name">Update Share Line Info</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">share.line.update.info</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_manager'))]"/>
<field name="groups_id"
eval="[(4,ref('easy_my_coop.group_easy_my_coop_manager'))]"/>
</record>
</data>

17
easy_my_coop/wizard/validate_subscription_request.xml

@ -9,17 +9,20 @@
Validate the subscription request.
</p>
<footer>
<button name="validate" string="Validate" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-default" special="cancel"/>
<button name="validate" string="Validate" type="object"
class="btn-primary"/>
<button string="Cancel" class="btn-default"
special="cancel"/>
</footer>
</form>
</field>
</record>
<act_window id="action_account_invoice_confirm"
multi="True"
key2="client_action_multi" name="Validate subscription request"
res_model="validate.subscription.request" src_model="subscription.request"
view_mode="form" target="new" view_type="form" />
<act_window id="action_account_invoice_confirm"
multi="True"
key2="client_action_multi" name="Validate subscription request"
res_model="validate.subscription.request"
src_model="subscription.request"
view_mode="form" target="new" view_type="form"/>
</odoo>

56
easy_my_coop_ch/views/subscription_template.xml

@ -1,26 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="subscription_i18n_ch" inherit_id="easy_my_coop_website.becomecooperator" name="Removing fields">
<xpath expr="//label[@for='iban']/.." position="replace">
<div t-attf-class="form-group #{error and 'iban' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" for="iban">Bank Account Number</label>
<div class="col-md-7 col-sm-8">
<input type="text" class="form-control mandatory-field" name="iban" t-attf-value="#{iban or ''}" placeholder="BE48523080767127"/>
</div>
</div>
</xpath>
</template>
<data>
<template id="subscription_i18n_ch"
inherit_id="easy_my_coop_website.becomecooperator"
name="Removing fields">
<xpath expr="//label[@for='iban']/.." position="replace">
<div t-attf-class="form-group #{error and 'iban' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" for="iban">
Bank Account Number
</label>
<div class="col-md-7 col-sm-8">
<input type="text" class="form-control mandatory-field"
name="iban" t-attf-value="#{iban or ''}"
placeholder="BE48523080767127"/>
</div>
</div>
</xpath>
</template>
<template id="company_subscription_i18n_ch" inherit_id="easy_my_coop_website.becomecompanycooperator" name="Company Removing fields">
<xpath expr="//label[@for='iban']/.." position="replace">
<div t-attf-class="form-group #{error and 'iban' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" for="iban">Bank Account Number</label>
<div class="col-md-7 col-sm-8">
<input type="text" class="form-control mandatory-field" name="iban" t-attf-value="#{iban or ''}" placeholder="BE48523080767127"/>
</div>
</div>
</xpath>
</template>
</data>
<template id="company_subscription_i18n_ch"
inherit_id="easy_my_coop_website.becomecompanycooperator"
name="Company Removing fields">
<xpath expr="//label[@for='iban']/.." position="replace">
<div t-attf-class="form-group #{error and 'iban' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" for="iban">
Bank Account Number
</label>
<div class="col-md-7 col-sm-8">
<input type="text" class="form-control mandatory-field"
name="iban" t-attf-value="#{iban or ''}"
placeholder="BE48523080767127"/>
</div>
</div>
</xpath>
</template>
</data>
</odoo>

179
easy_my_coop_dividend/views/dividend_views.xml

@ -1,58 +1,67 @@
<odoo>
<data>
<menuitem name="Dividend" id="menu_easy_my_coop_main_dividend" parent="easy_my_coop.menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="30" />
<data>
<menuitem name="Dividend" id="menu_easy_my_coop_main_dividend"
parent="easy_my_coop.menu_main_easy_my_coop"
groups="easy_my_coop.group_easy_my_coop_user" sequence="30"/>
<record id="dividend_year_form" model="ir.ui.view">
<record id="dividend_year_form" model="ir.ui.view">
<field name="name">dividend.year.form</field>
<field name="model">dividend.year</field>
<field name="arch" type="xml">
<form string="Dividend year">
<header>
<button name="compute_dividend" string="Compute dividend" type="object" class="oe_highlight" groups="base.group_user"/>
<button name="compute_dividend"
string="Compute dividend" type="object"
class="oe_highlight" groups="base.group_user"/>
</header>
<sheet>
<group>
<group>
<field name="name"/>
<field name="percentage"/>
<field name="grand_total_dividend"/>
<field name="grand_total_taxes"/>
</group>
<group>
<field name="date_from"/>
<field name="date_to"/>
<field name="withholding_tax"/>
</group>
</group>
<notebook>
<page string="Dividend line">
<field name="dividend_ids">
<tree>
<field name="coop_number"/>
<field name="partner_id"/>
<field name="dividend_amount" sum="Total dividend"/>
<field name="dividend_amount_net" sum="Total dividend net"/>
<field name="dividend_taxes" sum="Total dividend taxes"/>
</tree>
</field>
</page>
<page string="Detailed dividend line">
<field name="detailed_dividend_ids">
<tree>
<field name="coop_number"/>
<field name="partner_id"/>
<field name="share_number"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="days"/>
<field name="total_amount_line"/>
<field name="coeff"/>
<field name="dividend_amount" string="Dividend" sum="Total dividend"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<group>
<group>
<field name="name"/>
<field name="percentage"/>
<field name="grand_total_dividend"/>
<field name="grand_total_taxes"/>
</group>
<group>
<field name="date_from"/>
<field name="date_to"/>
<field name="withholding_tax"/>
</group>
</group>
<notebook>
<page string="Dividend line">
<field name="dividend_ids">
<tree>
<field name="coop_number"/>
<field name="partner_id"/>
<field name="dividend_amount"
sum="Total dividend"/>
<field name="dividend_amount_net"
sum="Total dividend net"/>
<field name="dividend_taxes"
sum="Total dividend taxes"/>
</tree>
</field>
</page>
<page string="Detailed dividend line">
<field name="detailed_dividend_ids">
<tree>
<field name="coop_number"/>
<field name="partner_id"/>
<field name="share_number"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="days"/>
<field name="total_amount_line"/>
<field name="coeff"/>
<field name="dividend_amount"
string="Dividend"
sum="Total dividend"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@ -62,7 +71,7 @@
<field name="model">dividend.year</field>
<field name="arch" type="xml">
<tree string="Dividend year">
<field name="name"/>
<field name="name"/>
<field name="percentage"/>
</tree>
</field>
@ -75,9 +84,11 @@
<field name="view_id" ref="dividend_year_tree"/>
</record>
<menuitem action="dividend_year_action" name="Dividend" id="menu_dividend_year" parent="menu_easy_my_coop_main_dividend" sequence="10"/>
<menuitem action="dividend_year_action" name="Dividend"
id="menu_dividend_year"
parent="menu_easy_my_coop_main_dividend" sequence="10"/>
<record id="view_detailed_dividend_line_filter" model="ir.ui.view">
<record id="view_detailed_dividend_line_filter" model="ir.ui.view">
<field name="name">detailed.dividend.line.select</field>
<field name="model">detailed.dividend.line</field>
<field name="arch" type="xml">
@ -86,40 +97,46 @@
<field name="coop_number"/>
<filter name="dividend_year_id" string="Dividend Year"/>
<separator/>
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Dividend Year" domain="[]" context="{'group_by':'dividend_year_id'}"/>
</search>
<filter string="Partner" domain="[]"
context="{'group_by':'partner_id'}"/>
<filter string="Dividend Year" domain="[]"
context="{'group_by':'dividend_year_id'}"/>
</search>
</field>
</record>
<record id="detailed_dividend_line_tree" model="ir.ui.view">
<record id="detailed_dividend_line_tree" model="ir.ui.view">
<field name="name">detailed.dividend.line.tree</field>
<field name="model">detailed.dividend.line</field>
<field name="arch" type="xml">
<tree string="Detailed dividend lines">
<field name="dividend_year_id"/>
<field name="coop_number"/>
<field name="partner_id"/>
<field name="share_number"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="days"/>
<field name="total_amount_line"/>
<field name="coeff"/>
<field name="dividend_amount" string="Dividend" sum="Total dividend"/>
<field name="dividend_year_id"/>
<field name="coop_number"/>
<field name="partner_id"/>
<field name="share_number"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="days"/>
<field name="total_amount_line"/>
<field name="coeff"/>
<field name="dividend_amount" string="Dividend"
sum="Total dividend"/>
</tree>
</field>
</record>
<record id="detailed_dividend_line_action" model="ir.actions.act_window">
<record id="detailed_dividend_line_action"
model="ir.actions.act_window">
<field name="name">Detailed dividend lines</field>
<field name="res_model">detailed.dividend.line</field>
<field name="view_type">form</field>
<field name="view_id" ref="detailed_dividend_line_tree"/>
</record>
<menuitem action="detailed_dividend_line_action" name="Detailed dividend lines" id="menu_det_dividend_line" parent="menu_easy_my_coop_main_dividend" sequence="20"/>
<menuitem action="detailed_dividend_line_action"
name="Detailed dividend lines" id="menu_det_dividend_line"
parent="menu_easy_my_coop_main_dividend" sequence="20"/>
<record id="view_dividend_line_filter" model="ir.ui.view">
<record id="view_dividend_line_filter" model="ir.ui.view">
<field name="name">dividend.line.select</field>
<field name="model">dividend.line</field>
<field name="arch" type="xml">
@ -129,25 +146,27 @@
<filter name="dividend_year_id" string="Dividend Year"/>
<separator/>
<group expand="0" string="Group By...">
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Dividend Year" domain="[]" context="{'group_by':'dividend_year_id'}"/>
<filter string="Partner" domain="[]"
context="{'group_by':'partner_id'}"/>
<filter string="Dividend Year" domain="[]"
context="{'group_by':'dividend_year_id'}"/>
</group>
</search>
</search>
</field>
</record>
<record id="dividend_line_tree" model="ir.ui.view">
<record id="dividend_line_tree" model="ir.ui.view">
<field name="name">dividend.line.tree</field>
<field name="model">dividend.line</field>
<field name="arch" type="xml">
<tree string="dividend lines">
<field name="dividend_year_id"/>
<field name="coop_number"/>
<field name="partner_id"/>
<field name="account_number"/>
<field name="dividend_amount" sum="Total dividend"/>
<field name="dividend_amount_net" sum="Total dividend net"/>
<field name="dividend_taxes" sum="Total dividend taxes"/>
<field name="dividend_year_id"/>
<field name="coop_number"/>
<field name="partner_id"/>
<field name="account_number"/>
<field name="dividend_amount" sum="Total dividend"/>
<field name="dividend_amount_net" sum="Total dividend net"/>
<field name="dividend_taxes" sum="Total dividend taxes"/>
</tree>
</field>
</record>
@ -159,6 +178,8 @@
<field name="view_id" ref="dividend_line_tree"/>
</record>
<menuitem action="dividend_line_action" name="Dividend lines" id="menu_dividend_line" parent="menu_easy_my_coop_main_dividend" sequence="30"/>
</data>
<menuitem action="dividend_line_action" name="Dividend lines"
id="menu_dividend_line"
parent="menu_easy_my_coop_main_dividend" sequence="30"/>
</data>
</odoo>

8
easy_my_coop_eater/view/product_view.xml

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="product_template_form_view_eater" model="ir.ui.view">
<record id="product_template_form_view_eater" model="ir.ui.view">
<field name="name">product.template.share.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="easy_my_coop.product_template_share_form_view"/>
<field name="inherit_id"
ref="easy_my_coop.product_template_share_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='minimum_quantity']" position="after">
<field name="eater" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="eater"
attrs="{'invisible':[('is_share','=',False)]}"/>
</xpath>
</field>
</record>

27
easy_my_coop_export_xlsx/wizard/export_global_wizard.xml

@ -6,18 +6,22 @@
<field name="name">export.global.report.wizard.form</field>
<field name="model">export.global.report</field>
<field name="arch" type="xml">
<form string="Reporting" version="7.0">
<separator string="Global report export"/>
<footer>
<button name="export_global_report_xlsx" string="Export" type="object" default_focus="1" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
<form string="Reporting" version="7.0">
<separator string="Global report export"/>
<footer>
<button name="export_global_report_xlsx" string="Export"
type="object" default_focus="1"
class="oe_highlight"/>
or
<button string="Cancel" class="oe_link"
special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_export_global_report_wizard" model="ir.actions.act_window">
<record id="action_export_global_report_wizard"
model="ir.actions.act_window">
<field name="name">Export gloabal report</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">export.global.report</field>
@ -28,6 +32,9 @@
<field name="multi">True</field>
</record>
<menuitem id="menu_export_global_report_wizard" name="Global report export" parent="easy_my_coop.menu_easy_my_coop_main_reporting" action="action_export_global_report_wizard" sequence="10"/>
<menuitem id="menu_export_global_report_wizard"
name="Global report export"
parent="easy_my_coop.menu_easy_my_coop_main_reporting"
action="action_export_global_report_wizard" sequence="10"/>
</data>
</openerp>

154
easy_my_coop_fr/views/certificate_template.xml

@ -1,49 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="certificate_i18n_fr" inherit_id="easy_my_coop.cooperator_certificat_G001_document" name="French Layout Certificate">
<xpath expr="//p[@name='label_coop_number']" position="replace">
<p name="label_coop_number" class="mt16">
<span>Ce document atteste de la souscription de parts sociales au capital de la SAS Coopérative à Capital Variable SuperQuinquin par </span>
<b><span t-field="o.name"></span></b>
<span>, enregistré(e) sous le <b>numéro de coopérateur </b></span>
<span t-field="o.cooperator_register_number"></span>
</p>
</xpath>
<data>
<template id="certificate_i18n_fr"
inherit_id="easy_my_coop.cooperator_certificat_G001_document"
name="French Layout Certificate">
<xpath expr="//p[@name='label_coop_number']" position="replace">
<p name="label_coop_number" class="mt16">
<span>Ce document atteste de la souscription de parts
sociales au capital de la SAS Coopérative à Capital
Variable SuperQuinquin par
</span>
<b>
<span t-field="o.name"></span>
</b>
<span>, enregistré(e) sous le
<b>numéro de coopérateur</b>
</span>
<span t-field="o.cooperator_register_number"></span>
</p>
</xpath>
<xpath expr="//div[@name='total_table']" position="after">
<div name="legal_text" style="position:relative;top:145px;font-size:12;">
<div>Ce document atteste d’une souscription en numéraire au capital d’une société, répondant à la définition communautaire de la Petite et Moyenne Entreprise, dont les titres ne sont pas admis aux négociations sur un marché d’instruments financiers français ou étranger en application de l’article 199 terdecies 0A du CGI.<br/>
Conformément aux statuts, les souscriptions de parts sociales de type A et B n’ouvre pas droit à rémunération.<br/>
La société remplit les conditions mentionnées aux c, d et e du 2° du I de l’article 199 terdecies-0 A du code général des impôts : <br/>
c) La société est soumise à l’impôt sur les sociétés dans les conditions de droit commun ;<br/>
<br/>
c bis) La société compte au moins deux salariés à la clôture de son premier exercice ou un salarié si elle est soumise à l’obligation de s’inscrire à la chambre de métiers et de l’artisanat ;<br/>
<br/>
d) La société exerce une activité commerciale, industrielle, artisanale, libérale ou agricole, à l’exclusion des activités procurant des revenus garantis en raison de l’existence d’un tarif réglementé de rachat de la production, des activités financières, des activités de gestion de patrimoine mobilier définie à l’article 885 O quater et des activités immobilières. Toutefois, les exclusions relatives à l’exercice d’une activité financière ou immobilière ne sont pas applicables aux entreprises solidaires mentionnées à l’article L. 3332-17-1 du code du travail.<br/>
La société n’exerce pas une activité de production d’électricité utilisant l’énergie radiative du soleil ;<br/>
<br/>
d bis) Les actifs de la société ne sont pas constitués de façon prépondérante de métaux précieux, d’œuvres d’art, d’objets de collection, d’antiquités, de chevaux de course ou de concours ou, sauf si l’objet même de son activité consiste en leur consommation ou en leur vente au détail, de vins ou d’alcools ;<br/>
<br/>
d ter) Les souscriptions au capital de la société confèrent aux souscripteurs les seuls droits résultant de la qualité d’actionnaire ou d’associé, à l’exclusion de toute autre contrepartie notamment sous la forme de tarifs préférentiels ou d’accès prioritaire aux biens produits ou aux services rendus par la société ;<br/>
<br/>
e) La société doit être une petite et moyenne entreprise qui satisfait à la définition des petites et moyennes entreprises qui figure à l’annexe I au règlement (CE) n° 800/2008 de la Commission du 6 août 2008 déclarant certaines catégories d’aide compatibles avec le marché commun en application des articles 87 et 88 du traité (Règlement général d’exemption par catégorie) ;<br/>
</div>
</div>
</xpath>
<xpath expr="//div[@name='board_commitee']" position="replace">
<div name="" class="col-xs-6 pull-left" style="position:relative;top:105px;font-size:20;color:black;font-family:Roboto-Regular;">
<div style="position:relative;top:105px;">
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>.
</div>
<div style="position:relative;top:110px;">
<strong><span t-field="o.company_id.board_representative"/></strong>
</div>
<div style="position:relative;top:115px;">
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan" style="width:240px;height:180px;padding-bottom:5px;"/>
</div>
<xpath expr="//div[@name='total_table']" position="after">
<div name="legal_text"
style="position:relative;top:145px;font-size:12;">
<div>Ce document atteste d’une souscription en numéraire au
capital d’une société, répondant à la définition
communautaire de la Petite et Moyenne Entreprise, dont
les titres ne sont pas admis aux négociations sur un
marché d’instruments financiers français ou étranger en
application de l’article 199 terdecies 0A du CGI.
<br/>
Conformément aux statuts, les souscriptions de parts
sociales de type A et B n’ouvre pas droit à
rémunération.
<br/>
La société remplit les conditions mentionnées aux c, d
et e du 2° du I de l’article 199 terdecies-0 A du code
général des impôts :
<br/>
c) La société est soumise à l’impôt sur les sociétés
dans les conditions de droit commun ;
<br/>
<br/>
c bis) La société compte au moins deux salariés à la
clôture de son premier exercice ou un salarié si elle
est soumise à l’obligation de s’inscrire à la chambre de
métiers et de l’artisanat ;
<br/>
<br/>
d) La société exerce une activité commerciale,
industrielle, artisanale, libérale ou agricole, à
l’exclusion des activités procurant des revenus garantis
en raison de l’existence d’un tarif réglementé de rachat
de la production, des activités financières, des
activités de gestion de patrimoine mobilier définie à
l’article 885 O quater et des activités immobilières.
Toutefois, les exclusions relatives à l’exercice d’une
activité financière ou immobilière ne sont pas
applicables aux entreprises solidaires mentionnées à
l’article L. 3332-17-1 du code du travail.
<br/>
La société n’exerce pas une activité de production
d’électricité utilisant l’énergie radiative du soleil ;
<br/>
<br/>
d bis) Les actifs de la société ne sont pas constitués
de façon prépondérante de métaux précieux, d’œuvres
d’art, d’objets de collection, d’antiquités, de chevaux
de course ou de concours ou, sauf si l’objet même de son
activité consiste en leur consommation ou en leur vente
au détail, de vins ou d’alcools ;
<br/>
<br/>
d ter) Les souscriptions au capital de la société
confèrent aux souscripteurs les seuls droits résultant
de la qualité d’actionnaire ou d’associé, à l’exclusion
de toute autre contrepartie notamment sous la forme de
tarifs préférentiels ou d’accès prioritaire aux biens
produits ou aux services rendus par la société ;
<br/>
<br/>
e) La société doit être une petite et moyenne entreprise
qui satisfait à la définition des petites et moyennes
entreprises qui figure à l’annexe I au règlement (CE) n°
800/2008 de la Commission du 6 août 2008 déclarant
certaines catégories d’aide compatibles avec le marché
commun en application des articles 87 et 88 du traité
(Règlement général d’exemption par catégorie) ;
<br/>
</div>
</div>
</xpath>
</template>
</data>
</xpath>
<xpath expr="//div[@name='board_commitee']" position="replace">
<div name="" class="col-xs-6 pull-left"
style="position:relative;top:105px;font-size:20;color:black;font-family:Roboto-Regular;">
<div style="position:relative;top:105px;">
Pour le Conseil d'administration de<span
t-field="o.company_id.name"/>.
</div>
<div style="position:relative;top:110px;">
<strong>
<span t-field="o.company_id.board_representative"/>
</strong>
</div>
<div style="position:relative;top:115px;">
<img t-if="o.company_id.signature_scan"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan"
style="width:240px;height:180px;padding-bottom:5px;"/>
</div>
</div>
</xpath>
</template>
</data>
</odoo>

23
easy_my_coop_fr/views/layout_template.xml

@ -1,13 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="layout_i18n_fr" inherit_id="theme_light.invoice_footer" name="French Layout Customization">
<xpath expr="//t[@t-if='company.company_registry']" position="before">
<t t-if="company.siret">
<span>Siret</span> :
<span t-field="company.siret"/>
</t>
</xpath>
</template>
</data>
<data>
<template id="layout_i18n_fr" inherit_id="theme_light.invoice_footer"
name="French Layout Customization">
<xpath expr="//t[@t-if='company.company_registry']"
position="before">
<t t-if="company.siret">
<span>Siret</span>
:
<span t-field="company.siret"/>
</t>
</xpath>
</template>
</data>
</odoo>

24
easy_my_coop_fr/views/subscription_template.xml

@ -1,14 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="subscription_i18n_fr" inherit_id="easy_my_coop_website.becomecooperator" name="Removing fields">
<xpath expr="//label[@for='iban']/.." position="replace">
</xpath>
</template>
<data>
<template id="subscription_i18n_fr"
inherit_id="easy_my_coop_website.becomecooperator"
name="Removing fields">
<xpath expr="//label[@for='iban']/.." position="replace">
</xpath>
</template>
<template id="company_subscription_i18n_fr" inherit_id="easy_my_coop_website.becomecompanycooperator" name="Company Removing fields">
<xpath expr="//label[@for='iban']/.." position="replace">
</xpath>
</template>
</data>
<template id="company_subscription_i18n_fr"
inherit_id="easy_my_coop_website.becomecompanycooperator"
name="Company Removing fields">
<xpath expr="//label[@for='iban']/.." position="replace">
</xpath>
</template>
</data>
</odoo>

33
easy_my_coop_loan/data/mail_template_data.xml

@ -5,11 +5,18 @@
<data noupdate="1">
<record id="loan_subscription_confirmation" model="mail.template">
<field name="name">Loan Subscription Confirmation Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe}</field>
<field name="subject">${object.company_id.name} Loan subscription confirmation (Ref ${object.loan_issue_id.name or 'n/a'})</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe}
</field>
<field name="subject">${object.company_id.name} Loan subscription
confirmation (Ref ${object.loan_issue_id.name or 'n/a'})
</field>
<field name="email_to">${object.partner_id.email}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe}</field>
<field name="model_id" ref="easy_my_coop_loan.model_loan_issue_line"/>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe}
</field>
<field name="model_id"
ref="easy_my_coop_loan.model_loan_issue_line"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.partner_id.lang}</field>
<field name="easy_my_coop" eval="True"/>
@ -57,12 +64,20 @@
</record>
<!--Request the payment of the subscribed loan issue -->
<record id="loan_issue_payment_request" model="mail.template">
<field name="name">Loan Issue Payment Request - Send by Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe}</field>
<field name="subject">${object.company_id.name} Payment request (Ref ${object.loan_issue_id.name or 'n/a'})</field>
<field name="name">Loan Issue Payment Request - Send by Email
</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe}
</field>
<field name="subject">${object.company_id.name} Payment request (Ref
${object.loan_issue_id.name or 'n/a'})
</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe}</field>
<field name="model_id" ref="easy_my_coop_loan.model_loan_issue_line"/>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe}
</field>
<field name="model_id"
ref="easy_my_coop_loan.model_loan_issue_line"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.partner_id.lang}</field>
<field name="easy_my_coop" eval="True"/>

6
easy_my_coop_loan/demo/coop.xml

@ -8,7 +8,8 @@
<field name="name">test loan issue</field>
<field name="default_issue" eval="True"/>
<field name="subscription_start_date" eval="datetime.today()"/>
<field name="subscription_end_date" eval="datetime.today() + timedelta(days=60)"/>
<field name="subscription_end_date"
eval="datetime.today() + timedelta(days=60)"/>
<field name="term_date" eval="datetime.today() + timedelta(days=600)"/>
<field name="user_id" ref="easy_my_coop.res_users_manager_emc_demo"/>
<field name="rate">0.03</field>
@ -26,6 +27,7 @@
<record id="loan_issue_line_1_demo" model="loan.issue.line">
<field name="loan_issue_id" ref="loan_issue_1_demo"/>
<field name="quantity">3</field>
<field name="partner_id" ref="easy_my_coop.res_partner_cooperator_4_demo"/>
<field name="partner_id"
ref="easy_my_coop.res_partner_cooperator_4_demo"/>
</record>
</odoo>

451
easy_my_coop_loan/views/loan_view.xml

@ -1,56 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_loan_issue_tree" model="ir.ui.view">
<field name="name">loan.issue.tree</field>
<field name="model">loan.issue</field>
<field name="arch" type="xml">
<tree string="Loan issues">
<field name="name" />
<field name="subscription_start_date" />
<field name="subscription_end_date" />
<field name="loan_start_date" />
<field name="term_date" />
<field name="loan_term" />
<field name="rate" />
<field name="minimum_amount" />
<field name="maximum_amount" />
<field name="subscribed_amount" />
<field name="user_id" />
<field name="state" />
</tree>
</field>
</record>
<record id="view_loan_issue_tree" model="ir.ui.view">
<field name="name">loan.issue.tree</field>
<field name="model">loan.issue</field>
<field name="arch" type="xml">
<tree string="Loan issues">
<field name="name"/>
<field name="subscription_start_date"/>
<field name="subscription_end_date"/>
<field name="loan_start_date"/>
<field name="term_date"/>
<field name="loan_term"/>
<field name="rate"/>
<field name="minimum_amount"/>
<field name="maximum_amount"/>
<field name="subscribed_amount"/>
<field name="user_id"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_loan_issue_form" model="ir.ui.view">
<field name="name">loan.issue.form</field>
<field name="model">loan.issue</field>
<field name="arch" type="xml">
<form string="Loan issue">
<header>
<!-- todo check access rights -->
<button name="action_confirm" string="Confirm" type="object" states="draft"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="action_cancel" string="Cancel" type="object" states="draft,ongoing"
confirm="Are you sure you want to cancel this loan issue?"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="action_open" string="Open" type="object"
states="confirmed" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="action_close" string="Close" type="object" states="ongoing"
confirm="Are you sure you want to close this loan issue?"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="action_draft" string="Set to draft"
type="object" states="confirmed,cancelled"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="compute_loan_interest" string="Compute interest"
type="object" states="closed,ongoing"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<record id="view_loan_issue_form" model="ir.ui.view">
<field name="name">loan.issue.form</field>
<field name="model">loan.issue</field>
<field name="arch" type="xml">
<form string="Loan issue">
<header>
<!-- todo check access rights -->
<button name="action_confirm" string="Confirm" type="object"
states="draft"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="action_cancel" string="Cancel" type="object"
states="draft,ongoing"
confirm="Are you sure you want to cancel this loan issue?"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="action_open" string="Open" type="object"
states="confirmed"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="action_close" string="Close" type="object"
states="ongoing"
confirm="Are you sure you want to close this loan issue?"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="action_draft" string="Set to draft"
type="object" states="confirmed,cancelled"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="compute_loan_interest"
string="Compute interest"
type="object" states="closed,ongoing"
groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,ongoing,closed"/>
</header>
<sheet>
<div class="oe_title">
<field name="state" widget="statusbar"
statusbar_visible="draft,confirmed,ongoing,closed"/>
</header>
<sheet>
<div class="oe_title">
<label class="oe_edit_only" for="name" string="Name"/>
<h1><field name="name" placeholder="Loan issue Name"/></h1>
<h1>
<field name="name" placeholder="Loan issue Name"/>
</h1>
<div name="options">
<div>
<field name="display_on_website"/>
@ -58,177 +66,190 @@
</div>
</div>
</div>
<group>
<group>
<field name="default_issue" />
<field name="face_value" />
<field name="minimum_amount" />
<field name="maximum_amount" />
<field name="subscribed_amount" />
<field name="by_individual" />
<field name="min_amount_person" attrs="{'invisible':[('by_individual','=',False)]}" />
<field name="max_amount_person" attrs="{'invisible':[('by_individual','=',False)]}" />
<field name="by_company" />
<field name="min_amount_company" attrs="{'invisible':[('by_company','=',False)]}" />
<field name="max_amount_company" attrs="{'invisible':[('by_company','=',False)]}" />
<field name="company_currency_id" invisible="True" />
</group>
<group>
<field name="user_id" widget="selection" />
<label for="rate" string="Interest rate"/>
<div>
<field name="rate" class="oe_inline"/>
<span class="o_form_label oe_inline">%</span>
</div>
<label for="taxes_rate" string="Taxes on interest"/>
<div>
<field name="taxes_rate" class="oe_inline"/>
<span class="o_form_label oe_inline">%</span>
</div>
<field name="subscription_start_date" />
<field name="subscription_end_date" />
<field name="loan_start_date" />
<field name="term_date" />
<field name="loan_term" />
<field name="interest_payment" widget="selection" />
<field name="interest_payment_info" attrs="{'invisible':[('interest_payment','not in',['end','yearly'])]}" />
</group>
</group>
<notebook>
<page name="lines" string="Lines">
<field name="loan_issue_lines">
<tree delete="false">
<field name="name" />
<field name="partner_id" />
<field name="date" />
<field name="quantity" />
<field name="face_value" />
<field name="amount" />
<field name="state" />
<field name="company_currency_id" invisible="True"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<group>
<group>
<field name="default_issue"/>
<field name="face_value"/>
<field name="minimum_amount"/>
<field name="maximum_amount"/>
<field name="subscribed_amount"/>
<field name="by_individual"/>
<field name="min_amount_person"
attrs="{'invisible':[('by_individual','=',False)]}"/>
<field name="max_amount_person"
attrs="{'invisible':[('by_individual','=',False)]}"/>
<field name="by_company"/>
<field name="min_amount_company"
attrs="{'invisible':[('by_company','=',False)]}"/>
<field name="max_amount_company"
attrs="{'invisible':[('by_company','=',False)]}"/>
<field name="company_currency_id" invisible="True"/>
</group>
<group>
<field name="user_id" widget="selection"/>
<label for="rate" string="Interest rate"/>
<div>
<field name="rate" class="oe_inline"/>
<span class="o_form_label oe_inline">%</span>
</div>
<label for="taxes_rate" string="Taxes on interest"/>
<div>
<field name="taxes_rate" class="oe_inline"/>
<span class="o_form_label oe_inline">%</span>
</div>
<field name="subscription_start_date"/>
<field name="subscription_end_date"/>
<field name="loan_start_date"/>
<field name="term_date"/>
<field name="loan_term"/>
<field name="interest_payment" widget="selection"/>
<field name="interest_payment_info"
attrs="{'invisible':[('interest_payment','not in',['end','yearly'])]}"/>
</group>
</group>
<notebook>
<page name="lines" string="Lines">
<field name="loan_issue_lines">
<tree delete="false">
<field name="name"/>
<field name="partner_id"/>
<field name="date"/>
<field name="quantity"/>
<field name="face_value"/>
<field name="amount"/>
<field name="state"/>
<field name="company_currency_id"
invisible="True"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_loan_issue_filter" model="ir.ui.view">
<field name="name">Loans Issue Search</field>
<field name="model">loan.issue</field>
<field name="arch" type="xml">
<search string="Search Loan Issue">
<field name="name"/>
</search>
</field>
</record>
<record id="view_loan_issue_filter" model="ir.ui.view">
<field name="name">Loans Issue Search</field>
<field name="model">loan.issue</field>
<field name="arch" type="xml">
<search string="Search Loan Issue">
<field name="name"/>
</search>
</field>
</record>
<record id="action_loan_issue" model="ir.actions.act_window">
<field name="name">Loan Issues</field>
<field name="res_model">loan.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="action_loan_issue" model="ir.actions.act_window">
<field name="name">Loan Issues</field>
<field name="res_model">loan.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="action_loan_issue_lines" model="ir.actions.act_window">
<field name="name">Loans</field>
<field name="res_model">loan.issue.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="action_loan_issue_lines" model="ir.actions.act_window">
<field name="name">Loans</field>
<field name="res_model">loan.issue.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="loan_issue_line_view_tree" model="ir.ui.view">
<field name="name">loan_issue_line_view_tree</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<tree string="Loans">
<field name="name"/>
<field name="loan_issue_id"/>
<field name="partner_id"/>
<field name="loan_issue_id"/>
<field name="quantity"/>
<field name="face_value"/>
<field name="amount"/>
<field name="date"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="loan_issue_line_view_tree" model="ir.ui.view">
<field name="name">loan_issue_line_view_tree</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<tree string="Loans">
<field name="name"/>
<field name="loan_issue_id"/>
<field name="partner_id"/>
<field name="loan_issue_id"/>
<field name="quantity"/>
<field name="face_value"/>
<field name="amount"/>
<field name="date"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_loan_issue_line_form" model="ir.ui.view">
<field name="name">loan.issue.line.form</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<form string="Loan issue">
<header>
<button name="action_validate" string="Validate"
type="object" states="draft" />
<button name="action_request_payment" string="Request Payment"
type="object" states="subscribed" />
<button name="action_cancel" string="Cancel" type="object"
states="draft,subscribed,waiting"
confirm="Are you sure you want to cancel this loan subscription ?" />
<button name="action_draft" string="Set to draft"
type="object" states="cancelled" />
<button name="action_paid" string="Paid"
type="object" states="waiting" />
<field name="state" widget="statusbar" />
</header>
<sheet>
<group>
<group>
<field name="loan_issue_id"/>
<field name="name" />
<field name="quantity" />
<field name="face_value" />
</group>
<group>
<field name="date" />
<field name="partner_id" />
<field name="amount" />
</group>
</group>
<notebook>
<page string="Interest lines">
<field name="interest_lines">
<tree delete="false" create="false">
<field name="name" />
<field name="amount" />
<field name="accrued_amount" />
<field name="interest" />
<field name="net_interest" />
<field name="taxes_amount" />
<field name="due_date" />
<field name="state" />
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_loan_issue_line_form" model="ir.ui.view">
<field name="name">loan.issue.line.form</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<form string="Loan issue">
<header>
<button name="action_validate" string="Validate"
type="object" states="draft"/>
<button name="action_request_payment"
string="Request Payment"
type="object" states="subscribed"/>
<button name="action_cancel" string="Cancel" type="object"
states="draft,subscribed,waiting"
confirm="Are you sure you want to cancel this loan subscription ?"/>
<button name="action_draft" string="Set to draft"
type="object" states="cancelled"/>
<button name="action_paid" string="Paid"
type="object" states="waiting"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<group>
<group>
<field name="loan_issue_id"/>
<field name="name"/>
<field name="quantity"/>
<field name="face_value"/>
</group>
<group>
<field name="date"/>
<field name="partner_id"/>
<field name="amount"/>
</group>
</group>
<notebook>
<page string="Interest lines">
<field name="interest_lines">
<tree delete="false" create="false">
<field name="name"/>
<field name="amount"/>
<field name="accrued_amount"/>
<field name="interest"/>
<field name="net_interest"/>
<field name="taxes_amount"/>
<field name="due_date"/>
<field name="state"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_loan_issue_line_filter" model="ir.ui.view">
<field name="name">Loans Search</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<search string="Search Loans">
<field name="name"/>
<field name="partner_id"/>
<field name="loan_issue_id"/>
<separator/>
<filter string="Draft" name="state_draft" domain="[('state','=','draft')]"/>
<filter string="Paid" name="state_paid" domain="[('state','=','paid')]"/>
<filter string="Done" name="state_done" domain="[('state','=','done')]"/>
<filter string="Subscribed" name="state_subscribed" domain="[('state','=','subscribed')]"/>
<group expand="0" name="group_by" string="Group By">
<filter name="loan_issue_id" string="Loan Issue" context="{'group_by' : 'loan_issue_id'}" />
<filter name="date" string="Subscription Date" context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
<record id="view_loan_issue_line_filter" model="ir.ui.view">
<field name="name">Loans Search</field>
<field name="model">loan.issue.line</field>
<field name="arch" type="xml">
<search string="Search Loans">
<field name="name"/>
<field name="partner_id"/>
<field name="loan_issue_id"/>
<separator/>
<filter string="Draft" name="state_draft"
domain="[('state','=','draft')]"/>
<filter string="Paid" name="state_paid"
domain="[('state','=','paid')]"/>
<filter string="Done" name="state_done"
domain="[('state','=','done')]"/>
<filter string="Subscribed" name="state_subscribed"
domain="[('state','=','subscribed')]"/>
<group expand="0" name="group_by" string="Group By">
<filter name="loan_issue_id" string="Loan Issue"
context="{'group_by' : 'loan_issue_id'}"/>
<filter name="date" string="Subscription Date"
context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
</odoo>

14
easy_my_coop_loan/views/menus.xml

@ -4,10 +4,16 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<menuitem name="Loan Management" id="menu_easy_my_coop_main_loan_issue" parent="easy_my_coop.menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="15"/>
<menuitem name="Loan Issues" id="loan_issue_menu" action="action_loan_issue" parent="menu_easy_my_coop_main_loan_issue" sequence="110"/>
<menuitem name="Loans" id="loan_issue_line_menu" action="action_loan_issue_lines" parent="menu_easy_my_coop_main_loan_issue" sequence="120"/>
<menuitem name="Loan Management" id="menu_easy_my_coop_main_loan_issue"
parent="easy_my_coop.menu_main_easy_my_coop"
groups="easy_my_coop.group_easy_my_coop_user" sequence="15"/>
<menuitem name="Loan Issues" id="loan_issue_menu" action="action_loan_issue"
parent="menu_easy_my_coop_main_loan_issue" sequence="110"/>
<menuitem name="Loans" id="loan_issue_line_menu"
action="action_loan_issue_lines"
parent="menu_easy_my_coop_main_loan_issue" sequence="120"/>
<menuitem name="Loaners" id="loaners_menu" action="action_loaners" parent="easy_my_coop.menu_easy_my_coop_main_coop" sequence="215" />
<menuitem name="Loaners" id="loaners_menu" action="action_loaners"
parent="easy_my_coop.menu_easy_my_coop_main_coop" sequence="215"/>
</odoo>

85
easy_my_coop_loan/views/partner_view.xml

@ -4,48 +4,51 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_partner_form_loan_issue" model="ir.ui.view">
<field name="name">res.partner.form.loan.issue</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="easy_my_coop.view_partner_form_easy_my_coop"/>
<field name="arch" type="xml">
<page name="share_subscription" position="after">
<page string="Loan issue lines" name="loan_issue_lines" groups="easy_my_coop.group_easy_my_coop_user">
<group>
<field name="is_loaner"/>
</group>
<field name="loan_line_ids">
<tree>
<!-- <tree create="false" delete="false" edit="false">-->
<field name="loan_issue_id"/>
<field name="date"/>
<field name="quantity"/>
<field name="face_value"/>
<field name="amount"/>
<field name="state"/>
</tree>
</field>
</page>
</page>
</field>
<record id="view_partner_form_loan_issue" model="ir.ui.view">
<field name="name">res.partner.form.loan.issue</field>
<field name="model">res.partner</field>
<field name="inherit_id"
ref="easy_my_coop.view_partner_form_easy_my_coop"/>
<field name="arch" type="xml">
<page name="share_subscription" position="after">
<page string="Loan issue lines" name="loan_issue_lines"
groups="easy_my_coop.group_easy_my_coop_user">
<group>
<field name="is_loaner"/>
</group>
<field name="loan_line_ids">
<tree>
<!-- <tree create="false" delete="false" edit="false">-->
<field name="loan_issue_id"/>
<field name="date"/>
<field name="quantity"/>
<field name="face_value"/>
<field name="amount"/>
<field name="state"/>
</tree>
</field>
</page>
</page>
</field>
</record>
<record id="view_res_partner_loaner_filter" model="ir.ui.view">
<field name="name">res.partner.select</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='supplier']" position='after'>
<filter string="Loaners" name="loaners" domain="[('is_loaner','=',1)]" help="Loaning Partners"/>
</xpath>
</field>
</record>
<record id="view_res_partner_loaner_filter" model="ir.ui.view">
<field name="name">res.partner.select</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='supplier']" position='after'>
<filter string="Loaners" name="loaners"
domain="[('is_loaner','=',1)]" help="Loaning Partners"/>
</xpath>
</field>
</record>
<record id="action_loaners" model="ir.actions.act_window">
<field name="name">Loaners</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{'search_default_loaners':1}</field>
</record>
<record id="action_loaners" model="ir.actions.act_window">
<field name="name">Loaners</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{'search_default_loaners':1}</field>
</record>
</odoo>

12
easy_my_coop_loan_website/data/website_loan_data.xml

@ -2,12 +2,12 @@
<odoo>
<data>
<record id="menu_subscribeloanissue" model="website.menu">
<field name="name">Subscribe to loan issue</field>
<field name="url">/subscription/loan_issue_form</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">65</field>
</record>
<record id="subscribe_loan_issue_page" model="website.page">
<field name="name">Subscribe to loan issue</field>
<field name="url">/subscription/loan_issue_form</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">65</field>
</record>
<record id="subscribe_loan_issue_page" model="website.page">
<field name="website_published">True</field>
<field name="url">/subscription/loan_issue_form</field>
<field name="view_id" ref="menu_subscribeloanissue"/>

123
easy_my_coop_loan_website/template/loan_issue_template.xml

@ -1,54 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_frontend" inherit_id="web.assets_frontend" name="Coop">
<xpath expr="." position="inside">
<script type="text/javascript" src="/easy_my_coop_loan_website/static/src/js/loan_issue.js"></script>
</xpath>
</template>
<template id="assets_frontend" inherit_id="web.assets_frontend" name="Coop">
<xpath expr="." position="inside">
<script type="text/javascript"
src="/easy_my_coop_loan_website/static/src/js/loan_issue.js"></script>
</xpath>
</template>
<template id="loanissuesubscription" name="Loan Issue Subscription">
<t t-call="website.layout">
<div id="wrap">
<div class="oe_structure"/>
<div class="container oe_easymy_coop_loan">
<h2 class="energie">Subscribe to Loan Issue</h2><br/>
<div class="row">
<div class="col-md-8">
<form action="/subscription/subscribe_loan_issue" method="post" class="form-horizontal mt32" enctype="multipart/form-data">
<p style="color:red;"><t t-esc="error_msg"/></p>
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<template id="loanissuesubscription" name="Loan Issue Subscription">
<t t-call="website.layout">
<div id="wrap">
<div class="oe_structure"/>
<div class="container oe_easymy_coop_loan">
<h2 class="energie">Subscribe to Loan Issue</h2>
<br/>
<div class="row">
<div class="col-md-8">
<form action="/subscription/subscribe_loan_issue"
method="post" class="form-horizontal mt32"
enctype="multipart/form-data">
<p style="color:red;">
<t t-esc="error_msg"/>
</p>
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<div t-attf-class="form-group #{error and 'loan_issue_id' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" style="width:25%" for="share_product_id">Loan issue</label>
<select id="loan_issue" name="loan_issue_id" class="col-md-7 col-sm-8 form-control" style="width:54%;margin-left:15px">
<t t-foreach="loan_issues or []" t-as="loan_issue">
<option t-att-value="loan_issue.id" t-att-selected="loan_issue.id == int(loan_issue_id)"><t t-esc="loan_issue.name"/></option>
</t>
</select>
</div>
<div t-attf-class="form-group #{error and 'subscription_amount' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" style="width:25%" for="subscription_amount">Amount</label>
<input id="subscription_amount" type="number" class="col-md-7 col-sm-8 form-control total" name="subscription_amount" min="0" step="100" max="5000"/>
</div>
<table style="margin-left:195px">
<tr>
<!--<td width="80%">
<div class="g-recaptcha" t-att-data-sitekey="website.recaptcha_key_site" data-theme="green"/><br/>
</td>-->
<td>
<div class="form-group">
<div class="col-md-offset-3 col-sm-offset-4 col-sm-8 col-md-7">
<button class="btn btn-primary btn-lg">Send</button>
</div>
</div>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</t>
</template>
<div t-attf-class="form-group #{error and 'loan_issue_id' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label"
style="width:25%"
for="share_product_id">Loan issue
</label>
<select id="loan_issue" name="loan_issue_id"
class="col-md-7 col-sm-8 form-control"
style="width:54%;margin-left:15px">
<t t-foreach="loan_issues or []"
t-as="loan_issue">
<option t-att-value="loan_issue.id"
t-att-selected="loan_issue.id == int(loan_issue_id)">
<t t-esc="loan_issue.name"/>
</option>
</t>
</select>
</div>
<div t-attf-class="form-group #{error and 'subscription_amount' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label"
style="width:25%"
for="subscription_amount">Amount
</label>
<input id="subscription_amount"
type="number"
class="col-md-7 col-sm-8 form-control total"
name="subscription_amount" min="0"
step="100" max="5000"/>
</div>
<table style="margin-left:195px">
<tr>
<!--<td width="80%">
<div class="g-recaptcha" t-att-data-sitekey="website.recaptcha_key_site" data-theme="green"/><br/>
</td>-->
<td>
<div class="form-group">
<div class="col-md-offset-3 col-sm-offset-4 col-sm-8 col-md-7">
<button class="btn btn-primary btn-lg">
Send
</button>
</div>
</div>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</t>
</template>
</odoo>

11
easy_my_coop_taxshelter_report/data/mail_template_data.xml

@ -3,12 +3,17 @@
<!-- Mail template are declared in a NOUPDATE block
so users can freely customize/delete them -->
<data noupdate="1">
<record id="email_template_tax_shelter_certificate" model="mail.template">
<record id="email_template_tax_shelter_certificate"
model="mail.template">
<field name="name">Tax Shelter Certificate - Send By Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="email_from">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="subject">Tax Shelter Certificate</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="reply_to">
${(object.company_id.coop_email_contact or object.user_id.email)|safe}
</field>
<field name="model_id" ref="model_tax_shelter_certificate"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.partner_id.lang}</field>

6
easy_my_coop_taxshelter_report/data/scheduler_data.xml

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record forcecreate="True" id="ir_cron_mail_tax_shelter_action" model="ir.cron">
<record forcecreate="True" id="ir_cron_mail_tax_shelter_action"
model="ir.cron">
<field name="name">Tax shelter mail batch mail</field>
<field name="model_id" ref="model_tax_shelter_certificate"/>
<field name="state">code</field>
<field name="code">model.batch_send_tax_shelter_certificate()</field>
<field name="code">model.batch_send_tax_shelter_certificate()
</field>
<field name="interval_number">1</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>

19
easy_my_coop_taxshelter_report/demo/tax_shelter_demo.xml

@ -19,22 +19,27 @@
<record id="tax_shelter_certificate_1_demo" model="tax.shelter.certificate">
<field name="cooperator_number">1</field>
<field name="partner_id" ref="easy_my_coop.res_partner_cooperator_1_demo"/>
<field name="declaration_id" ref="easy_my_coop_taxshelter_report.tax_shelter_declaration_1_demo"/>
<field name="partner_id"
ref="easy_my_coop.res_partner_cooperator_1_demo"/>
<field name="declaration_id"
ref="easy_my_coop_taxshelter_report.tax_shelter_declaration_1_demo"/>
<field name="state">sent</field>
</record>
<record id="certificate_line_1_demo" model="certificate.line">
<field name="tax_shelter_certificate" ref="easy_my_coop_taxshelter_report.tax_shelter_certificate_1_demo"/>
<field name="share_type" model="product.template" eval="obj(ref('easy_my_coop.product_template_share_type_1_demo')).product_variant_id.id"/>
<field name="tax_shelter_certificate"
ref="easy_my_coop_taxshelter_report.tax_shelter_certificate_1_demo"/>
<field name="share_type" model="product.template"
eval="obj(ref('easy_my_coop.product_template_share_type_1_demo')).product_variant_id.id"/>
<field name="share_unit_price">25</field>
<field name="quantity">12</field>
<field name="transaction_date" eval="datetime.now() - timedelta(days=45)"/>
<field name="tax_shelter" eval="True" />
<field name="transaction_date"
eval="datetime.now() - timedelta(days=45)"/>
<field name="tax_shelter" eval="True"/>
<field name="type">subscribed</field>
</record>
<record id="tax_shelter_certificate_1_demo" model="tax.shelter.certificate">
<record id="tax_shelter_certificate_1_demo" model="tax.shelter.certificate">
<field name="lines" eval="[(4, ref('certificate_line_1_demo'))]"/>
</record>
</odoo>

32
easy_my_coop_taxshelter_report/reports/tax_shelter_report.xml

@ -2,22 +2,22 @@
<odoo>
<data noupdate="0">
<report
id="action_tax_shelter_subscription_report"
model="tax.shelter.certificate"
string="Tax shelter subscription report"
report_type="qweb-pdf"
name="easy_my_coop_taxshelter_report.tax_shelter_subscription_report"
file="easy_my_coop_taxshelter_report.tax_shelter_subscription_report.xml"
multi="True"
menu="True"/>
id="action_tax_shelter_subscription_report"
model="tax.shelter.certificate"
string="Tax shelter subscription report"
report_type="qweb-pdf"
name="easy_my_coop_taxshelter_report.tax_shelter_subscription_report"
file="easy_my_coop_taxshelter_report.tax_shelter_subscription_report.xml"
multi="True"
menu="True"/>
<report
id="action_tax_shelter_shares_report"
model="tax.shelter.certificate"
string="Tax shelter shares report"
report_type="qweb-pdf"
name="easy_my_coop_taxshelter_report.tax_shelter_shares_report"
file="easy_my_coop_taxshelter_report.tax_shelter_shares_report.xml"
multi="True"
menu="True"/>
id="action_tax_shelter_shares_report"
model="tax.shelter.certificate"
string="Tax shelter shares report"
report_type="qweb-pdf"
name="easy_my_coop_taxshelter_report.tax_shelter_shares_report"
file="easy_my_coop_taxshelter_report.tax_shelter_shares_report.xml"
multi="True"
menu="True"/>
</data>
</odoo>

101
easy_my_coop_taxshelter_report/reports/tax_shelter_resold_report.xml

@ -3,16 +3,21 @@
<template id="tax_shelter_report_resold_document">
<t t-call="web.external_layout">
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<address t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
<div t-if="o.partner_id.cooperator_register_number">
Numéro de coopérateur : <span t-field="o.partner_id.cooperator_register_number"/>
Numéro de coopérateur :
<span t-field="o.partner_id.cooperator_register_number"/>
</div>
</t>
<div class="page mt32" style="font-size: 10px !important;">
<h2 style="font-size: 3em;">
<span>Déclaration Tax Shelter</span><br/>
<small>Attestation concernant une des quatre années suivant l’acquisition de parts</small>
<span>Déclaration Tax Shelter</span>
<br/>
<small>Attestation concernant une des quatre années suivant
l’acquisition de parts
</small>
</h2>
<p>
@ -20,51 +25,100 @@
</p>
<p>
A la date du <span t-field="o.partner_id.effective_date"/>, vous êtes devenu coopérateur de <span t-field="o.company_id.name"/>.
A la date du<span t-field="o.partner_id.effective_date"/>,
vous êtes devenu coopérateur de<span
t-field="o.company_id.name"/>.
</p>
<p>
Cette lettre confirme qu’en date du <span t-field="o.declaration_id.date_to"/>, vous êtes toujours en possession de parts de <span t-field="o.company_id.name"/>
pour un montant total de <span t-field="o.partner_id.total_value" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> euros et que la condition prévue à l’article 145(26), $3, alinéa 2, CIR92 est remplie.
Cette lettre confirme qu’en date du<span
t-field="o.declaration_id.date_to"/>, vous êtes toujours
en possession de parts de
<span t-field="o.company_id.name"/>
pour un montant total de
<span t-field="o.partner_id.total_value"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
euros et que la condition prévue à l’article 145(26), $3,
alinéa 2, CIR92 est remplie.
</p>
<p>
L' Article 145/26, CIR 92 sur les revenus <span t-field="o.declaration_id.fiscal_year"/>, connu aussi comme normative Tax Shelter, donnent droit à une réduction d’impôt à hauteur de &#160;<span t-field="o.declaration_id.tax_shelter_percentage"/> du montant de la valeur des parts souscrites depuis <span t-field="o.declaration_id.month_from"/> (et avant <span t-field="o.declaration_id.month_to"/> pour la déclaration des revenus &#160;<span t-field="o.declaration_id.fiscal_year"/>).
L' Article 145/26, CIR 92 sur les revenus<span
t-field="o.declaration_id.fiscal_year"/>, connu aussi
comme normative Tax Shelter, donnent droit à une réduction
d’impôt à hauteur de &#160;<span
t-field="o.declaration_id.tax_shelter_percentage"/>
du montant de la valeur des parts souscrites depuis
<span t-field="o.declaration_id.month_from"/>
(et avant
<span t-field="o.declaration_id.month_to"/>
pour la déclaration des revenus &#160;<span
t-field="o.declaration_id.fiscal_year"/>).
</p>
<p>
Cette lettre vaut donc comme certificat que <span t-field="o.company_id.name"/> remplit en effet tous les critères permettant un tel avantage fiscal. Dans les grandes lignes il faut être une micro-entreprise n’ayant encore jamais distribué de dividende et qui n'est pas issue d’une fusion ou scission de sociétés et qui répond à au moins deux des trois critères suivants :
Cette lettre vaut donc comme certificat que
<span t-field="o.company_id.name"/>
remplit en effet tous les critères permettant un tel
avantage fiscal. Dans les grandes lignes il faut être une
micro-entreprise n’ayant encore jamais distribué de
dividende et qui n'est pas issue d’une fusion ou scission de
sociétés et qui répond à au moins deux des trois critères
suivants :
<ul>
<li>le total du bilan est inférieur ou égal à 350.000 euros ;</li>
<li>le chiffre d’affaires, hors taxe sur la valeur ajoutée, est inférieur ou égal à 700.000 euros ;</li>
<li>la moyenne des travailleurs occupés pendant l’année est inférieure ou égale à 10.</li>
<li>le total du bilan est inférieur ou égal à 350.000
euros ;
</li>
<li>le chiffre d’affaires, hors taxe sur la valeur
ajoutée, est inférieur ou égal à 700.000 euros ;
</li>
<li>la moyenne des travailleurs occupés pendant l’année
est inférieure ou égale à 10.
</li>
</ul>
</p>
<p>
Le maintien de la réduction d’impôt n’est possible que si l'investisseur conserve les parts de la coopérative pendant 4 ans au minimum, sauf si la sortie est imposée par des conditions extérieures (telles que la faillite, par exemple). En cas de sortie volontaire avant la période de 4 ans, l’avantage fiscal devra être remboursé au prorata du nombre de mois entre la sortie et les 4 ans. La coopérative s’engage à fournir pour chacune des quatre années suivant l’année d’acquisition une attestation certifiant que ces parts sont toujours en possession du souscripteur.
Le maintien de la réduction d’impôt n’est possible que si
l'investisseur conserve les parts de la coopérative pendant
4 ans au minimum, sauf si la sortie est imposée par des
conditions extérieures (telles que la faillite, par
exemple). En cas de sortie volontaire avant la période de 4
ans, l’avantage fiscal devra être remboursé au prorata du
nombre de mois entre la sortie et les 4 ans. La coopérative
s’engage à fournir pour chacune des quatre années suivant
l’année d’acquisition une attestation certifiant que ces
parts sont toujours en possession du souscripteur.
</p>
<p>
L’apport de capitaux par le chef d’entreprise lui-même ou par des administrateurs existants de la société ne permet pas de bénéficier du tax shelter.
L’apport de capitaux par le chef d’entreprise lui-même ou
par des administrateurs existants de la société ne permet
pas de bénéficier du tax shelter.
</p>
<p>
Pour bénéficier de la réduction d’impôts, vous pouvez joindre cette lettre à votre déclaration fiscale pour les revenus <span t-field="o.declaration_id.fiscal_year"/>.
Pour bénéficier de la réduction d’impôts, vous pouvez
joindre cette lettre à votre déclaration fiscale pour les
revenus<span t-field="o.declaration_id.fiscal_year"/>.
</p>
<p>
Pour toute information complémentaire, consultez le texte de l’Arrêté Royale.
Pour toute information complémentaire, consultez le texte de
l’Arrêté Royale.
</p>
<p>
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>,<br/>
<strong t-field="o.company_id.board_representative"/><br/>
Pour le Conseil d'administration de<span
t-field="o.company_id.name"/>,
<br/>
<strong t-field="o.company_id.board_representative"/>
<br/>
<img t-if="o.company_id.signature_scan"
t-attf-class="mt16"
t-attf-style="{{ 'min-height: 50px; max-height: 100px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"
/>
t-attf-class="mt16"
t-attf-style="{{ 'min-height: 50px; max-height: 100px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"
/>
</p>
</div>
@ -74,7 +128,8 @@
<template id="tax_shelter_resold_report">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_shares_document" t-lang="o.partner_id.lang"/>
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_shares_document"
t-lang="o.partner_id.lang"/>
</t>
</t>
</template>

186
easy_my_coop_taxshelter_report/reports/tax_shelter_shares_report.xml

@ -3,16 +3,21 @@
<template id="tax_shelter_report_shares_document">
<t t-call="web.external_layout">
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<address t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
<div t-if="o.partner_id.cooperator_register_number">
Numéro de coopérateur : <span t-field="o.partner_id.cooperator_register_number"/>
Numéro de coopérateur :
<span t-field="o.partner_id.cooperator_register_number"/>
</div>
</t>
<div class="page mt32" style="font-size: 10px !important;">
<h2 style="font-size: 3em;">
<span>Déclaration Tax Shelter</span><br/>
<small>Attestation concernant une des quatre années suivant l’acquisition de parts</small>
<span>Déclaration Tax Shelter</span>
<br/>
<small>Attestation concernant une des quatre années suivant
l’acquisition de parts
</small>
</h2>
<p>
@ -20,15 +25,25 @@
</p>
<p>
A la date du <span t-field="o.partner_id.effective_date"/>, vous êtes devenu coopérateur de <span t-field="o.company_id.name"/>.
A la date du<span t-field="o.partner_id.effective_date"/>,
vous êtes devenu coopérateur de<span
t-field="o.company_id.name"/>.
</p>
<p>
Cette lettre confirme qu’en date du <span t-field="o.declaration_id.date_to"/>, vous êtes toujours en possession de parts de <span t-field="o.company_id.name"/>
pour un montant total de <span t-field="o.partner_id.total_value" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> euros et que la condition prévue à l’article 145(26), $3, alinéa 2, CIR92 est remplie.
Cette lettre confirme qu’en date du<span
t-field="o.declaration_id.date_to"/>, vous êtes toujours
en possession de parts de
<span t-field="o.company_id.name"/>
pour un montant total de
<span t-field="o.partner_id.total_value"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
euros et que la condition prévue à l’article 145(26), $3,
alinéa 2, CIR92 est remplie.
</p>
<table class="table table-sm o_main_table" name="taxshelter_line_table">
<table class="table table-sm o_main_table"
name="taxshelter_line_table">
<thead>
<tr>
<th>Type</th>
@ -42,81 +57,163 @@
</thead>
<tbody class="invoice_tbody">
<tr t-foreach="o.previously_subscribed_lines" t-as="l">
<td><span t-field="l.type"/></td>
<td><span t-field="l.capital_before_sub"/></td>
<td><span t-field="l.capital_after_sub"/></td>
<td><span t-if="l.tax_shelter">Oui</span><span t-else="">Non</span></td>
<td><span t-field="l.transaction_date"/></td>
<td><span t-field="l.amount_subscribed"/></td>
<td><span t-field="l.amount_subscribed_eligible"/></td>
<td>
<span t-field="l.type"/>
</td>
<td>
<span t-field="l.capital_before_sub"/>
</td>
<td>
<span t-field="l.capital_after_sub"/>
</td>
<td>
<span t-if="l.tax_shelter">Oui</span>
<span t-else="">Non</span>
</td>
<td>
<span t-field="l.transaction_date"/>
</td>
<td>
<span t-field="l.amount_subscribed"/>
</td>
<td>
<span t-field="l.amount_subscribed_eligible"/>
</td>
</tr>
<tr t-foreach="o.subscribed_lines" t-as="l">
<td><span t-field="l.type"/></td>
<td><span t-field="l.capital_before_sub"/></td>
<td><span t-field="l.capital_after_sub"/></td>
<td><span t-if="l.tax_shelter">Oui</span><span t-else="">Non</span></td>
<td><span t-field="l.transaction_date"/></td>
<td><span t-field="l.amount_subscribed"/></td>
<td><span t-field="l.amount_subscribed_eligible"/></td>
<td>
<span t-field="l.type"/>
</td>
<td>
<span t-field="l.capital_before_sub"/>
</td>
<td>
<span t-field="l.capital_after_sub"/>
</td>
<td>
<span t-if="l.tax_shelter">Oui</span>
<span t-else="">Non</span>
</td>
<td>
<span t-field="l.transaction_date"/>
</td>
<td>
<span t-field="l.amount_subscribed"/>
</td>
<td>
<span t-field="l.amount_subscribed_eligible"/>
</td>
</tr>
<tr t-foreach="o.resold_lines" t-as="l">
<td><span t-field="l.type"/></td>
<td>
<span t-field="l.type"/>
</td>
<td></td>
<td></td>
<td></td>
<td><span t-field="l.transaction_date"/></td>
<td><span t-field="l.amount_resold"/></td>
<td>
<span t-field="l.transaction_date"/>
</td>
<td>
<span t-field="l.amount_resold"/>
</td>
<td></td>
</tr>
<tr t-foreach="o.transfered_lines" t-as="l">
<td><span t-field="l.type"/></td>
<td>
<span t-field="l.type"/>
</td>
<td></td>
<td></td>
<td></td>
<td><span t-field="l.transaction_date"/></td>
<td><span t-field="l.amount_transfered"/></td>
<td>
<span t-field="l.transaction_date"/>
</td>
<td>
<span t-field="l.amount_transfered"/>
</td>
<td></td>
</tr>
</tbody>
</table>
<p>
L' Article 145/26, CIR 92 sur les revenus <span t-field="o.declaration_id.fiscal_year"/>, connu aussi comme normative Tax Shelter, donnent droit à une réduction d’impôt à hauteur de &#160;<span t-field="o.declaration_id.tax_shelter_percentage"/> du montant de la valeur des parts souscrites depuis <span t-field="o.declaration_id.month_from"/> (et avant <span t-field="o.declaration_id.month_to"/> pour la déclaration des revenus &#160;<span t-field="o.declaration_id.fiscal_year"/>).
L' Article 145/26, CIR 92 sur les revenus<span
t-field="o.declaration_id.fiscal_year"/>, connu aussi
comme normative Tax Shelter, donnent droit à une réduction
d’impôt à hauteur de &#160;<span
t-field="o.declaration_id.tax_shelter_percentage"/>
du montant de la valeur des parts souscrites depuis
<span t-field="o.declaration_id.month_from"/>
(et avant
<span t-field="o.declaration_id.month_to"/>
pour la déclaration des revenus &#160;<span
t-field="o.declaration_id.fiscal_year"/>).
</p>
<p>
Cette lettre vaut donc comme certificat que <span t-field="o.company_id.name"/> remplit en effet tous les critères permettant un tel avantage fiscal. Dans les grandes lignes il faut être une micro-entreprise n’ayant encore jamais distribué de dividende et qui n'est pas issue d’une fusion ou scission de sociétés et qui répond à au moins deux des trois critères suivants :
Cette lettre vaut donc comme certificat que
<span t-field="o.company_id.name"/>
remplit en effet tous les critères permettant un tel
avantage fiscal. Dans les grandes lignes il faut être une
micro-entreprise n’ayant encore jamais distribué de
dividende et qui n'est pas issue d’une fusion ou scission de
sociétés et qui répond à au moins deux des trois critères
suivants :
<ul>
<li>le total du bilan est inférieur ou égal à 350.000 euros ;</li>
<li>le chiffre d’affaires, hors taxe sur la valeur ajoutée, est inférieur ou égal à 700.000 euros ;</li>
<li>la moyenne des travailleurs occupés pendant l’année est inférieure ou égale à 10.</li>
<li>le total du bilan est inférieur ou égal à 350.000
euros ;
</li>
<li>le chiffre d’affaires, hors taxe sur la valeur
ajoutée, est inférieur ou égal à 700.000 euros ;
</li>
<li>la moyenne des travailleurs occupés pendant l’année
est inférieure ou égale à 10.
</li>
</ul>
</p>
<p>
Le maintien de la réduction d’impôt n’est possible que si l'investisseur conserve les parts de la coopérative pendant 4 ans au minimum, sauf si la sortie est imposée par des conditions extérieures (telles que la faillite, par exemple). En cas de sortie volontaire avant la période de 4 ans, l’avantage fiscal devra être remboursé au prorata du nombre de mois entre la sortie et les 4 ans. La coopérative s’engage à fournir pour chacune des quatre années suivant l’année d’acquisition une attestation certifiant que ces parts sont toujours en possession du souscripteur.
Le maintien de la réduction d’impôt n’est possible que si
l'investisseur conserve les parts de la coopérative pendant
4 ans au minimum, sauf si la sortie est imposée par des
conditions extérieures (telles que la faillite, par
exemple). En cas de sortie volontaire avant la période de 4
ans, l’avantage fiscal devra être remboursé au prorata du
nombre de mois entre la sortie et les 4 ans. La coopérative
s’engage à fournir pour chacune des quatre années suivant
l’année d’acquisition une attestation certifiant que ces
parts sont toujours en possession du souscripteur.
</p>
<p>
L’apport de capitaux par le chef d’entreprise lui-même ou par des administrateurs existants de la société ne permet pas de bénéficier du tax shelter.
L’apport de capitaux par le chef d’entreprise lui-même ou
par des administrateurs existants de la société ne permet
pas de bénéficier du tax shelter.
</p>
<p>
Pour bénéficier de la réduction d’impôts, vous pouvez joindre cette lettre à votre déclaration fiscale pour les revenus <span t-field="o.declaration_id.fiscal_year"/>.
Pour bénéficier de la réduction d’impôts, vous pouvez
joindre cette lettre à votre déclaration fiscale pour les
revenus<span t-field="o.declaration_id.fiscal_year"/>.
</p>
<p>
Pour toute information complémentaire, consultez le texte de l’Arrêté Royale.
Pour toute information complémentaire, consultez le texte de
l’Arrêté Royale.
</p>
<p>
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>,<br/>
<strong t-field="o.company_id.board_representative"/><br/>
Pour le Conseil d'administration de<span
t-field="o.company_id.name"/>,
<br/>
<strong t-field="o.company_id.board_representative"/>
<br/>
<img t-if="o.company_id.signature_scan"
t-attf-class="mt16"
t-attf-style="{{ 'min-height: 50px; max-height: 100px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"
/>
t-attf-class="mt16"
t-attf-style="{{ 'min-height: 50px; max-height: 100px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"
/>
</p>
</div>
@ -126,7 +223,8 @@
<template id="tax_shelter_shares_report">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_shares_document" t-lang="o.partner_id.lang"/>
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_shares_document"
t-lang="o.partner_id.lang"/>
</t>
</t>
</template>

157
easy_my_coop_taxshelter_report/reports/tax_shelter_subscription_report.xml

@ -3,9 +3,11 @@
<template id="tax_shelter_report_subscription_document">
<t t-call="web.external_layout">
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<address t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
<div t-if="o.partner_id.cooperator_register_number">
Numéro de coopérateur : <span t-field="o.partner_id.cooperator_register_number"/>
Numéro de coopérateur :
<span t-field="o.partner_id.cooperator_register_number"/>
</div>
</t>
<div class="page mt32" style="font-size: 10px !important;">
@ -19,12 +21,24 @@
</p>
<p>
Durant l'année <span t-field="o.declaration_id.fiscal_year"/> vous avez souscrit des parts de <span t-field="o.company_id.name"/> pour un montant total de
<span t-field="o.total_amount_subscribed" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> euros.<br/>
Le montant éligible pour le Tax shelter est de <span t-field="o.total_amount_eligible" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> euros.<br/>
Durant l'année
<span t-field="o.declaration_id.fiscal_year"/>
vous avez souscrit des parts de
<span t-field="o.company_id.name"/>
pour un montant total de
<span t-field="o.total_amount_subscribed"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
euros.
<br/>
Le montant éligible pour le Tax shelter est de
<span t-field="o.total_amount_eligible"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
euros.
<br/>
</p>
<table class="table table-sm o_main_table" name="taxshelter_line_table">
<table class="table table-sm o_main_table"
name="taxshelter_line_table">
<thead>
<tr>
<th>Type</th>
@ -38,63 +52,133 @@
</thead>
<tbody class="invoice_tbody">
<tr t-foreach="o.previously_subscribed_lines" t-as="l">
<td><span t-field="l.type"/></td>
<td><span t-field="l.capital_before_sub"/></td>
<td><span t-field="l.capital_after_sub"/></td>
<td><span t-if="l.tax_shelter">Oui</span><span t-else="">Non</span></td>
<td><span t-field="l.transaction_date"/></td>
<td><span t-field="l.amount_subscribed"/></td>
<td><span t-field="l.amount_subscribed_eligible"/></td>
<td>
<span t-field="l.type"/>
</td>
<td>
<span t-field="l.capital_before_sub"/>
</td>
<td>
<span t-field="l.capital_after_sub"/>
</td>
<td>
<span t-if="l.tax_shelter">Oui</span>
<span t-else="">Non</span>
</td>
<td>
<span t-field="l.transaction_date"/>
</td>
<td>
<span t-field="l.amount_subscribed"/>
</td>
<td>
<span t-field="l.amount_subscribed_eligible"/>
</td>
</tr>
<tr t-foreach="o.subscribed_lines" t-as="l">
<td><span t-field="l.type"/></td>
<td><span t-field="l.capital_before_sub"/></td>
<td><span t-field="l.capital_after_sub"/></td>
<td><span t-if="l.tax_shelter">Oui</span><span t-else="">Non</span></td>
<td><span t-field="l.transaction_date"/></td>
<td><span t-field="l.amount_subscribed"/></td>
<td><span t-field="l.amount_subscribed_eligible"/></td>
<td>
<span t-field="l.type"/>
</td>
<td>
<span t-field="l.capital_before_sub"/>
</td>
<td>
<span t-field="l.capital_after_sub"/>
</td>
<td>
<span t-if="l.tax_shelter">Oui</span>
<span t-else="">Non</span>
</td>
<td>
<span t-field="l.transaction_date"/>
</td>
<td>
<span t-field="l.amount_subscribed"/>
</td>
<td>
<span t-field="l.amount_subscribed_eligible"/>
</td>
</tr>
</tbody>
</table>
<p>
L' Article 145/26, CIR 92 sur les revenus <span t-field="o.declaration_id.fiscal_year"/>, connu aussi comme normative Tax Shelter, donnent droit à une réduction d’impôt à hauteur de &#160;<span t-field="o.declaration_id.tax_shelter_percentage"/> du montant de la valeur des parts souscrites depuis <span t-field="o.declaration_id.month_from"/> (et avant <span t-field="o.declaration_id.month_to"/> pour la déclaration des revenus &#160;<span t-field="o.declaration_id.fiscal_year"/>).
L' Article 145/26, CIR 92 sur les revenus<span
t-field="o.declaration_id.fiscal_year"/>, connu aussi
comme normative Tax Shelter, donnent droit à une réduction
d’impôt à hauteur de &#160;<span
t-field="o.declaration_id.tax_shelter_percentage"/>
du montant de la valeur des parts souscrites depuis
<span t-field="o.declaration_id.month_from"/>
(et avant
<span t-field="o.declaration_id.month_to"/>
pour la déclaration des revenus &#160;<span
t-field="o.declaration_id.fiscal_year"/>).
</p>
<p>
Cette lettre vaut donc comme certificat que <span t-field="o.company_id.name"/> remplit en effet tous les critères permettant un tel avantage fiscal. Dans les grandes lignes il faut être une micro-entreprise n’ayant encore jamais distribué de dividende et qui n'est pas issue d’une fusion ou scission de sociétés et qui répond à au moins deux des trois critères suivants :
Cette lettre vaut donc comme certificat que
<span t-field="o.company_id.name"/>
remplit en effet tous les critères permettant un tel
avantage fiscal. Dans les grandes lignes il faut être une
micro-entreprise n’ayant encore jamais distribué de
dividende et qui n'est pas issue d’une fusion ou scission de
sociétés et qui répond à au moins deux des trois critères
suivants :
<ul>
<li>le total du bilan est inférieur ou égal à 350.000 euros ;</li>
<li>le chiffre d’affaires, hors taxe sur la valeur ajoutée, est inférieur ou égal à 700.000 euros ;</li>
<li>la moyenne des travailleurs occupés pendant l’année est inférieure ou égale à 10.</li>
<li>le total du bilan est inférieur ou égal à 350.000
euros ;
</li>
<li>le chiffre d’affaires, hors taxe sur la valeur
ajoutée, est inférieur ou égal à 700.000 euros ;
</li>
<li>la moyenne des travailleurs occupés pendant l’année
est inférieure ou égale à 10.
</li>
</ul>
</p>
<p>
Le maintien de la réduction d’impôt n’est possible que si l'investisseur conserve les parts de la coopérative pendant 4 ans au minimum, sauf si la sortie est imposée par des conditions extérieures (telles que la faillite, par exemple). En cas de sortie volontaire avant la période de 4 ans, l’avantage fiscal devra être remboursé au prorata du nombre de mois entre la sortie et les 4 ans. La coopérative s’engage à fournir pour chacune des quatre années suivant l’année d’acquisition une attestation certifiant que ces parts sont toujours en possession du souscripteur.
Le maintien de la réduction d’impôt n’est possible que si
l'investisseur conserve les parts de la coopérative pendant
4 ans au minimum, sauf si la sortie est imposée par des
conditions extérieures (telles que la faillite, par
exemple). En cas de sortie volontaire avant la période de 4
ans, l’avantage fiscal devra être remboursé au prorata du
nombre de mois entre la sortie et les 4 ans. La coopérative
s’engage à fournir pour chacune des quatre années suivant
l’année d’acquisition une attestation certifiant que ces
parts sont toujours en possession du souscripteur.
</p>
<p>
L’apport de capitaux par le chef d’entreprise lui-même ou par des administrateurs existants de la société ne permet pas de bénéficier du tax shelter.
L’apport de capitaux par le chef d’entreprise lui-même ou
par des administrateurs existants de la société ne permet
pas de bénéficier du tax shelter.
</p>
<p>
Pour bénéficier de la réduction d’impôts, vous pouvez joindre cette lettre à votre déclaration fiscale pour les revenus <span t-field="o.declaration_id.fiscal_year"/>.
Pour bénéficier de la réduction d’impôts, vous pouvez
joindre cette lettre à votre déclaration fiscale pour les
revenus<span t-field="o.declaration_id.fiscal_year"/>.
</p>
<p>
Pour toute information complémentaire, consultez le texte de l’Arrêté Royale.
Pour toute information complémentaire, consultez le texte de
l’Arrêté Royale.
</p>
<p>
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>,<br/>
<strong t-field="o.company_id.board_representative"/><br/>
Pour le Conseil d'administration de<span
t-field="o.company_id.name"/>,
<br/>
<strong t-field="o.company_id.board_representative"/>
<br/>
<img t-if="o.company_id.signature_scan"
t-attf-class="mt16"
t-attf-style="{{ 'min-height: 50px; max-height: 100px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"
/>
t-attf-class="mt16"
t-attf-style="{{ 'min-height: 50px; max-height: 100px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"
/>
</p>
</div>
</t>
@ -103,7 +187,8 @@
<template id="tax_shelter_subscription_report">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_subscription_document" t-lang="o.partner_id.lang"/>
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_subscription_document"
t-lang="o.partner_id.lang"/>
</t>
</t>
</template>

44
easy_my_coop_taxshelter_report/views/tax_shelter_declaration_view.xml

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem name="Declaration" id="menu_easy_my_coop_main_declaration" parent="easy_my_coop.menu_main_easy_my_coop" sequence="10"/>
<menuitem name="Declaration" id="menu_easy_my_coop_main_declaration"
parent="easy_my_coop.menu_main_easy_my_coop" sequence="10"/>
<record id="tax_shelter_declaration_form" model="ir.ui.view">
<field name="name">tax.shelter.declaration.form</field>
@ -8,9 +9,17 @@
<field name="arch" type="xml">
<form string="Tax shelter declaration">
<header>
<button name="compute_declaration" string="Process Declaration" type="object" states="draft" class="oe_highlight" groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="validate_declaration" string="Validate Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="reset_declaration" string="Reset Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="compute_declaration"
string="Process Declaration" type="object"
states="draft" class="oe_highlight"
groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="validate_declaration"
string="Validate Declaration" type="object"
states="computed"
groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="reset_declaration" string="Reset Declaration"
type="object" states="computed"
groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
@ -35,9 +44,13 @@
<tree>
<field name="partner_id"/>
<field name="cooperator_number"/>
<field name="total_amount" sum="Total amount"/>
<field name="total_amount"
sum="Total amount"/>
<field name="state"/>
<button type="object" name="send_certificates" icon="STOCK_MEDIA_PLAY" string="Send Certificates"/>
<button type="object"
name="send_certificates"
icon="STOCK_MEDIA_PLAY"
string="Send Certificates"/>
</tree>
</field>
</page>
@ -72,7 +85,10 @@
<field name="view_id" ref="tax_shelter_declaration_tree"/>
</record>
<menuitem action="tax_shelter_declaration_action" name="Tax Shelter Declaration" id="menu_tax_shelter_declaration" parent="menu_easy_my_coop_main_declaration" sequence="10" groups="easy_my_coop.group_easy_my_coop_user"/>
<menuitem action="tax_shelter_declaration_action"
name="Tax Shelter Declaration" id="menu_tax_shelter_declaration"
parent="menu_easy_my_coop_main_declaration" sequence="10"
groups="easy_my_coop.group_easy_my_coop_user"/>
<record id="tax_shelter_certificate_form" model="ir.ui.view">
<field name="name">tax.shelter.certificate.form</field>
@ -80,9 +96,12 @@
<field name="arch" type="xml">
<form string="Tax shelter certificate">
<header>
<button type="object" name="print_subscription_certificate" string="Print Subscription Certificate" />
<button type="object" name="print_shares_certificate" string="Print Shares Certificate" />
<button type="object" name="send_certificates" string="Send Certificates"/>
<button type="object" name="print_subscription_certificate"
string="Print Subscription Certificate"/>
<button type="object" name="print_shares_certificate"
string="Print Shares Certificate"/>
<button type="object" name="send_certificates"
string="Send Certificates"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
@ -195,5 +214,8 @@
<field name="view_id" ref="tax_shelter_certificate_tree"/>
</record>
<menuitem action="tax_shelter_certificate_action" name="Tax Shelter Certificates" id="menu_tax_shelter_certificate" parent="menu_easy_my_coop_main_declaration" sequence="20" groups="easy_my_coop.group_easy_my_coop_user"/>
<menuitem action="tax_shelter_certificate_action"
name="Tax Shelter Certificates" id="menu_tax_shelter_certificate"
parent="menu_easy_my_coop_main_declaration" sequence="20"
groups="easy_my_coop.group_easy_my_coop_user"/>
</odoo>

1690
easy_my_coop_website/views/subscription_template.xml
File diff suppressed because it is too large
View File

348
easy_my_coop_website_portal/views/easy_my_coop_website_portal_templates.xml

@ -6,136 +6,155 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<template id="portal_my_details_emc" inherit_id="portal.portal_my_details" name="Portal user details">
<template id="portal_my_details_emc" inherit_id="portal.portal_my_details"
name="Portal user details">
<input name="name" position="attributes">
<attribute name="t-att-readonly">True</attribute>
<attribute name="t-att-readonly">True</attribute>
</input>
<input name="email" position="attributes">
<attribute name="t-att-readonly">True</attribute>
<attribute name="t-att-readonly">True</attribute>
</input>
<xpath expr="//input[@name='phone']/.." position="after">
<div t-attf-class="form-group #{error.get('gender') and 'o_has_error' or ''} col-xl-6">
<xpath expr="//input[@name='phone']/.." position="after">
<div t-attf-class="form-group #{error.get('gender') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="gender">Gender</label>
<select name="gender" t-attf-class="form-control #{error.get('gender') or ''}">
<select name="gender"
t-attf-class="form-control #{error.get('gender') or ''}">
<option value=""></option>
<t t-foreach="genders or []" t-as="item">
<option t-att-value="item[0]" t-att-selected="item[0] == partner.gender">
<t t-esc="item[1]" />
<option t-att-value="item[0]"
t-att-selected="item[0] == partner.gender">
<t t-esc="item[1]"/>
</option>
</t>
</select>
</div>
<div t-attf-class="form-group #{error.get('birthdate_date') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="birthdate_date">Birthdate</label>
<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" />
</div>
<div t-attf-class="form-group #{error.get('iban') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="iban">Iban</label>
<input type="input" name="iban" t-attf-class="form-control #{error.get('iban') or ''}" t-att-value="iban" />
</div>
<div t-attf-class="form-group #{error.get('birthdate_date') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="birthdate_date">Birthdate
</label>
<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"/>
</div>
<div t-attf-class="form-group #{error.get('iban') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="iban">Iban</label>
<input type="input" name="iban"
t-attf-class="form-control #{error.get('iban') or ''}"
t-att-value="iban"/>
</div>
</xpath>
</template>
</template>
<!-- Add cooperator information -->
<template
id="website_portal_details_form"
name="Website Portal Details Form"
inherit_id="portal.portal_layout">
<xpath expr="//div[@class='o_portal_my_details']" position="after">
<div class="o_my_details_coop" t-if="coop.member">
<h3 class="page-header">Your Cooperator Details</h3>
<p class="text-center">
<span t-if="coop.member">
You are an effective cooperator
</span>
<span t-if="not coop.member">
You are not a cooperator
</span>
</p>
<p t-if="coop.cooperator_register_number">
<label>Cooperator Number: </label>
<t t-esc="coop.cooperator_register_number"/>
</p>
<p t-if="coop.effective_date">
<label>Cooperator Entrance Date: </label>
<span t-field="coop.effective_date"/>
</p>
<p t-if="coop.number_of_share">
<label>Number of Share: </label>
<t t-esc="coop.number_of_share"/>
</p>
<p t-if="coop.share_ids">
<div t-foreach="coop.share_ids" t-as="share">
<span t-field="share.effective_date"/>:
<t t-esc="share.share_number"/> x
<t t-esc="share.share_short_name"/>
(<span t-field="share.share_unit_price"
t-field-options='{
<!-- Add cooperator information -->
<template
id="website_portal_details_form"
name="Website Portal Details Form"
inherit_id="portal.portal_layout">
<xpath expr="//div[@class='o_portal_my_details']" position="after">
<div class="o_my_details_coop" t-if="coop.member">
<h3 class="page-header">Your Cooperator Details</h3>
<p class="text-center">
<span t-if="coop.member">
You are an effective cooperator
</span>
<span t-if="not coop.member">
You are not a cooperator
</span>
</p>
<p t-if="coop.cooperator_register_number">
<label>Cooperator Number:</label>
<t t-esc="coop.cooperator_register_number"/>
</p>
<p t-if="coop.effective_date">
<label>Cooperator Entrance Date:</label>
<span t-field="coop.effective_date"/>
</p>
<p t-if="coop.number_of_share">
<label>Number of Share:</label>
<t t-esc="coop.number_of_share"/>
</p>
<p t-if="coop.share_ids">
<div t-foreach="coop.share_ids" t-as="share">
<span t-field="share.effective_date"/>:
<t t-esc="share.share_number"/>
x
<t t-esc="share.share_short_name"/>
(<span t-field="share.share_unit_price"
t-field-options='{
"widget": "monetary",
"display_currency": "coop.company_id.currency_id"
}'/>) -
<span t-field="share.total_amount_line"
t-field-options='{
<span t-field="share.total_amount_line"
t-field-options='{
"widget": "monetary",
"display_currency": "coop.company_id.currency_id"
}'/>
</div>
</p>
<p t-if="coop.total_value">
<label>Total Value of Share: </label>
<span t-field="coop.total_value"
t-field-options='{
</div>
</p>
<p t-if="coop.total_value">
<label>Total Value of Share:</label>
<span t-field="coop.total_value"
t-field-options='{
"widget": "monetary",
"display_currency": "coop.company_id.currency_id"
}'/>
</p>
</p>
<p t-if="coop.gender">
<label>Gender: </label>
<t t-esc="coop.gender"/>
</p>
<p t-if="coop.birthdate_date">
<label>Date of Birth: </label>
<t t-esc="coop.birthdate_date"/>
</p>
<p t-if="coop_bank and coop_bank.acc_number">
<label>Bank Account: </label>
<t t-esc="coop_bank.acc_number"/>
</p>
<p t-if="coop.is_company and coop.company_register_number">
<label>Company Register Number: </label>
<t t-esc="coop.company_register_number"/>
</p>
<p t-if="coop.is_company and coop.representative">
<label>Legal Representative: </label>
<t t-esc="coop.representative"/>
</p>
<p class="text-center">
<a href="/my/cooperator_certificate/pdf" class="btn btn-default">
Cooperator Certificate
</a>
</p>
</div>
</xpath>
</template>
<p t-if="coop.gender">
<label>Gender:</label>
<t t-esc="coop.gender"/>
</p>
<p t-if="coop.birthdate_date">
<label>Date of Birth:</label>
<t t-esc="coop.birthdate_date"/>
</p>
<p t-if="coop_bank and coop_bank.acc_number">
<label>Bank Account:</label>
<t t-esc="coop_bank.acc_number"/>
</p>
<p t-if="coop.is_company and coop.company_register_number">
<label>Company Register Number:</label>
<t t-esc="coop.company_register_number"/>
</p>
<p t-if="coop.is_company and coop.representative">
<label>Legal Representative:</label>
<t t-esc="coop.representative"/>
</p>
<p class="text-center">
<a href="/my/cooperator_certificate/pdf"
class="btn btn-default">
Cooperator Certificate
</a>
</p>
</div>
</xpath>
</template>
<template id="portal_my_home_menu_capital_request" name="Portal layout : capital request menu entries" inherit_id="portal.portal_breadcrumbs" priority="30">
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
<li t-if="page_name == 'capital request'" t-attf-class="breadcrumb-item #{'active ' if not capital_requests else ''}">
<a t-if="capital_request" t-attf-href="/my/release_capital_request?{{ keep_query() }}">Capital Request</a>
<t t-else="">Capital Request</t>
</li>
<li t-if="capital_request" class="breadcrumb-item active">
<t t-esc="capital_request.number" t-if="capital_request.number"/>
<t t-else=""><em>Draft Request</em></t>
</li>
</xpath>
</template>
<template id="portal_my_home_menu_capital_request"
name="Portal layout : capital request menu entries"
inherit_id="portal.portal_breadcrumbs" priority="30">
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
<li t-if="page_name == 'capital request'"
t-attf-class="breadcrumb-item #{'active ' if not capital_requests else ''}">
<a t-if="capital_request"
t-attf-href="/my/release_capital_request?{{ keep_query() }}">
Capital Request
</a>
<t t-else="">Capital Request</t>
</li>
<li t-if="capital_request" class="breadcrumb-item active">
<t t-esc="capital_request.number"
t-if="capital_request.number"/>
<t t-else="">
<em>Draft Request</em>
</t>
</li>
</xpath>
</template>
<template id="portal_my_home_capital_release"
name="Portal My Home : Easy My Coop Capital Release Requests"
inherit_id="portal.portal_my_home" priority="30">
<template id="portal_my_home_capital_release"
name="Portal My Home : Easy My Coop Capital Release Requests"
inherit_id="portal.portal_my_home" priority="30">
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
<t t-if="capital_request_count" t-call="portal.portal_docs_entry">
<t t-set="title">Your Release Capital Requests</t>
@ -146,54 +165,83 @@
</template>
<template id="portal_my_capital_releases" name="My Capital Releases">
<t t-call="portal.portal_layout">
<t t-set="breadcrumbs_searchbar" t-value="True"/>
<t t-call="portal.portal_layout">
<t t-set="breadcrumbs_searchbar" t-value="True"/>
<t t-call="portal.portal_searchbar">
<t t-set="title">My Capital Releases</t>
</t>
<t t-if="not capital_requests">
<p>There are currently no capital release request for your
account.
</p>
</t>
<t t-if="capital_requests" t-call="portal.portal_table">
<thead>
<tr class="active">
<th>Request #</th>
<th>Request Date</th>
<th class='d-none d-md-table-cell'>Due Date</th>
<th/>
<th class="text-right">Amount Due</th>
</tr>
</thead>
<tbody>
<t t-foreach="capital_requests" t-as="capital_request">
<tr>
<td>
<a t-att-href="capital_request.get_portal_url()" t-att-title="capital_request.number">
<t t-esc="capital_request.number" t-if="capital_request.number"/>
<em t-else="">Draft Request</em>
</a>
</td>
<td><span t-field="capital_request.date_invoice"/></td>
<td class='d-none d-md-table-cell'><span t-field="capital_request.date_due"/></td>
<td class="tx_status">
<t t-if="capital_request.state == 'open'">
<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>
</t>
<t t-if="capital_request.state == 'paid'">
<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>
</t>
<t t-if="capital_request.state == 'cancel'">
<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>
</t>
</td>
<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>
<t t-call="portal.portal_searchbar">
<t t-set="title">My Capital Releases</t>
</t>
<t t-if="not capital_requests">
<p>There are currently no capital release request for your
account.
</p>
</t>
<t t-if="capital_requests" t-call="portal.portal_table">
<thead>
<tr class="active">
<th>Request #</th>
<th>Request Date</th>
<th class='d-none d-md-table-cell'>Due Date</th>
<th/>
<th class="text-right">Amount Due</th>
</tr>
</t>
</tbody>
</thead>
<tbody>
<t t-foreach="capital_requests" t-as="capital_request">
<tr>
<td>
<a t-att-href="capital_request.get_portal_url()"
t-att-title="capital_request.number">
<t t-esc="capital_request.number"
t-if="capital_request.number"/>
<em t-else="">Draft Request</em>
</a>
</td>
<td>
<span t-field="capital_request.date_invoice"/>
</td>
<td class='d-none d-md-table-cell'>
<span t-field="capital_request.date_due"/>
</td>
<td class="tx_status">
<t t-if="capital_request.state == 'open'">
<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>
</t>
<t t-if="capital_request.state == 'paid'">
<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>
</t>
<t t-if="capital_request.state == 'cancel'">
<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>
</t>
</td>
<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>
</tr>
</t>
</tbody>
</t>
</t>
</t>
</template>
</odoo>

179
easy_my_coop_website_taxshelter/views/easy_my_coop_website_taxshelter_templates.xml

@ -7,101 +7,102 @@
-->
<openerp>
<!-- Tax Shelter Certificate in the menu -->
<template
id="portal_my_home_menu_tax_shelter"
name="Portal Menu: Easy My Coop Tax Shelter Certificate"
inherit_id="website_portal_v10.portal_layout"
priority="25">
<xpath expr="//ul[contains(@class,'o_portal_submenu')]"
position="inside">
<li>
<a href="/my/tax_shelter_certificate">
Tax Shelter Certificate
</a>
</li>
</xpath>
</template>
<!-- Tax Shelter Certificate in the menu -->
<template
id="portal_my_home_menu_tax_shelter"
name="Portal Menu: Easy My Coop Tax Shelter Certificate"
inherit_id="website_portal_v10.portal_layout"
priority="25">
<xpath expr="//ul[contains(@class,'o_portal_submenu')]"
position="inside">
<li>
<a href="/my/tax_shelter_certificate">
Tax Shelter Certificate
</a>
</li>
</xpath>
</template>
<!-- Tax Shelter Certificate on the main page -->
<template
id="portal_my_home_tax_shelter"
name="Portal My Home : Easy My Coop Tax Shelter Certificate"
inherit_id="website_portal_v10.portal_my_home"
priority="25">
<xpath expr="//div[contains(@class,'o_my_home_content')]"
position="inside">
<h3 class="page-header">
<a href="/my/tax_shelter_certificate">
Your Tax Shelter Certificate
<small class="ml8">
<t t-if="tax_shelter_count">
<span class='badge'>
<t t-esc="tax_shelter_count"/>
</span>
</t>
<t t-if="not tax_shelter_count">
There are currently no tax shelter certificate for your
account.
</t>
</small>
</a>
</h3>
</xpath>
</template>
<!-- Tax Shelter Certificate on the main page -->
<template
id="portal_my_home_tax_shelter"
name="Portal My Home : Easy My Coop Tax Shelter Certificate"
inherit_id="website_portal_v10.portal_my_home"
priority="25">
<xpath expr="//div[contains(@class,'o_my_home_content')]"
position="inside">
<h3 class="page-header">
<a href="/my/tax_shelter_certificate">
Your Tax Shelter Certificate
<small class="ml8">
<t t-if="tax_shelter_count">
<span class='badge'>
<t t-esc="tax_shelter_count"/>
</span>
</t>
<t t-if="not tax_shelter_count">
There are currently no tax shelter certificate for
your
account.
</t>
</small>
</a>
</h3>
</xpath>
</template>
<!-- Tax Shelter Certificate page -->
<template id="portal_my_tax_shelter" name="My Tax Shelter">
<t t-call="website_portal_v10.portal_layout">
<h3 class="page-header">Your Tax Shelter Certificate</h3>
<t t-if="not tax_shelters">
<p>
There are currently no tax shelter certificate for your
account.
</p>
</t>
<t t-if="tax_shelters">
<table class="table table-hover o_my_status_table">
<thead>
<tr class="active">
<th>Declaration Year</th>
<th>Tax Shelter Certificate</th>
<th>Share Certificate</th>
<th>Total Amount</th>
</tr>
</thead>
<tbody>
<tr t-foreach="tax_shelters" t-as="tax_shelter">
<td>
<t t-esc="tax_shelter.declaration_id.name"/>
</td>
<td>
<a t-att-href="'/my/taxshelter_certificate/pdf/%s'
<!-- Tax Shelter Certificate page -->
<template id="portal_my_tax_shelter" name="My Tax Shelter">
<t t-call="website_portal_v10.portal_layout">
<h3 class="page-header">Your Tax Shelter Certificate</h3>
<t t-if="not tax_shelters">
<p>
There are currently no tax shelter certificate for your
account.
</p>
</t>
<t t-if="tax_shelters">
<table class="table table-hover o_my_status_table">
<thead>
<tr class="active">
<th>Declaration Year</th>
<th>Tax Shelter Certificate</th>
<th>Share Certificate</th>
<th>Total Amount</th>
</tr>
</thead>
<tbody>
<tr t-foreach="tax_shelters" t-as="tax_shelter">
<td>
<t t-esc="tax_shelter.declaration_id.name"/>
</td>
<td>
<a t-att-href="'/my/taxshelter_certificate/pdf/%s'
% tax_shelter.id">
Tax Shelter Certificate
</a>
</td>
<td>
<a t-att-href="'/my/share_certificate/pdf/%s'
Tax Shelter Certificate
</a>
</td>
<td>
<a t-att-href="'/my/share_certificate/pdf/%s'
% tax_shelter.id">
Share Certificate
</a>
</td>
<td>
<span t-field="tax_shelter.total_amount"
t-field-options='{
Share Certificate
</a>
</td>
<td>
<span t-field="tax_shelter.total_amount"
t-field-options='{
"widget": "monetary",
"display_currency": "tax_shelter.partner_id.company_id.currency_id"
}'/>
</td>
</tr>
</tbody>
</table>
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="website.pager"/>
</div>
</t>
</t>
</template>
</td>
</tr>
</tbody>
</table>
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="website.pager"/>
</div>
</t>
</t>
</template>
</openerp>

27
partner_age/view/partner_view.xml

@ -1,24 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_from_age" model="ir.ui.view">
<record id="view_partner_from_age" model="ir.ui.view">
<field name="name">res.partner.form.age</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="easy_my_coop.view_partner_form_easy_my_coop"/>
<field name="inherit_id"
ref="easy_my_coop.view_partner_form_easy_my_coop"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='birthdate_date']" position='after'>
<field name="age" attrs="{'invisible':[('is_company','=',True)]}"/>
<field name="age"
attrs="{'invisible':[('is_company','=',True)]}"/>
</xpath>
</field>
</record>
<record id="view_partner_tree_age" model="ir.ui.view">
<field name="name">res.partner.tree.easy_my_coop</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="easy_my_coop.view_partner_tree_easy_my_coop"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='cooperator_type']" position='after'>
<field name="age"/>
</xpath>
</field>
</record>
<field name="name">res.partner.tree.easy_my_coop</field>
<field name="model">res.partner</field>
<field name="inherit_id"
ref="easy_my_coop.view_partner_tree_easy_my_coop"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='cooperator_type']" position='after'>
<field name="age"/>
</xpath>
</field>
</record>
</odoo>

375
theme_light/report/header_report_G002.xml

@ -1,189 +1,216 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="theme_light.invoice_header_G002">
<table style="width: 100%;font-size:10px">
<tr height="30px">
<td style="width:20%;padding-right:15px" rowspan="4">
<img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="max-height: 100px;"/>
</td>
<td style="width:29%"></td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/location_green.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/phone_green.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/www_green.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
</tr>
<template id="theme_light.invoice_header_G002">
<table style="width: 100%;font-size:10px">
<tr height="30px">
<td style="width:20%;padding-right:15px" rowspan="4">
<img t-if="o.company_id.logo"
t-att-src="'data:image/png;base64,%s' % o.company_id.logo"
style="max-height: 100px;"/>
</td>
<td style="width:29%"></td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/location_green.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/phone_green.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/www_green.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
</tr>
<tr height="20px">
<td style="font-size:14px"></td>
<td>
<span t-field="o.company_id.partner_id.street"/>
</td>
<td>
<span>Phone</span>
<span t-field="o.company_id.partner_id.phone"/>
</td>
<td>
<span t-field="o.company_id.partner_id.website"/>
</td>
</tr>
<tr height="20px">
<td style="font-size:14px"></td>
<td>
<span t-field="o.company_id.partner_id.street"/>
</td>
<td>
<span>Phone</span>
<span t-field="o.company_id.partner_id.phone"/>
</td>
<td>
<span t-field="o.company_id.partner_id.website"/>
</td>
</tr>
<tr style="vertical-align:top" height="20px">
<td style="vertical-align:middle"></td>
<td style="vertical-align:middle">
<span t-field="o.company_id.partner_id.zip"/> -
<span t-field="o.company_id.partner_id.city"/>
</td>
<td style="vertical-align:middle">
<span>Fax</span>
<span t-field="o.company_id.partner_id.fax"/>
</td>
</tr>
<tr>
<tr style="vertical-align:top" height="20px">
<td style="vertical-align:middle"></td>
<td style="vertical-align:middle">
<span t-field="o.company_id.partner_id.zip"/>
-
<span t-field="o.company_id.partner_id.city"/>
</td>
<td style="vertical-align:middle">
<span>Fax</span>
<span t-field="o.company_id.partner_id.fax"/>
</td>
</tr>
<tr>
<td></td>
<td style="vertical-align:top">
<span t-field="o.company_id.partner_id.country_id.name"/>
</td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="margin-left:10px" t-field="o.company_id.rml_header1"/> </td>
<td style="vertical-align:bottom">
<span t-field="o.company_id.partner_id.vat"/>
</td>
<td></td>
<td></td>
</tr>
</table>
</template>
<td></td>
<td style="vertical-align:top">
<span t-field="o.company_id.partner_id.country_id.name"/>
</td>
<td></td>
</tr>
<tr>
<td colspan="2">
<span style="margin-left:10px"
t-field="o.company_id.rml_header1"/>
</td>
<td style="vertical-align:bottom">
<span t-field="o.company_id.partner_id.vat"/>
</td>
<td></td>
<td></td>
</tr>
</table>
</template>
<template id="theme_light.invoice_header_P002">
<template id="theme_light.invoice_header_P002">
<table style="width: 100%;font-size:10px">
<tr height="30px">
<td style="width:20%;padding-right:15px" rowspan="4">
<img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="max-height: 100px;"/>
</td>
<td style="width:29%"></td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/location_purple.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/phone_purple.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/www_purple.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
</tr>
<table style="width: 100%;font-size:10px">
<tr height="30px">
<td style="width:20%;padding-right:15px" rowspan="4">
<img t-if="o.company_id.logo"
t-att-src="'data:image/png;base64,%s' % o.company_id.logo"
style="max-height: 100px;"/>
</td>
<td style="width:29%"></td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/location_purple.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/phone_purple.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/www_purple.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
</tr>
<tr height="20px">
<td style="font-size:14px"></td>
<td>
<span t-field="o.company_id.partner_id.street"/>
</td>
<td>
<span>Phone</span>
<span t-field="o.company_id.partner_id.phone"/>
</td>
<td>
<span t-field="o.company_id.partner_id.website"/>
</td>
</tr>
<tr height="20px">
<td style="font-size:14px"></td>
<td>
<span t-field="o.company_id.partner_id.street"/>
</td>
<td>
<span>Phone</span>
<span t-field="o.company_id.partner_id.phone"/>
</td>
<td>
<span t-field="o.company_id.partner_id.website"/>
</td>
</tr>
<tr style="vertical-align:top" height="20px">
<td style="vertical-align:middle"></td>
<td style="vertical-align:middle">
<span t-field="o.company_id.partner_id.zip"/> -
<span t-field="o.company_id.partner_id.city"/>
</td>
<td style="vertical-align:middle">
<span>Fax</span>
<span t-field="o.company_id.partner_id.fax"/>
</td>
</tr>
<tr>
<tr style="vertical-align:top" height="20px">
<td style="vertical-align:middle"></td>
<td style="vertical-align:middle">
<span t-field="o.company_id.partner_id.zip"/>
-
<span t-field="o.company_id.partner_id.city"/>
</td>
<td style="vertical-align:middle">
<span>Fax</span>
<span t-field="o.company_id.partner_id.fax"/>
</td>
</tr>
<tr>
<td></td>
<td style="vertical-align:top">
<span t-field="o.company_id.partner_id.country_id.name"/>
</td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="margin-left:10px" t-field="o.company_id.rml_header1"/> </td>
<td style="vertical-align:bottom">
<span t-field="o.company_id.partner_id.vat"/>
</td>
<td></td>
<td></td>
</tr>
</table>
</template>
<td></td>
<td style="vertical-align:top">
<span t-field="o.company_id.partner_id.country_id.name"/>
</td>
<td></td>
</tr>
<tr>
<td colspan="2">
<span style="margin-left:10px"
t-field="o.company_id.rml_header1"/>
</td>
<td style="vertical-align:bottom">
<span t-field="o.company_id.partner_id.vat"/>
</td>
<td></td>
<td></td>
</tr>
</table>
</template>
<template id="theme_light.list_header_G002">
<table style="width: 100%;font-size:10px">
<tr height="30px">
<td style="width:20%;padding-right:15px" rowspan="4">
<img t-if="res_company.logo" t-att-src="'data:image/png;base64,%s' % res_company.logo" style="max-height: 100px;"/>
</td>
<td style="width:29%"></td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/location_green.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/phone_green.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/www_green.png" style="max-height: 30px;padding-bottom:10px"/>
</td>
</tr>
<template id="theme_light.list_header_G002">
<table style="width: 100%;font-size:10px">
<tr height="30px">
<td style="width:20%;padding-right:15px" rowspan="4">
<img t-if="res_company.logo"
t-att-src="'data:image/png;base64,%s' % res_company.logo"
style="max-height: 100px;"/>
</td>
<td style="width:29%"></td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/location_green.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/phone_green.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
<td style='width:17%'>
<img src="theme_light/static/img/gallery/www_green.png"
style="max-height: 30px;padding-bottom:10px"/>
</td>
</tr>
<tr height="20px">
<td style="font-size:14px"></td>
<td>
<span t-field="res_company.partner_id.street"/>
</td>
<td>
<span>Phone</span>
<span t-field="res_company.partner_id.phone"/>
</td>
<td>
<span t-field="res_company.partner_id.website"/>
</td>
</tr>
<tr height="20px">
<td style="font-size:14px"></td>
<td>
<span t-field="res_company.partner_id.street"/>
</td>
<td>
<span>Phone</span>
<span t-field="res_company.partner_id.phone"/>
</td>
<td>
<span t-field="res_company.partner_id.website"/>
</td>
</tr>
<tr style="vertical-align:top" height="20px">
<td style="vertical-align:middle"></td>
<td style="vertical-align:middle">
<span t-field="res_company.partner_id.zip"/> -
<span t-field="res_company.partner_id.city"/>
</td>
<td style="vertical-align:middle">
<span>Fax</span>
<span t-field="res_company.partner_id.fax"/>
</td>
</tr>
<tr>
<tr style="vertical-align:top" height="20px">
<td style="vertical-align:middle"></td>
<td style="vertical-align:middle">
<span t-field="res_company.partner_id.zip"/>
-
<span t-field="res_company.partner_id.city"/>
</td>
<td style="vertical-align:middle">
<span>Fax</span>
<span t-field="res_company.partner_id.fax"/>
</td>
</tr>
<tr>
<td></td>
<td style="vertical-align:top">
<span t-field="res_company.partner_id.country_id.name"/>
</td>
<td></td>
</tr>
<tr>
<td colspan="2"><span style="margin-left:10px" t-field="res_company.rml_header1"/> </td>
<td style="vertical-align:bottom">
<span t-field="res_company.partner_id.vat"/>
</td>
<td></td>
<td></td>
</tr>
</table>
</template>
<td></td>
<td style="vertical-align:top">
<span t-field="res_company.partner_id.country_id.name"/>
</td>
<td></td>
</tr>
<tr>
<td colspan="2">
<span style="margin-left:10px"
t-field="res_company.rml_header1"/>
</td>
<td style="vertical-align:bottom">
<span t-field="res_company.partner_id.vat"/>
</td>
<td></td>
<td></td>
</tr>
</table>
</template>
</odoo>

417
theme_light/views/layout_template.xml

@ -1,205 +1,244 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- ****************** POUR IMPRESSION FACTURE **************** -->
<template id="theme_light.layout" inherit_id="web.layout" primary="True">
<!-- Add report attributes -->
<xpath expr="//html" position="attributes">
<attribute name="t-att-data-report-margin-top">data_report_margin_top if data_report_margin_top else None</attribute>
<attribute name="t-att-data-report-header-spacing">data_report_header_spacing if data_report_header_spacing else None</attribute>
<attribute name="t-att-data-report-dpi">data_report_dpi if data_report_dpi else None</attribute>
</xpath>
<!-- Add report style -->
<xpath expr="//head" position="inside">
<link href="/web/static/lib/bootstrap/css/bootstrap.css" rel="stylesheet"/>
<link href="/website/static/src/css/website.css" rel="stylesheet"/>
<link href="/web/static/lib/fontawesome/css/font-awesome.css" rel="stylesheet"/>
<link href="/theme_light/static/css/invoice_orange.css" rel="stylesheet"/>
<style type="text/css">
<t t-call="theme_light.style"/>
</style>
</xpath>
</template>
<!-- ****************** POUR IMPRESSION FACTURE **************** -->
<template id="theme_light.layout" inherit_id="web.layout" primary="True">
<!-- Add report attributes -->
<xpath expr="//html" position="attributes">
<attribute name="t-att-data-report-margin-top">
data_report_margin_top if data_report_margin_top else None
</attribute>
<attribute name="t-att-data-report-header-spacing">
data_report_header_spacing if data_report_header_spacing else
None
</attribute>
<attribute name="t-att-data-report-dpi">data_report_dpi if
data_report_dpi else None
</attribute>
</xpath>
<!-- Add report style -->
<xpath expr="//head" position="inside">
<link href="/web/static/lib/bootstrap/css/bootstrap.css"
rel="stylesheet"/>
<link href="/website/static/src/css/website.css" rel="stylesheet"/>
<link href="/web/static/lib/fontawesome/css/font-awesome.css"
rel="stylesheet"/>
<link href="/theme_light/static/css/invoice_orange.css"
rel="stylesheet"/>
<style type="text/css">
<t t-call="theme_light.style"/>
</style>
</xpath>
</template>
<!-- CSS -->
<template id="style">
/* Montserrat */
@font-face {
font-family: 'Montserrat-Regular';
font-style: normal;
src: local('Montserrat Regular'), url('/theme_light/static/font/Montserrat-Regular.ttf') format('truetype');
}
/* Roboto Regular */
@font-face {
font-family: 'Roboto-Regular';
font-style: normal;
src: local('Roboto Regular'), url('/theme_light/static/font/Roboto-Regular.ttf') format('truetype');
}
/* Roboto Bold */
@font-face {
font-family: 'Roboto-Bold';
font-style: normal;
src: local('Roboto Bold'), url('/theme_light/static/font/Roboto-Bold.ttf') format('truetype');
}
/* BEBASNEUE Bold */
@font-face {
font-family: 'Bebasneue-Bold';
font-style: normal;
src: local('Bebasneue-Bold'), url('/theme_light/static/font/BEBASNEUE_BOLD.ttf') format('truetype');
}
</template>
<!-- CSS -->
<template id="style">
/* Montserrat */
@font-face {
font-family: 'Montserrat-Regular';
font-style: normal;
src: local('Montserrat Regular'),
url('/theme_light/static/font/Montserrat-Regular.ttf')
format('truetype');
}
/* Roboto Regular */
@font-face {
font-family: 'Roboto-Regular';
font-style: normal;
src: local('Roboto Regular'),
url('/theme_light/static/font/Roboto-Regular.ttf') format('truetype');
}
/* Roboto Bold */
@font-face {
font-family: 'Roboto-Bold';
font-style: normal;
src: local('Roboto Bold'),
url('/theme_light/static/font/Roboto-Bold.ttf') format('truetype');
}
/* BEBASNEUE Bold */
@font-face {
font-family: 'Bebasneue-Bold';
font-style: normal;
src: local('Bebasneue-Bold'),
url('/theme_light/static/font/BEBASNEUE_BOLD.ttf') format('truetype');
}
</template>
<template id="theme_light.html_container">
<t t-set="body_classname" t-value="'container'"/>
<t t-call="theme_light.layout">
<t t-raw="0"/>
</t>
</template>
<template id="theme_light.html_container">
<t t-set="body_classname" t-value="'container'"/>
<t t-call="theme_light.layout">
<t t-raw="0"/>
</t>
</template>
<template id="theme_light.invoice_footer">
<div class="footer">
<table style="width: 100%;font-size:13;color:black;font-family:Roboto-Regular;text-align:center">
<tr style="height:20px;">
<td/>
<td/>
<t t-if="company.display_logo1">
<td rowspan="5" style="padding-left:15px;text-align:center;width:135px;border-left:1px solid #adadad" >
<img t-if="company.bottom_logo1" t-att-src="'data:image/png;base64,%s' % company.bottom_logo1" style="width:98px;height:auto;padding-bottom:5px;"/>
<img t-if="not company.bottom_logo1" src="/theme_light/static/img/gallery/label_fin.jpg" style="width:98px;height:auto;padding-bottom:5px;"/>
</td>
</t>
<t t-if="company.display_logo2">
<td rowspan="5" style="padding-left:15px;text-align:center;width:135px;border-left:1px solid #adadad" >
<img t-if="company.bottom_logo2" t-att-src="'data:image/png;base64,%s' % company.bottom_logo2" style="width:162px;height:auto;padding-bottom:5px;"/>
<img t-if="not company.bottom_logo2" src="/theme_light/static/img/gallery/cnc_agree.jpg" style="width:162px;height:auto;padding-bottom:5px;"/>
</td>
</t>
</tr>
<tr style="height:20px;">
<td style="align: left;">
<t t-if="company.rml_header1">
<span t-field="company.rml_header1"/> -
</t>
<b><span t-field="company.name"/></b>
</td>
<td/>
<td/>
<td/>
</tr>
<tr style="height:20px">
<td style="align: left;">
<span t-field="company.partner_id.street"/> -
<t t-if="company.partner_id.street2">
<span t-field="company.partner_id.street2"/> -
</t>
<span t-field="company.partner_id.zip"/>
<span t-field="company.partner_id.city"/>
</td>
<td/>
<td/>
<td/>
</tr>
<tr style="height:20px">
<td style="align: left;">
<t t-if="company.company_registry">
<span>N.Entr.</span> :
<span t-field="company.company_registry"/>
</t>
<t t-if="company.vat">
-
<span>VAT Number</span> :
<span t-field="company.vat"/>
</t>
<t t-foreach="o.company_id.bank_journal_ids" t-as="journal">
<t t-set="b" t-value="journal.bank_account_id"/>
<t t-if="journal.display_on_footer">
-
<span t-field="b.bank_name"/>
<span t-field="b.acc_number"/>
<span t-field="b.bank_bic"/>
</t>
</t>
</td>
<td/>
<td/>
<td/>
</tr>
</table>
</div>
</template>
<template id="theme_light.invoice_footer">
<div class="footer">
<table style="width: 100%;font-size:13;color:black;font-family:Roboto-Regular;text-align:center">
<tr style="height:20px;">
<td/>
<td/>
<t t-if="company.display_logo1">
<td rowspan="5"
style="padding-left:15px;text-align:center;width:135px;border-left:1px solid #adadad">
<img t-if="company.bottom_logo1"
t-att-src="'data:image/png;base64,%s' % company.bottom_logo1"
style="width:98px;height:auto;padding-bottom:5px;"/>
<img t-if="not company.bottom_logo1"
src="/theme_light/static/img/gallery/label_fin.jpg"
style="width:98px;height:auto;padding-bottom:5px;"/>
</td>
</t>
<t t-if="company.display_logo2">
<td rowspan="5"
style="padding-left:15px;text-align:center;width:135px;border-left:1px solid #adadad">
<img t-if="company.bottom_logo2"
t-att-src="'data:image/png;base64,%s' % company.bottom_logo2"
style="width:162px;height:auto;padding-bottom:5px;"/>
<img t-if="not company.bottom_logo2"
src="/theme_light/static/img/gallery/cnc_agree.jpg"
style="width:162px;height:auto;padding-bottom:5px;"/>
</td>
</t>
</tr>
<tr style="height:20px;">
<td style="align: left;">
<t t-if="company.rml_header1">
<span t-field="company.rml_header1"/>
-
</t>
<b>
<span t-field="company.name"/>
</b>
</td>
<td/>
<td/>
<td/>
</tr>
<tr style="height:20px">
<td style="align: left;">
<span t-field="company.partner_id.street"/>
-
<t t-if="company.partner_id.street2">
<span t-field="company.partner_id.street2"/>
-
</t>
<span t-field="company.partner_id.zip"/>
<span t-field="company.partner_id.city"/>
</td>
<td/>
<td/>
<td/>
</tr>
<tr style="height:20px">
<td style="align: left;">
<t t-if="company.company_registry">
<span>N.Entr.</span>
:
<span t-field="company.company_registry"/>
</t>
<t t-if="company.vat">
-
<span>VAT Number</span>
:
<span t-field="company.vat"/>
</t>
<t t-foreach="o.company_id.bank_journal_ids"
t-as="journal">
<t t-set="b" t-value="journal.bank_account_id"/>
<t t-if="journal.display_on_footer">
-
<span t-field="b.bank_name"/>
<span t-field="b.acc_number"/>
<span t-field="b.bank_bic"/>
</t>
</t>
</td>
<td/>
<td/>
<td/>
</tr>
</table>
</div>
</template>
<template id="theme_light.invoice_footer_002">
<div class="footer">
<table style="width: 100%;font-size:13;color :black;font-family:Montserrat-Regular;text-align:center">
<tr style="height:20px;">
<td width="85%"></td>
<td rowspan="5" style="padding-left:15px;text-align:center;width:260px;border-left:1px solid #adadad" >
<img src="/theme_light/static/img/gallery/cnc_agree.png" style="max-height: 80px;padding-bottom:5px;"/>
<div style="color :#adadad;" t-field="company.company_registry"/>
</td>
</tr>
</table>
</div>
</template>
<template id="theme_light.invoice_footer_002">
<div class="footer">
<table style="width: 100%;font-size:13;color :black;font-family:Montserrat-Regular;text-align:center">
<tr style="height:20px;">
<td width="85%"></td>
<td rowspan="5"
style="padding-left:15px;text-align:center;width:260px;border-left:1px solid #adadad">
<img src="/theme_light/static/img/gallery/cnc_agree.png"
style="max-height: 80px;padding-bottom:5px;"/>
<div style="color :#adadad;"
t-field="company.company_registry"/>
</td>
</tr>
</table>
</div>
</template>
<template id="theme_light.invoice_header">
<div>
<div class="row">
<div class="col-xs-3">
<img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="height: 113px;"/>
<template id="theme_light.invoice_header">
<div>
<div class="row">
<div class="col-xs-3">
<img t-if="o.company_id.logo"
t-att-src="'data:image/png;base64,%s' % o.company_id.logo"
style="height: 113px;"/>
</div>
</div>
</div>
</div>
</template>
</template>
<template id="theme_light.invoice_layout">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<t t-raw="0" />
<t t-call="theme_light.invoice_footer" />
</template>
<template id="theme_light.invoice_layout">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<t t-raw="0"/>
<t t-call="theme_light.invoice_footer"/>
</template>
<template id="theme_light.invoice_layout_002">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<t t-raw="0" />
<t t-call="theme_light.invoice_footer_002" />
</template>
<template id="theme_light.invoice_layout_002">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<t t-raw="0"/>
<t t-call="theme_light.invoice_footer_002"/>
</template>
<template id="theme_light.report_footer_002">
<div class="footer">
<table style="width: 100%;font-size:13;color :black;font-family:Montserrat-Regular;text-align:center">
<tr style="height:20px;">
<td width="90%"></td>
<td rowspan="5" style="padding-left:15px;text-align:center;width:260px;border-left:1px solid #adadad" >
Page :
<span class="page"/>
</td>
</tr>
</table>
</div>
</template>
<template id="theme_light.report_footer_002">
<div class="footer">
<table style="width: 100%;font-size:13;color :black;font-family:Montserrat-Regular;text-align:center">
<tr style="height:20px;">
<td width="90%"></td>
<td rowspan="5"
style="padding-left:15px;text-align:center;width:260px;border-left:1px solid #adadad">
Page :
<span class="page"/>
</td>
</tr>
</table>
</div>
</template>
<template id="theme_light.report_layout_002">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<template id="theme_light.report_layout_002">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>
<t t-raw="0" />
<t t-call="theme_light.report_footer_002" />
</template>
<t t-raw="0"/>
<t t-call="theme_light.report_footer_002"/>
</template>
</odoo>

73
website_recaptcha_reloaded/views/res_config.xml

@ -5,37 +5,52 @@
<record id="view_website_config_settings" model="ir.ui.view">
<field name="name">Website settings</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form" />
<field name="inherit_id"
ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<div id="google_maps_setting" position="after">
<div class="col-xs-12 col-md-6 o_setting_box" id="reCaptcha_setting">
<div class="o_setting_left_pane">
<field name="has_google_recaptcha"/>
</div>
<div class="o_setting_right_pane">
<img width="20px" alt="captcha" class="mr-2" src="website_form_recaptcha/static/description/recaptcha_ico.png"/>
<label for="has_google_recaptcha" string="reCaptcha"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted mt8">
Protect your forms using reCaptcha control.
</div>
<div class="content-group" attrs="{'invisible': [('has_google_recaptcha', '=', False)]}">
<div class="row mt16">
<label class="col-lg-5 o_light_label" for="recaptcha_key_site"/>
<field name="recaptcha_key_site" placeholder="XXXXX"/>
<label class="col-lg-5 o_light_label" for="recaptcha_key_secret"/>
<field name="recaptcha_key_secret" placeholder="XXXXX"/>
</div>
</div>
<div id="google_maps_setting" position="after">
<div class="col-xs-12 col-md-6 o_setting_box"
id="reCaptcha_setting">
<div class="o_setting_left_pane">
<field name="has_google_recaptcha"/>
</div>
<div class="o_setting_right_pane">
<img width="20px" alt="captcha" class="mr-2"
src="website_form_recaptcha/static/description/recaptcha_ico.png"/>
<label for="has_google_recaptcha"
string="reCaptcha"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
<div class="text-muted mt8">
Protect your forms using reCaptcha control.
</div>
<div class="content-group"
attrs="{'invisible': [('has_google_recaptcha', '=', False)]}">
<div class="row mt16">
<label class="col-lg-5 o_light_label"
for="recaptcha_key_site"/>
<field name="recaptcha_key_site"
placeholder="XXXXX"/>
<label class="col-lg-5 o_light_label"
for="recaptcha_key_secret"/>
<field name="recaptcha_key_secret"
placeholder="XXXXX"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_recaptcha', '=', False)]}" class="mt8">
<a role="button" class="btn-link" target="_blank" href="http://www.google.com/recaptcha/admin"><i class="fa fa-arrow-right"></i>
How to get my reCaptcha Key
</a>
</div>
</div>
</div>
</div>
<div attrs="{'invisible': [('has_google_recaptcha', '=', False)]}"
class="mt8">
<a role="button" class="btn-link"
target="_blank"
href="http://www.google.com/recaptcha/admin">
<i class="fa fa-arrow-right"></i>
How to get my reCaptcha Key
</a>
</div>
</div>
</div>
</div>
</field>
</record>
</data>

11
website_recaptcha_reloaded/views/website_view.xml

@ -2,11 +2,12 @@
<openerp>
<data>
<template id="assets_editor_recaptcha" name="GoogleRecaptcha" inherit_id="website.layout">
<xpath expr="//main" position="inside">
<script src="https://www.google.com/recaptcha/api.js"></script>
</xpath>
</template>
<template id="assets_editor_recaptcha" name="GoogleRecaptcha"
inherit_id="website.layout">
<xpath expr="//main" position="inside">
<script src="https://www.google.com/recaptcha/api.js"></script>
</xpath>
</template>
<!--<record id="view_website_form" model="ir.ui.view">

Loading…
Cancel
Save