From 57651c32a1d05e7eb7daa8f6c1982623b723e251 Mon Sep 17 00:00:00 2001 From: houssine Date: Wed, 1 May 2019 14:00:20 +0200 Subject: [PATCH] [MIG] migration module to v12. This make the base module installable. Still in WIP. Need fixing warning and subscription template --- easy_my_coop/__init__.py | 2 +- .../{__openerp__.py => __manifest__.py} | 38 +- easy_my_coop/models/account_invoice.py | 4 +- easy_my_coop/models/account_journal.py | 4 +- easy_my_coop/models/company.py | 3 +- easy_my_coop/models/coop.py | 9 +- easy_my_coop/models/operation_request.py | 4 +- easy_my_coop/models/partner.py | 3 +- easy_my_coop/models/product.py | 3 +- easy_my_coop/models/res_partner_bank.py | 3 +- easy_my_coop/report/account_invoice_report.py | 14 +- easy_my_coop/view/account_journal_view.xml | 48 +- .../view/cooperator_register_view.xml | 152 ++- easy_my_coop/view/operation_request_view.xml | 214 ++-- easy_my_coop/view/product_view.xml | 287 +++-- easy_my_coop/view/res_company_view.xml | 56 +- easy_my_coop/view/res_partner_view.xml | 2 +- .../view/subscription_request_view.xml | 447 ++++--- easy_my_coop/view/subscription_template.xml | 1069 ++++++++--------- easy_my_coop/wizard/__init__.py | 1 - easy_my_coop/wizard/account_invoice_refund.py | 3 +- .../create_subscription_from_partner.py | 7 +- easy_my_coop/wizard/update_partner_info.py | 6 +- easy_my_coop/wizard/update_share_line.py | 6 +- .../wizard/validate_subscription_request.py | 4 +- .../wizard/validate_subscription_request.xml | 65 +- theme_light/__manifest__.py | 21 + theme_light/__openerp__.py | 36 - theme_light/report/header_report_G002.xml | 36 +- theme_light/views/layout_template.xml | 6 +- website_recaptcha_reloaded/__openerp__.py | 45 +- 31 files changed, 1260 insertions(+), 1338 deletions(-) rename easy_my_coop/{__openerp__.py => __manifest__.py} (57%) create mode 100644 theme_light/__manifest__.py delete mode 100644 theme_light/__openerp__.py diff --git a/easy_my_coop/__init__.py b/easy_my_coop/__init__.py index c360b64..897ad37 100644 --- a/easy_my_coop/__init__.py +++ b/easy_my_coop/__init__.py @@ -1,4 +1,4 @@ from . import models from . import controllers from . import report -from . import wizard \ No newline at end of file +from . import wizard diff --git a/easy_my_coop/__openerp__.py b/easy_my_coop/__manifest__.py similarity index 57% rename from easy_my_coop/__openerp__.py rename to easy_my_coop/__manifest__.py index d9cef39..0801543 100644 --- a/easy_my_coop/__openerp__.py +++ b/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 . -# -############################################################################## +# Copyright 2013-2018 Open Architects Consulting SPRL. +# Copyright 2018-Coop IT Easy SCRLfs () +# - Houssine BAKKALI - +# 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 ", + "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', diff --git a/easy_my_coop/models/account_invoice.py b/easy_my_coop/models/account_invoice.py index e294768..3b3c05e 100644 --- a/easy_my_coop/models/account_invoice.py +++ b/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): diff --git a/easy_my_coop/models/account_journal.py b/easy_my_coop/models/account_journal.py index 4b036a0..32c0104 100644 --- a/easy_my_coop/models/account_journal.py +++ b/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): diff --git a/easy_my_coop/models/company.py b/easy_my_coop/models/company.py index 95c8db3..4859fa3 100644 --- a/easy_my_coop/models/company.py +++ b/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): diff --git a/easy_my_coop/models/coop.py b/easy_my_coop/models/coop.py index 5496e83..ffa9298 100644 --- a/easy_my_coop/models/coop.py +++ b/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 diff --git a/easy_my_coop/models/operation_request.py b/easy_my_coop/models/operation_request.py index f9eddea..19c1e6d 100644 --- a/easy_my_coop/models/operation_request.py +++ b/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): diff --git a/easy_my_coop/models/partner.py b/easy_my_coop/models/partner.py index d3699a5..1e5661a 100644 --- a/easy_my_coop/models/partner.py +++ b/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): diff --git a/easy_my_coop/models/product.py b/easy_my_coop/models/product.py index 12cfb52..5ca3ed6 100644 --- a/easy_my_coop/models/product.py +++ b/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): diff --git a/easy_my_coop/models/res_partner_bank.py b/easy_my_coop/models/res_partner_bank.py index f1b6769..1a3aa98 100644 --- a/easy_my_coop/models/res_partner_bank.py +++ b/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): diff --git a/easy_my_coop/report/account_invoice_report.py b/easy_my_coop/report/account_invoice_report.py index 7bd6e40..bd1fb90 100644 --- a/easy_my_coop/report/account_invoice_report.py +++ b/easy_my_coop/report/account_invoice_report.py @@ -1,13 +1,13 @@ -# -*- coding: utf-8 -*- -from openerp import api, fields, models, _ +from odoo import fields, models + class AccountInvoiceReport(models.Model): _inherit = "account.invoice.report" - + 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" \ No newline at end of file + return super(AccountInvoiceReport, self)._sub_select() + ", ai.release_capital_request as release_capital_request" diff --git a/easy_my_coop/view/account_journal_view.xml b/easy_my_coop/view/account_journal_view.xml index 31acd75..42784f2 100644 --- a/easy_my_coop/view/account_journal_view.xml +++ b/easy_my_coop/view/account_journal_view.xml @@ -1,28 +1,26 @@ - - - account.journal.form - account.journal - - - - - - - - - - - account.bank.journal.form - account.journal - - - - - - - - - + + account.journal.form + account.journal + + + + + + + + + + + account.bank.journal.form + account.journal + + + + + + + + \ No newline at end of file diff --git a/easy_my_coop/view/cooperator_register_view.xml b/easy_my_coop/view/cooperator_register_view.xml index 07ce46e..ffd253c 100644 --- a/easy_my_coop/view/cooperator_register_view.xml +++ b/easy_my_coop/view/cooperator_register_view.xml @@ -1,80 +1,78 @@ - - - - subscription.register.tree - subscription.register - - - - - - - - - - - - - - - - subscription.register.form - subscription.register - -
+ + + subscription.register.tree + subscription.register + + + + + + + + + + + + + + + + subscription.register.form + subscription.register + + + - - - - - - - - - - - - - - - - - - - - - - - - Subscription Register Search - subscription.register - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
+ + + Subscription Register Search + subscription.register + + + + + + + + + + + + + + + + + - - Subscription Register - subscription.register - form - - - + + Subscription Register + subscription.register + form + + + - -
-
\ No newline at end of file + + \ No newline at end of file diff --git a/easy_my_coop/view/operation_request_view.xml b/easy_my_coop/view/operation_request_view.xml index 7f07bda..77a1d57 100644 --- a/easy_my_coop/view/operation_request_view.xml +++ b/easy_my_coop/view/operation_request_view.xml @@ -1,110 +1,108 @@ - - - - operation.request.tree - operation.request - - - - - - - - - - - - - - operation.request.form - operation.request - -
-
-
- + + + operation.request.tree + operation.request + + + + + + + + + + + + + + operation.request.form + operation.request + + +
+
+ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - Operation request - operation.request - form - - - - -
-
\ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + Operation request + operation.request + form + + + + + \ No newline at end of file diff --git a/easy_my_coop/view/product_view.xml b/easy_my_coop/view/product_view.xml index dfddcaf..75afaf2 100644 --- a/easy_my_coop/view/product_view.xml +++ b/easy_my_coop/view/product_view.xml @@ -1,146 +1,145 @@ - - - - product.template.share.form - product.template - - - -
- -
-
- -
-
-
-
- - - product.template.common.form - product.template - - - - - - - - - - - - - - - - - - Share type - ir.actions.act_window - product.template - form - kanban,tree,form - - - - [('is_share','=',True)] - -

