From 064722836cfa4addfd6f575f40d3086839886623 Mon Sep 17 00:00:00 2001 From: Kiril Vangelovski Date: Wed, 13 Feb 2019 12:38:15 +0100 Subject: [PATCH] [FIX] pos_lot_selection: ES6 code breaks phantomjs tests Object.assign is introduced in ES6 (2015) which is not supported by PhantomJS. Replace it with the equivalent _.extend function to prevent frontend tests from failing. 1. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Specifications 2. https://github.com/ariya/phantomjs/issues/14506 --- pos_lot_selection/README.rst | 1 + pos_lot_selection/static/src/js/chrome.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pos_lot_selection/README.rst b/pos_lot_selection/README.rst index 0580ada4..6fa2f680 100644 --- a/pos_lot_selection/README.rst +++ b/pos_lot_selection/README.rst @@ -62,6 +62,7 @@ Contributors * David * (https://www.tecnativa.com) * Ignacio Ales +* Kiril Vangelovski Do not contact contributors directly about support or help with technical issues. diff --git a/pos_lot_selection/static/src/js/chrome.js b/pos_lot_selection/static/src/js/chrome.js index c777581b..8714a7d1 100644 --- a/pos_lot_selection/static/src/js/chrome.js +++ b/pos_lot_selection/static/src/js/chrome.js @@ -1,4 +1,5 @@ /* Copyright 2018 Tecnativa - David Vidal + Copyright 2019 Lambda IS DOOEL License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ odoo.define("pos_lot_selection.chrome", function (require) { @@ -14,7 +15,7 @@ odoo.define("pos_lot_selection.chrome", function (require) { var events = { "change .packlot-line-select": "lot_to_input", }; - packlotline.events = Object.assign( + packlotline.events = _.extend( packlotline.events, events ); // Add methods over instanced popup