Browse Source

[MIG] migration module to v12.

This make the base module installable. Still in WIP. Need fixing warning
and subscription template
11.0
houssine 6 years ago
parent
commit
57651c32a1
  1. 38
      easy_my_coop/__manifest__.py
  2. 4
      easy_my_coop/models/account_invoice.py
  3. 4
      easy_my_coop/models/account_journal.py
  4. 3
      easy_my_coop/models/company.py
  5. 9
      easy_my_coop/models/coop.py
  6. 4
      easy_my_coop/models/operation_request.py
  7. 3
      easy_my_coop/models/partner.py
  8. 3
      easy_my_coop/models/product.py
  9. 3
      easy_my_coop/models/res_partner_bank.py
  10. 8
      easy_my_coop/report/account_invoice_report.py
  11. 46
      easy_my_coop/view/account_journal_view.xml
  12. 148
      easy_my_coop/view/cooperator_register_view.xml
  13. 208
      easy_my_coop/view/operation_request_view.xml
  14. 271
      easy_my_coop/view/product_view.xml
  15. 56
      easy_my_coop/view/res_company_view.xml
  16. 2
      easy_my_coop/view/res_partner_view.xml
  17. 447
      easy_my_coop/view/subscription_request_view.xml
  18. 1039
      easy_my_coop/view/subscription_template.xml
  19. 1
      easy_my_coop/wizard/__init__.py
  20. 3
      easy_my_coop/wizard/account_invoice_refund.py
  21. 7
      easy_my_coop/wizard/create_subscription_from_partner.py
  22. 6
      easy_my_coop/wizard/update_partner_info.py
  23. 6
      easy_my_coop/wizard/update_share_line.py
  24. 4
      easy_my_coop/wizard/validate_subscription_request.py
  25. 65
      easy_my_coop/wizard/validate_subscription_request.xml
  26. 21
      theme_light/__manifest__.py
  27. 36
      theme_light/__openerp__.py
  28. 36
      theme_light/report/header_report_G002.xml
  29. 6
      theme_light/views/layout_template.xml
  30. 45
      website_recaptcha_reloaded/__openerp__.py

38
easy_my_coop/__openerp__.py → easy_my_coop/__manifest__.py