- Click to define a new share product. -

-
-
- - - - - - - Product - ir.actions.act_window - product.product - tree,form,kanban - form - - - [('is_share','=',False)] - -

- Click to define a new product. -

- You must define a product for everything you sell, whether it's - a physical product, a consumable or a service you offer to - customers. -

- The product form contains information to simplify the sale - process: price, notes in the quotation, accounting data, - procurement methods, etc. -

-
-
- - - Products - ir.actions.act_window - product.template - tree,form,kanban - form - - {"search_default_filter_to_sell":1} - [('is_share','=',False)] - -

- Click to define a new product. -

- You must define a product for everything you sell, whether it's a physical product, a consumable or a service you offer to customers. -

- The product form contains information to simplify the sale process: price, notes in the quotation, accounting data, procurement methods, etc. -

-
-
+ + + product.template.share.form + product.template + + + +
+ +
+
+ +
+
+
+
+ + + product.template.common.form + product.template + + + + + + + + + + + + + + + + + + Share type + ir.actions.act_window + product.template + form + kanban,tree,form + + + + [('is_share','=',True)] + +

+ Click to define a new share product. +

+
+
+ + + + + + + Product + ir.actions.act_window + product.product + tree,form,kanban + form + + + [('is_share','=',False)] + +

+ Click to define a new product. +

