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 5 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. 4
      easy_my_coop/report/account_invoice_report.py
  11. 10
      easy_my_coop/view/account_journal_view.xml
  12. 10
      easy_my_coop/view/cooperator_register_view.xml
  13. 6
      easy_my_coop/view/operation_request_view.xml
  14. 17
      easy_my_coop/view/product_view.xml
  15. 10
      easy_my_coop/view/res_company_view.xml
  16. 2
      easy_my_coop/view/res_partner_view.xml
  17. 17
      easy_my_coop/view/subscription_request_view.xml
  18. 11
      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. 17
      easy_my_coop/wizard/validate_subscription_request.xml
  26. 21
      theme_light/__manifest__.py
  27. 36
      theme_light/__openerp__.py
  28. 12
      theme_light/report/header_report_G002.xml
  29. 6
      theme_light/views/layout_template.xml
  30. 9
      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):

4
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"

10
easy_my_coop/view/account_journal_view.xml

@ -1,15 +1,14 @@
<?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="bank_id" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_energiris_super_manager"/>
<field name="get_general_payment"/>
</xpath>
</field>
</field>
</record>
@ -18,11 +17,10 @@
<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="currency_id" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_energiris_super_manager"/>
<field name="get_general_payment"/>
</xpath>
</field>
</field>
</record>
</data>
</odoo>

10
easy_my_coop/view/cooperator_register_view.xml

@ -1,5 +1,4 @@
<openerp>
<data>
<odoo>
<record id="subscription_register_tree" model="ir.ui.view">
<field name="name">subscription.register.tree</field>
<field name="model">subscription.register</field>
@ -60,8 +59,8 @@
<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'}"/>
<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>
@ -76,5 +75,4 @@
</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>
</odoo>

6
easy_my_coop/view/operation_request_view.xml

@ -1,5 +1,4 @@
<openerp>
<data>
<odoo>
<record id="operation_request_tree" model="ir.ui.view">
<field name="name">operation.request.tree</field>
<field name="model">operation.request</field>
@ -106,5 +105,4 @@
</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>
</odoo>

17
easy_my_coop/view/product_view.xml

@ -1,5 +1,4 @@
<openerp>
<data>
<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>
@ -102,7 +101,7 @@
</field>
</record>
<record id="product.product_template_action_product" 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>
@ -117,6 +116,8 @@
</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>
@ -124,8 +125,8 @@
<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="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">
@ -140,7 +141,5 @@
available vendors, etc.
</p>
</field>
</record>
</data>
</openerp>
</record> -->
</odoo>

10
easy_my_coop/view/res_company_view.xml

@ -1,11 +1,10 @@
<openerp>
<data>
<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">
<xpath expr="//group[@name='account_grp']" position="after">
<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"/>
@ -22,8 +21,7 @@
<field name="board_representative"/>
<field name="signature_scan"/>
</group>
</xpath>
</group>
</field>
</record>
</data>
</openerp>
</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>

17
easy_my_coop/view/subscription_request_view.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<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"/>
@ -9,7 +8,8 @@
<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" 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"/>
@ -114,8 +114,8 @@
<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'}"/>
<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>
@ -223,8 +223,8 @@
<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'}"/>
<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>
@ -237,5 +237,4 @@
</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>
</odoo>

11
easy_my_coop/view/subscription_template.xml

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<template id="assets_frontend" inherit_id="website.assets_frontend" name="Coop">
<xpath expr="." position="inside">
<!--<xpath expr="." position="inside">
<script type="text/javascript" src="/easy_my_coop/static/src/js/easy_my_coop.js"></script>
<script type="text/javascript" src="/easy_my_coop/static/src/js/jquery.inputmask.bundle.js"></script>
</xpath>
</xpath>-->
</template>
<template id="company_operational_offices" inherit_id="website.company_description" name="Company Description">
@ -45,7 +44,6 @@
</t>
</template>
<template id="easy_my_coop.becomecooperator" name="Become Cooperator" page="True">
<t t-call="website.layout">
<div id="wrap">
@ -550,5 +548,4 @@
</ul>
</xpath>
</template>
</data>
</openerp>
</odoo>

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):

17
easy_my_coop/wizard/validate_subscription_request.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<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>
@ -21,19 +20,11 @@
<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>
<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>
</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,
}

12
theme_light/report/header_report_G002.xml

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<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">
@ -129,8 +125,6 @@
</table>
</template>
<template id="theme_light.list_header_G002">
<table style="width: 100%;font-size:10px">
<tr height="30px">
@ -192,6 +186,4 @@
</tr>
</table>
</template>
</data>
</openerp>
</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>

9
website_recaptcha_reloaded/__openerp__.py

@ -18,7 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{'name': 'Website reCAPTCHA Reloaded',
{
'name': 'Website reCAPTCHA Reloaded',
'version': '1.0',
'category': 'Website',
'depends': ['website'],
@ -28,8 +29,8 @@
'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
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
@ -39,6 +40,6 @@ to use it in your various pages.
'views/website_view.xml',
'views/res_config.xml',
],
'installable': True,
'installable': False,
'auto_install': False
}
Loading…
Cancel
Save