diff --git a/beesdoo_website_portal/__init__.py b/beesdoo_website_portal/__init__.py new file mode 100644 index 0000000..2fa08e5 --- /dev/null +++ b/beesdoo_website_portal/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf8 -*- +import controllers diff --git a/beesdoo_website_portal/__openerp__.py b/beesdoo_website_portal/__openerp__.py new file mode 100644 index 0000000..248ab3a --- /dev/null +++ b/beesdoo_website_portal/__openerp__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Rémy Taymans +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'BEES coop Website Portal', + + 'description': """ + Extension of the Website Portal that prevent modification of sensible data by the users + """, + + 'author': 'Rémy Taymans', + 'license': 'AGPL-3', + 'version': '9.0.1.0', + 'website': "https://github.com/beescoop/Obeesdoo", + + 'category': 'Cooperative management', + + 'depends': [ + 'website', + 'website_portal_extend', + ], + + 'data': [ + 'views/portal_website_templates.xml', + ] +} diff --git a/beesdoo_website_portal/controllers/__init__.py b/beesdoo_website_portal/controllers/__init__.py new file mode 100644 index 0000000..757b12a --- /dev/null +++ b/beesdoo_website_portal/controllers/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import main diff --git a/beesdoo_website_portal/controllers/main.py b/beesdoo_website_portal/controllers/main.py new file mode 100644 index 0000000..104f2a8 --- /dev/null +++ b/beesdoo_website_portal/controllers/main.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +# Copyright 2017-2018 Rémy Taymans +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from openerp.addons.website_portal_extend.controllers.main import ExtendWebsiteAccountController + + +class BeesdooAccountWebsiteController(ExtendWebsiteAccountController): + + mandatory_billing_fields = [ + "phone", + "city", + "country_id", + "street", + "zipcode", + ] + optional_billing_fields = [ + "state_id", + ] + + def _set_mandatory_fields(self, data): + """This is not useful as the field 'company_name' is not present + anymore. + """ + pass diff --git a/beesdoo_website_portal/views/portal_website_templates.xml b/beesdoo_website_portal/views/portal_website_templates.xml new file mode 100644 index 0000000..19b0d5a --- /dev/null +++ b/beesdoo_website_portal/views/portal_website_templates.xml @@ -0,0 +1,32 @@ + + + + + + + +