+ You must define a product for everything you sell, whether it's + a physical product, a consumable or a service you offer to + customers. +

+ The product form contains information to simplify the sale + process: price, notes in the quotation, accounting data, + procurement methods, etc. +

+
+
+ + + Products + ir.actions.act_window + product.template + tree,form,kanban + form + + {"search_default_filter_to_sell":1} + [('is_share','=',False)] + +

+ Click to define a new product. +

+ You must define a product for everything you sell, whether it's a physical product, a consumable or a service you offer to customers. +

+ The product form contains information to simplify the sale process: price, notes in the quotation, accounting data, procurement methods, etc. +

+
+
- - Products - ir.actions.act_window - product.template - tree,form,kanban - form - {"search_default_products": 1, 'default_type': 'product'} - [('is_share','=',False)] - -

- Click to define a new product. -

-
-
- + + Products + ir.actions.act_window + product.template + tree,form,kanban + form + {"search_default_products": 1, 'default_type': 'product'} + [('is_share','=',False)] + +

+ Click to define a new product. +

+
+
+ + - - [('is_share','=',False)] - -

- Click to define a new product. -

- You must define a product for everything you purchase, whether - it's a physical product, a consumable or services you buy to - subcontractants. -

- The product form contains detailed information to improve the - purchase process: prices, procurement logistics, accounting data, - available vendors, etc. -

-
- - -
-
+ Products + ir.actions.act_window + product.template + form + kanban,tree,form + {"search_default_filter_to_purchase":1} + Force empty + Force empty + [('is_share','=',False)] + +

+ Click to define a new product. +

+ You must define a product for everything you purchase, whether + it's a physical product, a consumable or services you buy to + subcontractants. +

+ The product form contains detailed information to improve the + purchase process: prices, procurement logistics, accounting data, + available vendors, etc. +

+
+ --> + diff --git a/easy_my_coop/view/res_company_view.xml b/easy_my_coop/view/res_company_view.xml index 3bfdd48..3a1123d 100644 --- a/easy_my_coop/view/res_company_view.xml +++ b/easy_my_coop/view/res_company_view.xml @@ -1,29 +1,27 @@ - - - - res.company.form.easymy.coop - - res.company - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + res.company.form.easymy.coop + + res.company + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/easy_my_coop/view/res_partner_view.xml b/easy_my_coop/view/res_partner_view.xml index e775cdb..c5525f9 100644 --- a/easy_my_coop/view/res_partner_view.xml +++ b/easy_my_coop/view/res_partner_view.xml @@ -161,7 +161,7 @@ res.partner.remove.follower.inherit res.partner - + diff --git a/easy_my_coop/view/subscription_request_view.xml b/easy_my_coop/view/subscription_request_view.xml index 745596a..882b13f 100644 --- a/easy_my_coop/view/subscription_request_view.xml +++ b/easy_my_coop/view/subscription_request_view.xml @@ -1,241 +1,240 @@ - - - - - + + + + - - subscription.request.tree - subscription.request - - - - - - - - - - - - - - -