From 551715b791186929710396ed326a9a96d9398a3a Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Thu, 30 Mar 2017 10:18:40 +0200 Subject: [PATCH] [FIX][web_export_view] Correctly export negative monetary numbers --- web_export_view/static/src/js/web_export_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_export_view/static/src/js/web_export_view.js b/web_export_view/static/src/js/web_export_view.js index 23786f0f..5cd15e16 100644 --- a/web_export_view/static/src/js/web_export_view.js +++ b/web_export_view/static/src/js/web_export_view.js @@ -76,8 +76,8 @@ Sidebar.include({ var $cell = $row.find('td[data-field="' + this + '"]'); var text = $cell.text(); if ($cell.hasClass("oe_list_field_monetary")) { - // Remove all but digits, dots and commas - text = text.replace(/[^\d\.,]/g, ""); + // Remove all but digits, minus, dots and commas + text = text.replace(/[^\d\.,-]/g, ""); export_row.push( formats.parse_value(text, {"type": "monetary"}) );