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 9, 2022
1 parent 0c8eb7a commit 4a48717
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 <[email protected]>
* (https://www.tecnativa.com)
* Ignacio Ales <[email protected]>
* Kiril Vangelovski <[email protected]>

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 4a48717

Please sign in to comment.