From e8c38a09efc0ab1fa75d98ebf72dfca71149f41b Mon Sep 17 00:00:00 2001 From: youssef Date: Thu, 20 Sep 2018 14:00:24 +0100 Subject: [PATCH] remove limite_registration module --- .../__manifest__.py | 31 ------------- .../models/__init__.py | 19 -------- .../models/golem_activity.py | 27 ----------- .../models/golem_activity_registration.py | 35 -------------- .../views/golem_activity_views.xml | 46 ------------------- 5 files changed, 158 deletions(-) delete mode 100644 golem_activity_limite_registration/__manifest__.py delete mode 100644 golem_activity_limite_registration/models/__init__.py delete mode 100644 golem_activity_limite_registration/models/golem_activity.py delete mode 100644 golem_activity_limite_registration/models/golem_activity_registration.py delete mode 100644 golem_activity_limite_registration/views/golem_activity_views.xml diff --git a/golem_activity_limite_registration/__manifest__.py b/golem_activity_limite_registration/__manifest__.py deleted file mode 100644 index 8c0d8ab..0000000 --- a/golem_activity_limite_registration/__manifest__.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright 2018 Youssef El Ouahby -# Copyright 2018 Fabien Bourgeois -# -# 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 . - -{ - 'name': 'GOLEM activity limite registration', - 'summary': 'GOLEM activity limite registration', - 'description': ''' GOLEM activity limite registration ''', - 'version': '10.0.0.0.1', - 'category': 'GOLEM', - 'author': 'Youssef El Ouahby, Fabien Bourgeois', - 'license': 'AGPL-3', - 'application': True, - 'installable': True, - 'depends': ['golem_activity', 'golem_activity_registration'], - 'data': ['views/golem_activity_views.xml'] -} diff --git a/golem_activity_limite_registration/models/__init__.py b/golem_activity_limite_registration/models/__init__.py deleted file mode 100644 index 56a42c2..0000000 --- a/golem_activity_limite_registration/models/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright 2018 Youssef El Ouahby -# Copyright 2018 Fabien Bourgeois -# -# 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 . - -from . import golem_activity, golem_activity_registration diff --git a/golem_activity_limite_registration/models/golem_activity.py b/golem_activity_limite_registration/models/golem_activity.py deleted file mode 100644 index 999b543..0000000 --- a/golem_activity_limite_registration/models/golem_activity.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright 2018 Youssef El Ouahby -# Copyright 2018 Fabien Bourgeois -# -# 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 . - -""" GOLEM Activity adaptations """ - -from odoo import models, fields, api, _ - -class GolemActivity(models.Model): - """ GOLEM Activity adaptations """ - _inherit = 'golem.activity' - - only_for_subscriber = fields.Boolean(required=True) diff --git a/golem_activity_limite_registration/models/golem_activity_registration.py b/golem_activity_limite_registration/models/golem_activity_registration.py deleted file mode 100644 index 1da353b..0000000 --- a/golem_activity_limite_registration/models/golem_activity_registration.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright 2018 Youssef El Ouahby -# Copyright 2018 Fabien Bourgeois -# -# 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 . - -""" GOLEM Activity Registration """ - -from odoo import models, fields, api, _ - -class GolemActivityRegistration(models.Model): - """ GOLEM Activity Registration """ - _inherit = 'golem.activity.registration' - - @api.constrains('member_id') - def _check_member_reliability(self): - """ Forbid registration when user doesn't have a valide membership """ - for reg in self: - if reg.activity_id.only_for_subscriber: - if reg.member_id.membership_state in ['none', 'canceled', 'old']: - emsg = _('Subscription can not be executed : the targeted ' - 'activity is only for subscriber.') - raise models.ValidationError(emsg) diff --git a/golem_activity_limite_registration/views/golem_activity_views.xml b/golem_activity_limite_registration/views/golem_activity_views.xml deleted file mode 100644 index 543a666..0000000 --- a/golem_activity_limite_registration/views/golem_activity_views.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - Golem Activity Form Limite Registration Adapations - golem.activity - - - - - - - - - Golem Activity Search Limite Registration Adapations - golem.activity - - - - - - - - -