@ -1,41 +1,25 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2013-2018 Open Architects Consulting SPRL.
# Copyright (C) 2018- Coop IT Easy SCRL.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# Copyright 2013-2018 Open Architects Consulting SPRL.
# Copyright 2018-Coop IT Easy SCRLfs (<http://www.coopiteasy.be>)
# - Houssine BAKKALI - <houssine@coopiteasy.be>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).#
{
"name": "Easy My Coop",
"version": "1.1",
"version": "'12.0.1.0.0'",
"depends": ["base",
"sale",
"purchase",
"account_accountant",
"account",
"base_iban",
"product",
"partner_firstname",
"partner_contact_birthdate",
"partner_contact_address",
"website",
"website_recaptcha_reloaded",
"website_form_recaptcha",
"theme_light",
"base_iban",
"email_template_config",
],
"author": "Houssine BAKKALI <houssine@coopiteasy.be>",
"author": "Coop IT Easy SCRLfs",
"category": "Cooperative management",
"website": "www.coopiteasy.be",
"license": "AGPL-3",
@ -56,7 +40,7 @@
'view/cooperator_register_view.xml',
'view/operation_request_view.xml',
'view/account_invoice_view.xml',
'view/subscription_template.xml',
# 'view/subscription_template.xml',
'view/product_view.xml',
'view/res_company_view.xml',
'view/account_journal_view.xml',

4
easy_my_coop/models/account_invoice.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from openerp import api, fields, models
from odoo import api, fields, models
class account_invoice(models.Model):

4
easy_my_coop/models/account_journal.py

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import fields, models
from odoo import fields, models
class AccountJournal(models.Model):

3
easy_my_coop/models/company.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import fields, models
from odoo import fields, models
class ResCompany(models.Model):

9
easy_my_coop/models/coop.py

@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from openerp import api, fields, models, _
from openerp.addons.base_iban import base_iban
from openerp.exceptions import UserError, ValidationError
from odoo import api, fields, models, _
from odoo.addons.base_iban.models.res_partner_bank import validate_iban
from odoo.exceptions import UserError, ValidationError
_REQUIRED = ['email',
'firstname',
@ -107,7 +106,7 @@ class subscription_request(models.Model):
def check_iban(self, iban):
validated = True
try:
base_iban.validate_iban(iban)
validate_iban(iban)
except ValidationError:
validated = False
return validated

4
easy_my_coop/models/operation_request.py

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from openerp import api, fields, models, _
from openerp.exceptions import ValidationError
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class operation_request(models.Model):

3
easy_my_coop/models/partner.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import api, fields, models
from odoo import api, fields, models
class ResPartner(models.Model):

3
easy_my_coop/models/product.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import api, fields, models
from odoo import api, fields, models
class ProductTemplate(models.Model):

3
easy_my_coop/models/res_partner_bank.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import models
from odoo import models
class ResPartnerBank(models.Model):

8
easy_my_coop/report/account_invoice_report.py

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from openerp import api, fields, models, _
from odoo import fields, models
class AccountInvoiceReport(models.Model):
_inherit = "account.invoice.report"
@ -7,7 +7,7 @@ class AccountInvoiceReport(models.Model):
release_capital_request = fields.Boolean(string="Release capital request")
def _select(self):
return super(AccountInvoiceReport, self)._select() + ", sub.release_capital_request as release_capital_request"
return super(AccountInvoiceReport, self)._select() + ", sub.release_capital_request as release_capital_request"
def _sub_select(self):
return super(AccountInvoiceReport, self)._sub_select() + ", ai.release_capital_request as release_capital_request"
return super(AccountInvoiceReport, self)._sub_select() + ", ai.release_capital_request as release_capital_request"

46
easy_my_coop/view/account_journal_view.xml

@ -1,28 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<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">
<xpath expr="//field[@name='display_on_footer']" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_energiris_super_manager"/>
<field name="get_general_payment"/>
</xpath>
</field>
</record>
<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_energiris_super_manager"/>
<field name="get_general_payment"/>
</field>
</field>
</record>
<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">
<xpath expr="//field[@name='display_on_footer']" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_energiris_super_manager"/>
<field name="get_general_payment"/>
</xpath>
</field>
</record>
</data>
<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_energiris_super_manager"/>
<field name="get_general_payment"/>
</field>
</field>
</record>
</odoo>

148
easy_my_coop/view/cooperator_register_view.xml

@ -1,80 +1,78 @@
<openerp>
<data>
<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>
<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">
<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>
<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>
<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>
<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 string="Entry type" context="{'group_by' : 'type'}" />
<filter string="Date Month" 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="date_month" string="Date Month" 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>
<menuitem action="subscription_register_action" name="Subscription Register" id="menu_easy_my_coop_subscription_register" parent="menu_easy_my_coop_main_subscription" sequence="20"/>
</data>
</openerp>
<menuitem action="subscription_register_action" name="Subscription Register" id="menu_easy_my_coop_subscription_register" parent="menu_easy_my_coop_main_subscription" sequence="20"/>
</odoo>

208
easy_my_coop/view/operation_request_view.xml

@ -1,110 +1,108 @@
<openerp>
<data>
<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>
<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_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>
<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>
<group>
<field name="state"/>
<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="no_registre"/>
<field name="birthdate"/>
<field name="phone"/>
<field name="email"/>
<field name="iban"/>
<field name="state" invisible="True"/>
</tree>
<form string="Subscription Requests">
<sheet>
<field name="state"/>
<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="no_registre"/>
<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="no_registre"/>
<field name="iban"/>
</group>
<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="no_registre"/>
<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>
<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>
<menuitem action="operation_request_action" name="Operation request" id="menu_easy_my_coop_operation_request" parent="menu_easy_my_coop_main_subscription" sequence="20" groups="easy_my_coop.group_energiris_manager"/>
</data>
</openerp>
<menuitem action="operation_request_action" name="Operation request" id="menu_easy_my_coop_operation_request" parent="menu_easy_my_coop_main_subscription" sequence="20" groups="easy_my_coop.group_energiris_manager"/>
</odoo>

271
easy_my_coop/view/product_view.xml

@ -1,146 +1,145 @@
<openerp>
<data>
<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="purchase.view_product_supplier_inherit"/>
<field name="arch" type="xml">
<xpath expr="//label[@for='purchase_ok']/.." position="after">
<div groups="easy_my_coop.group_energiris_super_manager">
<field name="is_share"/>
<label for="is_share"/>
</div>
<div attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user">
<field name="display_on_website"/>
<label for="display_on_website"/>
</div>
</xpath>
</field>
</record>
<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="purchase.view_product_supplier_inherit"/>
<field name="arch" type="xml">
<xpath expr="//label[@for='purchase_ok']/.." position="after">
<div groups="easy_my_coop.group_energiris_super_manager">
<field name="is_share"/>
<label for="is_share"/>
</div>
<div attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user">
<field name="display_on_website"/>
<label for="display_on_website"/>
</div>
</xpath>
</field>
</record>
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.common.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='type']" position="after">
<field name="short_name" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="default_share_product" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="force_min_qty" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="minimum_quantity" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="customer" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="by_company" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="by_individual" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="mail_template" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
</xpath>
</field>
</record>
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.common.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='type']" position="after">
<field name="short_name" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="default_share_product" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="force_min_qty" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="minimum_quantity" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="customer" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="by_company" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="by_individual" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
<field name="mail_template" attrs="{'invisible':[('is_share','=',False)]}" groups="easy_my_coop.group_energiris_user"/>
</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="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>
<menuitem action="share_product_action" name="Share type" id="menu_easy_my_coop_share_product" parent="menu_easy_my_coop_main_subscription" sequence="20"/>
<menuitem action="share_product_action" name="Share type" id="menu_easy_my_coop_share_product" parent="menu_easy_my_coop_main_subscription" sequence="20"/>
<!-- overriding product views to not display share product in the purchase and sale views-->
<!-- 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>
<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>
<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_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_template_action_product" 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="context">{"search_default_products": 1, 'default_type': 'product'}</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>
</field>
</record>
<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="context">{"search_default_products": 1, 'default_type': 'product'}</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>
</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">
<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>
</data>
</openerp>
<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>

