From 94f81ed41dfdac129c53e585b5b7ba03c9a1294e Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Fri, 7 Oct 2022 09:37:00 +0000 Subject: [PATCH] [FIX] base: fix sourcemap header offset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in b1d57adf6ff3 the size of the header added to source files while concatenating them was reduced, but the corresponding offset use when generating source maps was not adapted, causing source maps to drift further and further from the actual source location the further in the compiled asset the line is. This commit fixes that by decrementing the header offset as needed. closes odoo/odoo#102651 X-original-commit: 4d4585ee6c905c2a3adc4692098c1a3544417629 Signed-off-by: Géry Debongnie Signed-off-by: Samuel Degueldre --- odoo/addons/base/models/assetsbundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/addons/base/models/assetsbundle.py b/odoo/addons/base/models/assetsbundle.py index 56beccc0319..17d131ddc30 100644 --- a/odoo/addons/base/models/assetsbundle.py +++ b/odoo/addons/base/models/assetsbundle.py @@ -429,7 +429,7 @@ class AssetsBundle(object): ) content_bundle_list = [] content_line_count = 0 - line_header = 6 # number of lines added by with_header() + line_header = 5 # number of lines added by with_header() for asset in self.javascripts: if asset.is_transpiled: # '+ 3' corresponds to the 3 lines added at the beginning of the file during transpilation.