diff --git a/.isort.cfg b/.isort.cfg index f60f5e2..b64cbab 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -9,4 +9,4 @@ line_length=88 known_odoo=odoo known_odoo_addons=odoo.addons sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER -known_third_party=openerp,requests,simplejson,werkzeug +known_third_party=requests,simplejson,werkzeug diff --git a/mail_base/controllers/main.py b/mail_base/controllers/main.py index 076af1c..9099e48 100644 --- a/mail_base/controllers/main.py +++ b/mail_base/controllers/main.py @@ -1,6 +1,7 @@ -from odoo.addons.bus.controllers.main import BusController from odoo.http import request +from odoo.addons.bus.controllers.main import BusController + class MailChatController(BusController): # ----------------------------- diff --git a/mail_fix_553/mail_fix_553.py b/mail_fix_553/mail_fix_553.py index 665149c..890f29d 100644 --- a/mail_fix_553/mail_fix_553.py +++ b/mail_fix_553/mail_fix_553.py @@ -4,11 +4,12 @@ import re from email.utils import formataddr from odoo import SUPERUSER_ID, tools -from odoo.addons.base.ir.ir_mail_server import MailDeliveryException from odoo.osv import osv from odoo.tools.safe_eval import safe_eval as eval from odoo.tools.translate import _ +from odoo.addons.base.ir.ir_mail_server import MailDeliveryException + _logger = logging.getLogger(__name__) @@ -146,7 +147,8 @@ class MailMail(osv.Model): attachments=attachments, message_id=mail.message_id, references=mail.references, - object_id=mail.res_id and ("{}-{}".format(mail.res_id, mail.model)), + object_id=mail.res_id + and ("{}-{}".format(mail.res_id, mail.model)), subtype="html", subtype_alternative="plain", headers=headers, diff --git a/mail_move_message/mail_move_message_models.py b/mail_move_message/mail_move_message_models.py index b729648..c94ffed 100644 --- a/mail_move_message/mail_move_message_models.py +++ b/mail_move_message/mail_move_message_models.py @@ -429,9 +429,7 @@ class MailMessage(models.Model): # building message tree return if not self.author_id: - self.write( - {"author_id": author.id} - ) + self.write({"author_id": author.id}) vals = {} if move_back: @@ -463,9 +461,7 @@ class MailMessage(models.Model): "res_partner_id": self.env.user.partner_id.id, "is_read": False, } - self.write( - {"notification_ids": [(0, 0, notification)]} - ) + self.write({"notification_ids": [(0, 0, notification)]}) for r in self.all_child_ids: r_vals = vals.copy() @@ -519,8 +515,7 @@ class MailMessage(models.Model): for record in reads: name = record["record_name"] or "" extended_name = " [{}] ID {}".format( - record.get("model", "UNDEF"), - record.get("res_id", "UNDEF"), + record.get("model", "UNDEF"), record.get("res_id", "UNDEF"), ) res.append((record["id"], name + extended_name)) return res diff --git a/mailgun/models/ir_config_parameter.py b/mailgun/models/ir_config_parameter.py index 84e6a2d..57d7eac 100644 --- a/mailgun/models/ir_config_parameter.py +++ b/mailgun/models/ir_config_parameter.py @@ -2,6 +2,7 @@ import logging import requests import simplejson + from odoo import api, models _logger = logging.getLogger(__name__)