Browse Source
Merge pull request #1353 from simahawk/smk-fix-lint
Global pylint cleanup
pull/1359/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with
32 additions and
50 deletions
-
base_cron_exclusion/models/ir_cron.py
-
base_technical_user/README.rst
-
database_cleanup/__init__.py
-
database_cleanup/__manifest__.py
-
database_cleanup/identifier_adapter.py
-
database_cleanup/models/create_indexes.py
-
database_cleanup/models/purge_columns.py
-
database_cleanup/models/purge_data.py
-
database_cleanup/models/purge_menus.py
-
database_cleanup/models/purge_models.py
-
database_cleanup/models/purge_modules.py
-
database_cleanup/models/purge_properties.py
-
database_cleanup/models/purge_tables.py
-
database_cleanup/models/purge_wizard.py
-
database_cleanup/tests/__init__.py
-
database_cleanup/tests/test_database_cleanup.py
-
module_auto_update/addon_hash.py
-
module_auto_update/migrations/10.0.2.0.0/pre-migrate.py
-
module_auto_update/models/module.py
-
module_auto_update/models/module_deprecated.py
-
module_auto_update/tests/sample_module/static/src/some.js
-
module_auto_update/tests/test_addon_hash.py
-
module_auto_update/tests/test_module.py
-
module_auto_update/tests/test_module_deprecated.py
-
scheduler_error_mailer/__init__.py
-
sentry/__init__.py
-
sentry/__manifest__.py
-
sentry/const.py
-
sentry/logutils.py
-
sentry/tests/__init__.py
-
sentry/tests/test_client.py
-
sentry/tests/test_logutils.py
|
|
@ -14,13 +14,13 @@ _logger = logging.getLogger(__name__) |
|
|
|
class IrCron(models.Model): |
|
|
|
_inherit = "ir.cron" |
|
|
|
|
|
|
|
@api.one |
|
|
|
@api.constrains('mutually_exclusive_cron_ids') |
|
|
|
def _check_auto_exclusion(self): |
|
|
|
if self in self.mutually_exclusive_cron_ids: |
|
|
|
raise ValidationError(_( |
|
|
|
"You can not mutually exclude a scheduled actions with " |
|
|
|
"itself.")) |
|
|
|
for item in self: |
|
|
|
if item in item.mutually_exclusive_cron_ids: |
|
|
|
raise ValidationError(_( |
|
|
|
"You can not mutually exclude a scheduled actions with " |
|
|
|
"itself.")) |
|
|
|
|
|
|
|
mutually_exclusive_cron_ids = fields.Many2many( |
|
|
|
comodel_name="ir.cron", relation="ir_cron_exclusion", |
|
|
|
|
|
@ -50,4 +50,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose |
|
|
|
mission is to support the collaborative development of Odoo features and |
|
|
|
promote its widespread use. |
|
|
|
|
|
|
|
To contribute to this module, please visit http://odoo-community.org. |
|
|
|
To contribute to this module, please visit http://odoo-community.org. |
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
from . import models |
|
|
@ -1,5 +1,4 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
{ |
|
|
|
'name': 'Database cleanup', |
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
from psycopg2.extensions import ISQLQuote |
|
|
|
|
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2017 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2017 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
from ..identifier_adapter import IdentifierAdapter |
|
|
|
from odoo import api, fields, models |
|
|
|
|
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
from odoo import _, api, fields, models |
|
|
|
from odoo.exceptions import UserError |
|
|
|
from ..identifier_adapter import IdentifierAdapter |
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
from odoo import _, api, fields, models |
|
|
|
from odoo.exceptions import UserError |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
from odoo import _, api, fields, models |
|
|
|
from odoo.exceptions import UserError |
|
|
|
|
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
from odoo import _, api, models, fields |
|
|
|
from odoo.exceptions import UserError |
|
|
|
from odoo.addons.base.ir.ir_model import MODULE_UNINSTALL_FLAG |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
from odoo import _, api, fields, models |
|
|
|
from odoo.exceptions import UserError |
|
|
|
from odoo.modules.module import get_module_path |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2017 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2017 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
from odoo import api, models, fields |
|
|
|
REASON_DUPLICATE = 1 |
|
|
|
REASON_DEFAULT = 2 |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
from odoo import api, fields, models, _ |
|
|
|
from odoo.exceptions import UserError |
|
|
|
from ..identifier_adapter import IdentifierAdapter |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2014-2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
|
|
|
|
import logging |
|
|
|
from odoo import _, api, fields, models |
|
|
|
from odoo.exceptions import AccessDenied |
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
from . import test_database_cleanup |
|
|
@ -1,5 +1,4 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2016 Therp BV <http://therp.nl> |
|
|
|
# Copyright 2016 Therp BV <http://therp.nl> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
from psycopg2 import ProgrammingError |
|
|
|
from odoo.modules.registry import Registry |
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2018 Tecnativa - Jairo Llopis |
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). |
|
|
|
import logging |
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2017 LasLabs Inc. |
|
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
# Copyright 2017 LasLabs Inc. |
|
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
# pylint: disable=consider-merging-classes-inherited |
|
|
|
|
|
|
|
from odoo import api, fields, models |
|
|
|
|
|
|
|
|
|
@ -1 +1 @@ |
|
|
|
/* javascript */ |
|
|
|
/* Javascript */ |
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2017 LasLabs Inc. |
|
|
|
# Copyright 2018 ACSONE SA/NV. |
|
|
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|
|
|
|
|
@ -9,8 +9,7 @@ from odoo.modules import get_module_path |
|
|
|
from odoo.tests.common import TransactionCase |
|
|
|
from odoo.tools import mute_logger |
|
|
|
|
|
|
|
from odoo.addons.module_auto_update.addon_hash import addon_hash |
|
|
|
|
|
|
|
from .. addon_hash import addon_hash |
|
|
|
from ..models.module_deprecated import PARAM_DEPRECATED |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre |
|
|
|
# © 2016 Sodexis |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016-2017 Versada <https://versada.eu/> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016-2017 Versada <https://versada.eu/> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
{ |
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016-2017 Versada <https://versada.eu/> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016-2017 Versada <https://versada.eu/> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016-2017 Versada <https://versada.eu/> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016-2017 Versada <https://versada.eu/> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016-2017 Versada <https://versada.eu/> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|