From 24a2d124928951726b1e3f677a453758a3bb2d0e Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 8 Oct 2014 11:33:22 +0200 Subject: [PATCH] Use absolute imports for openerp and new Model classes --- mail_environment/env_mail.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mail_environment/env_mail.py b/mail_environment/env_mail.py index 252703d2a..88c8a15bd 100644 --- a/mail_environment/env_mail.py +++ b/mail_environment/env_mail.py @@ -19,13 +19,12 @@ # ############################################################################## -from osv import fields -from osv import osv +from openerp.osv import orm, fields -from server_environment import serv_config +from openerp.addons.server_environment import serv_config -class IrMail(osv.osv): +class IrMail(orm.Model): _inherit = "ir.mail_server" def _get_smtp_conf(self, cursor, uid, ids, name, args, context=None): @@ -95,10 +94,8 @@ class IrMail(osv.osv): "- ssl: SMTP sessions are encrypted with SSL/TLS through a dedicated port (default: 465)", size=64)} -IrMail() - -class FetchmailServer(osv.osv): +class FetchmailServer(orm.Model): """Incoming POP/IMAP mail server account""" _inherit = 'fetchmail.server' @@ -222,4 +219,3 @@ class FetchmailServer(osv.osv): type="char", multi='income_mail_config', size=64)} -FetchmailServer()