56
easy_my_coop/view/res_company_view.xml

@ -1,29 +1,27 @@
<openerp>
<data>
<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">
<xpath expr="//group[@name='account_grp']" position="after">
<group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_energiris_manager">
<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"/>
</group>
</xpath>
</field>
</record>
</data>
</openerp>
<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_energiris_manager">
<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"/>
</group>
</group>
</field>
</record>
</odoo>

2
easy_my_coop/view/res_partner_view.xml

@ -161,7 +161,7 @@
<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.view_emails_partner_info_form"/>
<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>

447
easy_my_coop/view/subscription_request_view.xml

@ -1,241 +1,240 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem name="Easy-My Coop" id="menu_main_easy_my_coop" sequence="40" groups="easy_my_coop.group_energiris_user"/>
<menuitem name="Subscription" id="menu_easy_my_coop_main_subscription" parent="menu_main_easy_my_coop" sequence="10" groups="easy_my_coop.group_energiris_manager"/>
<menuitem name="Reporting" id="menu_easy_my_coop_main_reporting" parent="menu_main_easy_my_coop" sequence="40" groups="easy_my_coop.group_energiris_manager"/>
<odoo>
<menuitem name="Easy-My Coop" id="menu_main_easy_my_coop" sequence="40" groups="easy_my_coop.group_energiris_user"/>
<menuitem name="Subscription" id="menu_easy_my_coop_main_subscription" parent="menu_main_easy_my_coop" sequence="10" groups="easy_my_coop.group_energiris_manager"/>
<menuitem name="Reporting" id="menu_easy_my_coop_main_reporting" parent="menu_main_easy_my_coop" sequence="40" groups="easy_my_coop.group_energiris_manager"/>
<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">
<tree string="Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">
<field name="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" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY" />
<button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
<button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
</tree>
</field>
</record>
<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">
<!--<tree string="Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">-->
<tree string="Cooperator Subscriptions Request">
<field name="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" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY" />
<button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
<button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
</tree>
</field>
</record>
<record id="subscription_request_form" model="ir.ui.view">
<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,done,block" groups="easy_my_coop.group_energiris_manager"/>
<field name="state" widget="statusbar" statusbar_visible="draft,cancelled,done,failed"/>
</header>
<sheet>
<record id="subscription_request_form" model="ir.ui.view">
<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,done,block" groups="easy_my_coop.group_energiris_manager"/>
<field name="state" widget="statusbar" statusbar_visible="draft,cancelled,done,failed"/>
</header>
<sheet>
<group>
<group>
<group>
<field name="already_cooperator"/>
<field name="is_company" groups="easy_my_coop.group_energiris_super_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)]}"/>
<field name="no_registre"/>
<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_energiris_super_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="validated"/>
<field name="skip_control_ng"/>
</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>
<field name="already_cooperator"/>
<field name="is_company" groups="easy_my_coop.group_energiris_super_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)]}"/>
<field name="no_registre"/>
<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_energiris_super_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="validated"/>
<field name="skip_control_ng"/>
</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>
<record id="view_subscription_request_filter" model="ir.ui.view">
<field name="name">Cooperator Subscription Search</field>
<field name="model">subscription.request</field>
<field name="arch" type="xml">
<search string="Search Subscription Request">
<field name="name"/>
<separator/>
<filter string="draft" name="state_draft" domain="[('state','=','draft')]"/>
<filter string="done" name="state_done" domain="[('state','=','done')]"/>
<separator/>
<filter string="Unvalid" name="Unvalid" domain="[('validated', '=', False)]"/>
<group expand="0" name="group_by" string="Group By">
<filter string="Request type" context="{'group_by' : 'type'}" />
<filter string="Date Month" context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
<record id="view_subscription_request_filter" model="ir.ui.view">
<field name="name">Cooperator Subscription Search</field>
<field name="model">subscription.request</field>
<field name="arch" type="xml">
<search string="Search Subscription Request">
<field name="name"/>
<separator/>
<filter string="draft" name="state_draft" domain="[('state','=','draft')]"/>
<filter string="done" name="state_done" domain="[('state','=','done')]"/>
<separator/>
<filter string="Unvalid" name="Unvalid" 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_month" string="Date Month" context="{'group_by': 'date'}"/>
</group>
</search>
</field>
</record>
<record id="subscription_request_action" model="ir.actions.act_window">
<field name="name">Cooperator Subscription</field>
<field name="res_model">subscription.request</field>
<field name="view_type">form</field>
<field name="domain">[('is_company','=',False),('is_operation','=',False)]</field>
<field name="context">{'default_source':'manual'}</field>
<field name="view_id" ref="subscription_request_tree"/>
<field name="search_view_id" ref="view_subscription_request_filter"/>
</record>
<record id="subscription_request_action" model="ir.actions.act_window">
<field name="name">Cooperator Subscription</field>
<field name="res_model">subscription.request</field>
<field name="view_type">form</field>
<field name="domain">[('is_company','=',False),('is_operation','=',False)]</field>
<field name="context">{'default_source':'manual'}</field>
<field name="view_id" ref="subscription_request_tree"/>
<field name="search_view_id" ref="view_subscription_request_filter"/>
</record>
<menuitem action="subscription_request_action" name="Cooperator Subscription" id="menu_easy_my_coop_subscription_request" parent="menu_easy_my_coop_main_subscription" sequence="10"/>
<menuitem action="subscription_request_action" name="Cooperator Subscription" id="menu_easy_my_coop_subscription_request" parent="menu_easy_my_coop_main_subscription" sequence="10"/>
<record id="company_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">
<tree string="Company Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">
<field name="company_name"/>
<field name="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" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY"/>
<button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
<button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
</tree>
</field>
</record>
<record id="company_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">
<tree string="Company Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">
<field name="company_name"/>
<field name="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" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY"/>
<button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
<button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
</tree>
</field>
</record>
<record id="company_subscription_request_action" model="ir.actions.act_window">
<field name="name">Company Subscription</field>
<field name="res_model">subscription.request</field>
<field name="view_type">form</field>
<field name="domain">[('is_company','=',True),('is_operation','=',False)]</field>
<field name="context">{'default_is_company': True,'default_source':'manual'}</field>
<field name="view_id" ref="company_subscription_request_tree"/>
<field name="search_view_id" ref="view_subscription_request_filter"/>
</record>
<record id="company_subscription_request_action" model="ir.actions.act_window">
<field name="name">Company Subscription</field>
<field name="res_model">subscription.request</field>
<field name="view_type">form</field>
<field name="domain">[('is_company','=',True),('is_operation','=',False)]</field>
<field name="context">{'default_is_company': True,'default_source':'manual'}</field>
<field name="view_id" ref="company_subscription_request_tree"/>
<field name="search_view_id" ref="view_subscription_request_filter"/>
</record>
<menuitem action="company_subscription_request_action" name="Company Subscription" id="menu_easy_my_coop_company_subscription_request" parent="menu_easy_my_coop_main_subscription" sequence="12"/>
<menuitem action="company_subscription_request_action" name="Company Subscription" id="menu_easy_my_coop_company_subscription_request" parent="menu_easy_my_coop_main_subscription" sequence="12"/>
<record id="share_line_form" model="ir.ui.view">
<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_energiris_super_manager"/>
</header>
<sheet>
<record id="share_line_form" model="ir.ui.view">
<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_energiris_super_manager"/>
</header>
<sheet>
<group>
<group>
<field name="partner_id"/>
<field name="share_product_id"/>
<field name="share_number"/>
</group>
<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>
<field name="share_short_name"/>
<field name="share_unit_price"/>
<field name="effective_date"/>
<field name="total_amount_line"/>
</group>
</sheet>
</form>
</field>
</record>
</group>
</sheet>
</form>
</field>
</record>
<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">
<tree>
<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"/>
</tree>
</field>
</record>
<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">
<tree>
<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"/>
</tree>
</field>
</record>
<record id="view_share_line_filter" model="ir.ui.view">
<field name="name">Share Line Search</field>
<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 string="Cooperator" context="{'group_by' : 'partner_id'}" />
<filter string="Effective date" context="{'group_by': 'effective_date'}"/>
</group>
</search>
</field>
</record>
<record id="view_share_line_filter" model="ir.ui.view">
<field name="name">Share Line Search</field>
<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>
</record>
<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>
</record>
<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>
</record>
<menuitem action="share_line_action" name="Share lines" id="menu_easy_my_coop_share_line" parent="menu_easy_my_coop_main_subscription" sequence="20" groups="group_energiris_super_manager"/>
</data>
</openerp>
<menuitem action="share_line_action" name="Share lines" id="menu_easy_my_coop_share_line" parent="menu_easy_my_coop_main_subscription" sequence="20" groups="group_energiris_super_manager"/>
</odoo>

