diff options
| author | Joren Van Onder <jov@odoo.com> | 2016-02-01 14:03:30 +0100 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2016-02-01 14:03:30 +0100 |
| commit | fb460462d0dbab3d3c45abf2334dc830a1734898 (patch) | |
| tree | 7b8c0a1bd2eeb6e886c9959ed80d4b768f9d8c16 /addons/pos_restaurant/static/src/js/notes.js | |
| parent | 2616defe35d93193418a97030c307ec6551d0b00 (diff) | |
[FIX] pos_restaurant: correctly pass arguments from overriden method
When overriding a method that calls its super later on, it's important
that arguments is used to correctly pass all arguments to the super.
Consider the following:
// module 1 (not correct)
method: function(a) {
return _super.call(this, a);
}
// module 2 (correct)
method: function(a, b) {
return _super.apply(this, arguments);
}
If the method of module 1 gets called first it will throw away the b
argument when it calls _super. Therefore the b argument will never
arrive in method of module 2.
Diffstat (limited to 'addons/pos_restaurant/static/src/js/notes.js')
| -rw-r--r-- | addons/pos_restaurant/static/src/js/notes.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/pos_restaurant/static/src/js/notes.js b/addons/pos_restaurant/static/src/js/notes.js index 116f9c3709a..869b5201c0c 100644 --- a/addons/pos_restaurant/static/src/js/notes.js +++ b/addons/pos_restaurant/static/src/js/notes.js @@ -22,7 +22,7 @@ openerp.pos_restaurant.load_notes = function(instance,module){ if (orderline.get_note() !== this.get_note()) { return false; } else { - return _super_orderline.can_be_merged_with.call(this,orderline); + return _super_orderline.can_be_merged_with.apply(this,arguments); } }, clone: function(){ |
