From 34e7e53ea9ec6505b21238db46b191f5ec36c291 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 4 Nov 2019 07:40:20 +0000 Subject: [PATCH] [FIX] core: always provide tools.osutil Turns out almost no user of odoo.tools.osutil actually imports it. Following odoo/odoo#39573 (355e3609732bdc1ef0563edadb8634a322d7d5af) removing what were apparently the only two users of the submodule properly importing it, other calls to osutil features now blow up, which went unnoticed as these calls are lazy (so don't prevent starting the server) and only happen for very specific operations. The smallest change there is to simply re-enable the old behaviour by explicitly importing osutil from tools.__init__. closes odoo/odoo#39705 Signed-off-by: Xavier Morel (xmo) --- odoo/tools/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odoo/tools/__init__.py b/odoo/tools/__init__.py index d2666bd1cbf..b3619c88213 100644 --- a/odoo/tools/__init__.py +++ b/odoo/tools/__init__.py @@ -4,6 +4,7 @@ from . import pycompat from . import win32 from . import appdirs +from . import osutil from . import pdf from .config import config from .misc import * @@ -17,4 +18,4 @@ from .debugger import * from .xml_utils import * from .date_utils import * from .convert import * -from .template_inheritance import * \ No newline at end of file +from .template_inheritance import *