1039
easy_my_coop/view/subscription_template.xml
File diff suppressed because it is too large
View File

1
easy_my_coop/wizard/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from . import create_subscription_from_partner
from . import update_partner_info
from . import validate_subscription_request

3
easy_my_coop/wizard/account_invoice_refund.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import api, models
from odoo import api, models
class AccountInvoiceRefund(models.TransientModel):

7
easy_my_coop/wizard/create_subscription_from_partner.py

@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from openerp import api, fields, models, _
import openerp.addons.decimal_precision as dp
from openerp.exceptions import UserError
from odoo import api, fields, models, _
import odoo.addons.decimal_precision as dp
from odoo.exceptions import UserError
class PartnerCreateSubscription(models.TransientModel):

6
easy_my_coop/wizard/update_partner_info.py

@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
from openerp import api, fields, models, _
from openerp.exceptions import UserError
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class PartnerUpdateInfo(models.TransientModel):

6
easy_my_coop/wizard/update_share_line.py

@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
from openerp import api, fields, models, _
from openerp.exceptions import UserError
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class ShareLineUpdateInfo(models.TransientModel):

4
easy_my_coop/wizard/validate_subscription_request.py

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from openerp import api, models
from odoo import api, models
class ValidateSubscriptionRequest(models.TransientModel):

