summaryrefslogtreecommitdiff
path: root/odoo
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-05-08 18:12:03 +0200
committerChristophe Simonis <chs@odoo.com>2018-05-08 18:12:03 +0200
commitf2e105eeca409e55be0408edcc986b39fd026094 (patch)
tree7c5c581d5c2ffe76bcdc3d8278a54fc542390dd9 /odoo
parent652e336deb1846a64abb5e2032864d5e17bf03b6 (diff)
parentd3a040cebe11c30697aebbafeb7d52888d3bff70 (diff)
[MERGE] forward port branch saas-15 up to d3a040cebe1
Diffstat (limited to 'odoo')
-rw-r--r--odoo/netsvc.py7
-rw-r--r--odoo/tools/mail.py7
2 files changed, 11 insertions, 3 deletions
diff --git a/odoo/netsvc.py b/odoo/netsvc.py
index 7772d7d47cd..c8d9dbb6441 100644
--- a/odoo/netsvc.py
+++ b/odoo/netsvc.py
@@ -119,6 +119,13 @@ def init_logger():
if dirname and not os.path.isdir(dirname):
os.makedirs(dirname)
if tools.config['logrotate'] is not False:
+ if tools.config['workers'] > 1:
+ # TODO: fallback to regular file logging in master for safe(r) defaults?
+ #
+ # Doing so here would be a good idea but also might break
+ # situations were people do log-shipping of rotated data?
+ _logger.warn("WARNING: built-in log rotation is not reliable in multi-worker scenarios and may incur significant data loss. "
+ "It is strongly recommended to use an external log rotation utility or use system loggers (--syslog) instead.")
handler = logging.handlers.TimedRotatingFileHandler(filename=logf, when='D', interval=1, backupCount=30)
elif os.name == 'posix':
handler = logging.handlers.WatchedFileHandler(logf)
diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py
index ce1ccb90e3a..97a3e427a94 100644
--- a/odoo/tools/mail.py
+++ b/odoo/tools/mail.py
@@ -45,11 +45,12 @@ class _Cleaner(clean.Cleaner):
_style_whitelist = [
'font-size', 'font-family', 'font-weight', 'background-color', 'color', 'text-align',
'line-height', 'letter-spacing', 'text-transform', 'text-decoration',
+ 'float', 'vertical-align',
'padding', 'padding-top', 'padding-left', 'padding-bottom', 'padding-right',
- 'margin', 'margin-top', 'margin-left', 'margin-bottom', 'margin-right'
+ 'margin', 'margin-top', 'margin-left', 'margin-bottom', 'margin-right',
# box model
- 'border', 'border-color', 'border-radius', 'border-style', 'height',
- 'margin', 'padding', 'width', 'max-width', 'min-width',
+ 'border', 'border-color', 'border-radius', 'border-style', 'border-width',
+ 'height', 'margin', 'padding', 'width', 'max-width', 'min-width',
# tables
'border-collapse', 'border-spacing', 'caption-side', 'empty-cells', 'table-layout']