Skip to content

Commit

Permalink
[FIX] pos_lot_selection: ES6 code breaks phantomjs tests
Browse files Browse the repository at this point in the history
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. ariya/phantomjs#14506
  • Loading branch information
kirca authored and i-vyshnevska committed Aug 24, 2022
1 parent df549bf commit 23b2273
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pos_lot_selection/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Contributors
* David <david.vidal@tecnativa.com>
* (https://www.tecnativa.com)
* Ignacio Ales <ignacio.ales@guadaltech.es>
* Kiril Vangelovski <kiril@lambda-is.com>

Do not contact contributors directly about support or help with technical issues.

Expand Down
3 changes: 2 additions & 1 deletion pos_lot_selection/static/src/js/chrome.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Copyright 2018 Tecnativa - David Vidal
Copyright 2019 Lambda IS DOOEL <https://www.lambda-is.com>
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */

odoo.define("pos_lot_selection.chrome", function (require) {
Expand All @@ -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
Expand Down

0 comments on commit 23b2273

Please sign in to comment.