65
easy_my_coop/wizard/validate_subscription_request.xml

@ -1,39 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_validate_subscription_request" model="ir.ui.view">
<field name="name">Validate subscription request</field>
<field name="model">validate.subscription.request</field>
<field name="arch" type="xml">
<form string="Validate the subscription request">
<p class="oe_grey">
Validate the subscription request.
</p>
<footer>
<button name="validate" string="Validate" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-default" special="cancel"/>
</footer>
</form>
</field>
</record>
<odoo>
<record id="view_validate_subscription_request" model="ir.ui.view">
<field name="name">Validate subscription request</field>
<field name="model">validate.subscription.request</field>
<field name="arch" type="xml">
<form string="Validate the subscription request">
<p class="oe_grey">
Validate the subscription request.
</p>
<footer>
<button name="validate" string="Validate" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-default" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_validate_subscription_request" model="ir.actions.act_window">
<field name="name">Validate subscription request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">validate.subscription.request</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_energiris_manager'))]"/>
</record>
<record model="ir.values" id="validate_subscription_request">
<field name="model_id" ref="easy_my_coop.model_subscription_request" />
<field name="name">Validate subscription Request</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_validate_subscription_request'))" />
<field name="key">action</field>
<field name="model">subscription.request</field>
</record>
</data>
</openerp>
<record id="action_validate_subscription_request" model="ir.actions.act_window">
<field name="name">Validate subscription request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">validate.subscription.request</field>
<field name="src_model">subscription.request</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="key2">client_action_multi</field>
<field name="target">new</field>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_energiris_manager'))]"/>
</record>
</odoo>

