From 5a7457309ed62e7fdf19ceefa803663c94fcf092 Mon Sep 17 00:00:00 2001 From: phucngta Date: Tue, 6 Mar 2018 15:18:36 +0700 Subject: [PATCH] [11.0][MIG] mail_restrict_follower_selection --- mail_restrict_follower_selection/README.rst | 5 +++- mail_restrict_follower_selection/__init__.py | 23 +++------------ .../__manifest__.py | 26 ++++------------- .../data/ir_actions.xml | 1 - .../models/__init__.py | 23 +++------------ .../models/mail_wizard_invite.py | 29 +++++-------------- .../tests/__init__.py | 24 +++------------ .../test_mail_restrict_follower_selection.py | 25 ++++------------ 8 files changed, 33 insertions(+), 123 deletions(-) diff --git a/mail_restrict_follower_selection/README.rst b/mail_restrict_follower_selection/README.rst index 97c76b0f..bbcd1aeb 100644 --- a/mail_restrict_follower_selection/README.rst +++ b/mail_restrict_follower_selection/README.rst @@ -1,5 +1,7 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 + :alt: License: AGPL-3 + +=========================== Restrict follower selection =========================== @@ -40,6 +42,7 @@ Contributors ------------ * Holger Brunn +* Nguyen Tan Phuc Maintainer ---------- diff --git a/mail_restrict_follower_selection/__init__.py b/mail_restrict_follower_selection/__init__.py index cdb7d736..9537e12d 100644 --- a/mail_restrict_follower_selection/__init__.py +++ b/mail_restrict_follower_selection/__init__.py @@ -1,20 +1,5 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# This module copyright (C) 2015 Therp BV . -# -# 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 (C) 2015 Therp BV +# Copyright (C) 2017 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + from . import models diff --git a/mail_restrict_follower_selection/__manifest__.py b/mail_restrict_follower_selection/__manifest__.py index a6d9c17d..2f81a548 100644 --- a/mail_restrict_follower_selection/__manifest__.py +++ b/mail_restrict_follower_selection/__manifest__.py @@ -1,26 +1,10 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2015 Therp BV . -# -# 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 (C) 2015 Therp BV +# Copyright (C) 2017 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + { "name": "Restrict follower selection", - "version": "10.0.1.0.0", + "version": "11.0.1.0.0", "author": "Therp BV,Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Social Network", diff --git a/mail_restrict_follower_selection/data/ir_actions.xml b/mail_restrict_follower_selection/data/ir_actions.xml index 39462e53..63c84f02 100644 --- a/mail_restrict_follower_selection/data/ir_actions.xml +++ b/mail_restrict_follower_selection/data/ir_actions.xml @@ -7,7 +7,6 @@ Configure the restriction on followers - automatic diff --git a/mail_restrict_follower_selection/models/__init__.py b/mail_restrict_follower_selection/models/__init__.py index cc7bb9cd..422ffaf5 100644 --- a/mail_restrict_follower_selection/models/__init__.py +++ b/mail_restrict_follower_selection/models/__init__.py @@ -1,20 +1,5 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# This module copyright (C) 2015 Therp BV . -# -# 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 (C) 2015 Therp BV +# Copyright (C) 2017 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + from . import mail_wizard_invite diff --git a/mail_restrict_follower_selection/models/mail_wizard_invite.py b/mail_restrict_follower_selection/models/mail_wizard_invite.py index 5ca0c7a5..216e26bb 100644 --- a/mail_restrict_follower_selection/models/mail_wizard_invite.py +++ b/mail_restrict_follower_selection/models/mail_wizard_invite.py @@ -1,24 +1,9 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# This module copyright (C) 2015 Therp BV (). -# -# 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 (C) 2015 Therp BV +# Copyright (C) 2017 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + from lxml import etree -from odoo import models, api +from odoo import api, models class MailWizardInvite(models.TransientModel): @@ -28,8 +13,8 @@ class MailWizardInvite(models.TransientModel): def _mail_restrict_follower_selection_get_domain(self): parameter_name = 'mail_restrict_follower_selection.domain' return self.env['ir.config_parameter'].get_param( - '%s.%s' % (parameter_name, - self.env.context.get('default_res_model')), + "{0}.{1}".format(parameter_name, + self.env.context.get('default_res_model')), self.env['ir.config_parameter'].get_param( parameter_name, default='[]') ) diff --git a/mail_restrict_follower_selection/tests/__init__.py b/mail_restrict_follower_selection/tests/__init__.py index 6d2a768a..10093c8f 100644 --- a/mail_restrict_follower_selection/tests/__init__.py +++ b/mail_restrict_follower_selection/tests/__init__.py @@ -1,21 +1,5 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2015 Therp BV . -# -# 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 (C) 2015 Therp BV +# Copyright (C) 2017 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + from . import test_mail_restrict_follower_selection diff --git a/mail_restrict_follower_selection/tests/test_mail_restrict_follower_selection.py b/mail_restrict_follower_selection/tests/test_mail_restrict_follower_selection.py index b89567ea..d1905b18 100644 --- a/mail_restrict_follower_selection/tests/test_mail_restrict_follower_selection.py +++ b/mail_restrict_follower_selection/tests/test_mail_restrict_follower_selection.py @@ -1,28 +1,13 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2015 Therp BV (). -# -# 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 (C) 2015 Therp BV +# Copyright (C) 2017 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + from lxml import etree from openerp.tests.common import TransactionCase class TestMailRestrictFollowerSelection(TransactionCase): + def test_fields_view_get(self): result = self.env['mail.wizard.invite'].fields_view_get( view_type='form')