Browse Source

[REF] emc_api: pass lint

pull/71/head
robin.keunen 5 years ago
parent
commit
5b205dc8dd
  1. 2
      .isort.cfg
  2. 4
      easy_my_coop_api/services/ping_service.py
  3. 19
      easy_my_coop_api/services/subscription_request_service.py

2
.isort.cfg

@ -9,4 +9,4 @@ line_length=79
known_odoo=odoo
known_odoo_addons=odoo.addons
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
known_third_party=addons,cStringIO,openerp,requests,setuptools,werkzeug,xlsxwriter
known_third_party=addons,cStringIO,lxml,openerp,requests,setuptools,werkzeug,xlsxwriter

4
easy_my_coop_api/services/ping_service.py

@ -1,11 +1,13 @@
# Copyright 2020 Coop IT Easy SCRL fs
# Robin Keunen <robin@coopiteasy.be>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo.addons.component.core import Component
from odoo import _
from odoo.addons.component.core import Component
class PingService(Component):
_inherit = "base.rest.service"

19
easy_my_coop_api/services/subscription_request_service.py

@ -1,13 +1,18 @@
# Copyright 2019 Coop IT Easy SCRL fs
# Robin Keunen <robin@coopiteasy.be>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
import logging
from odoo.addons.component.core import Component
from odoo.addons.base_rest.http import wrapJsonException
from werkzeug.exceptions import NotFound, BadRequest
from odoo.fields import Date
from werkzeug.exceptions import BadRequest, NotFound
from odoo import _
from odoo.fields import Date
from odoo.addons.base_rest.http import wrapJsonException
from odoo.addons.component.core import Component
from . import schemas
_logger = logging.getLogger(__name__)
@ -20,7 +25,7 @@ class SubscriptionRequestService(Component):
_usage = "subscription_request"
_collection = "emc.services"
_description = """
Subscription requests
Subscription requests
"""
def get(self, _id):
@ -33,7 +38,7 @@ class SubscriptionRequestService(Component):
)
def search(self, date_from=None, date_to=None):
_logger.info("search from %s to %s" % (date_from, date_to))
_logger.info("search from {} to {}".format(date_from, date_to))
domain = []
if date_from:
@ -70,7 +75,7 @@ class SubscriptionRequestService(Component):
def _to_dict(self, sr):
sr.ensure_one()
return {
"id": sr.id,
"id": sr.id,
"name": sr.name,
"email": sr.email,
"state": sr.state,

Loading…
Cancel
Save