21
theme_light/__manifest__.py

@ -0,0 +1,21 @@
# Copyright 2015-Coop IT Easy SCRLfs (<http://www.coopiteasy.be>)
# - Houssine BAKKALI - <houssine@coopiteasy.be>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': 'Theme light',
'description': 'extract of the theme zen',
'category': 'Website',
'version': '1.0',
'author': 'Benjamin Dugardin',
'author': 'Houssine BAKKALI',
'website': "www.coopiteasy.be",
'depends': ['base',
'web',
'website_theme_install'
],
'data': [
'views/layout_template.xml',
'report/header_report_G002.xml',
],
'application': True,
}

36
theme_light/__openerp__.py

@ -1,36 +0,0 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
# Copyright (C) 2013-2015 Benjamin Dugardin
# Copyright (C) 2013-2017 Open Architects Consulting SPRL.
# Copyright (C) 2018- Coop IT Easy SCRLfs.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Theme light',
'description': 'extract of the theme zen',
'category': 'Website',
'version': '1.0',
'author': 'Benjamin Dugardin',
'author': 'Houssine BAKKALI',
'website': "www.coopiteasy.be",
'depends': ['base', 'web'],
'data': [
'views/layout_template.xml',
'report/header_report_G002.xml',
],
'application': True,
}

36
theme_light/report/header_report_G002.xml

@ -1,11 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="theme_light.invoice_header_G002">
<table style="width: 100%;font-size:10px">
<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;"/>
@ -63,12 +59,12 @@
<td></td>
<td></td>
</tr>
</table>
</template>
</table>
</template>
<template id="theme_light.invoice_header_P002">
<template id="theme_light.invoice_header_P002">
<table style="width: 100%;font-size:10px">
<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;"/>
@ -126,13 +122,11 @@
<td></td>
<td></td>
</tr>
</table>
</template>
</table>
</template>
<template id="theme_light.list_header_G002">
<table style="width: 100%;font-size:10px">
<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;"/>
@ -190,8 +184,6 @@
<td></td>
<td></td>
</tr>
</table>
</template>
</data>
</openerp>
</table>
</template>
</odoo>

6
theme_light/views/layout_template.xml

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<odoo>
<data>
<!-- ****************** POUR IMPRESSION FACTURE **************** -->
@ -20,8 +20,6 @@
<t t-call="theme_light.style"/>
</style>
</xpath>
<!-- Remove conflicting style -->
<xpath expr="//head/link[@href='/web/static/src/css/full.css']" position="replace"></xpath>
</template>
<!-- CSS -->
@ -207,5 +205,5 @@
<t t-call="theme_light.report_footer_002" />
</template>
</data>
</openerp>
</odoo>

45
website_recaptcha_reloaded/__openerp__.py

@ -18,27 +18,28 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{'name': 'Website reCAPTCHA Reloaded',
'version': '1.0',
'category': 'Website',
'depends': ['website'],
'author': 'Tech Receptives',
'license': 'AGPL-3',
'website': 'https://www.techreceptives.com',
'description': """
Odoo Website reCAPTCHA Reloaded
================================
This modules allows you to integrate Google reCAPTCHA v2.0 to your website forms.
You can configure your Google reCAPTCHA site and public keys
in "Settings" -> "Website Settings"
{
'name': 'Website reCAPTCHA Reloaded',
'version': '1.0',
'category': 'Website',
'depends': ['website'],
'author': 'Tech Receptives',
'license': 'AGPL-3',
'website': 'https://www.techreceptives.com',
'description': """
Odoo Website reCAPTCHA Reloaded
================================
This modules allows you to integrate Google reCAPTCHA v2.0 to your website
forms. You can configure your Google reCAPTCHA site and public keys
in "Settings" -> "Website Settings"
You will need to install various website_<module>_recaptcha modules
to use it in your various pages.
""",
'data': [
'views/website_view.xml',
'views/res_config.xml',
],
'installable': True,
'auto_install': False
You will need to install various website_<module>_recaptcha modules
to use it in your various pages.
""",
'data': [
'views/website_view.xml',
'views/res_config.xml',
],
'installable': False,
'auto_install': False
}
Loading…
Cancel
Save