diff options
| author | Pierre Masereel <pim@odoo.com> | 2018-08-08 13:47:43 +0200 |
|---|---|---|
| committer | Pierre Masereel <pim@odoo.com> | 2018-08-10 11:25:03 +0200 |
| commit | bf45668faf29c5d93e9d0a2daf42defaba15ddb3 (patch) | |
| tree | 2c62bbac5693a8e03b4891285345f9fc5cdc633b /odoo/addons/base/models/assetsbundle.py | |
| parent | 2633cb9eab03fc6b881f1b8132b3ab39aff81140 (diff) | |
[FIX] base: flex for wkhtmltopdf
Since the removing of the flex mixin in rev: https://github.com/odoo/odoo/commit/770aec399c4e6e29cfc5854318cbda19a605315d
The flex is bad rendered in pdf by wkhtmltopdf, because it uses
-webkit-box and not -webkit-flex. So we set it back through the post
processing regexp
Diffstat (limited to 'odoo/addons/base/models/assetsbundle.py')
| -rw-r--r-- | odoo/addons/base/models/assetsbundle.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/addons/base/models/assetsbundle.py b/odoo/addons/base/models/assetsbundle.py index 345ab279e32..eaaaa2f54a0 100644 --- a/odoo/addons/base/models/assetsbundle.py +++ b/odoo/addons/base/models/assetsbundle.py @@ -452,9 +452,9 @@ class AssetsBundle(object): # Post process the produced css to add required vendor prefixes here compiled = re.sub(r'(appearance: (\w+);)', r'-webkit-appearance: \2; -moz-appearance: \2; \1', compiled); - compiled = re.sub(r'(display: ((?:inline-)?)flex((?: ?!important)?);)', r'display: -webkit-\2flex\3; \1', compiled) # For PhantomJS tests + compiled = re.sub(r'(display: ((?:inline-)?)flex((?: ?!important)?);)', r'display: -webkit-\2box\3; display: -webkit-\2flex\3; \1', compiled) # For PhantomJS tests and wkhtmltopdf compiled = re.sub(r'(flex-flow: (\w+ \w+);)', r'-webkit-flex-flow: \2; \1', compiled) # For PhantomJS tests - compiled = re.sub(r'(flex: (\d+ \d+ (?:\d+|auto));)', r'-webkit-flex: \2; \1', compiled) # For PhantomJS tests + compiled = re.sub(r'(flex: ((\d)+ \d+ (?:\d+|auto));)', r'-webkit-box-flex: \3; -webkit-flex: \2; \1', compiled) # For PhantomJS tests and wkhtmltopdf return compiled |
