Port base_usability, sale_usability, sale_stock_usability to v10

This commit is contained in:
Alexis de Lattre
2016-10-27 09:33:15 +02:00
parent 9e37c6e1ae
commit 42233bc0ce
23 changed files with 164 additions and 474 deletions

View File

@@ -1,26 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Base Usability module for Odoo
# Copyright (C) 2015 Akretion (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
# © 2015-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models
from odoo import models, api
import logging
logger = logging.getLogger(__name__)
@@ -29,18 +11,18 @@ logger = logging.getLogger(__name__)
class IrMailServer(models.Model):
_inherit = "ir.mail_server"
@api.model
def send_email(
self, cr, uid, message, mail_server_id=None, smtp_server=None,
self, message, mail_server_id=None, smtp_server=None,
smtp_port=None, smtp_user=None, smtp_password=None,
smtp_encryption=None, smtp_debug=False, context=None):
smtp_encryption=None, smtp_debug=False):
logger.info("Sending email to %s copy %s with subject %s",
message.get('To'),
message.get('Cc'),
message.get('Subject'))
return super(IrMailServer, self).send_email(
cr, uid, message, mail_server_id=mail_server_id,
message, mail_server_id=mail_server_id,
smtp_server=smtp_server, smtp_port=smtp_port,
smtp_user=smtp_user, smtp_password=smtp_password,
smtp_encryption=smtp_encryption, smtp_debug=smtp_debug,
context=context)
smtp_encryption=smtp_encryption, smtp_debug=smtp_debug)