summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static/src/js/multiprint.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2018-02-06 11:17:06 +0100
committerChristophe Matthieu <chm@odoo.com>2018-02-08 15:46:00 +0100
commit1d49d52b3a03f043d877447cae31c0768158c51c (patch)
treed1295f1839d477ddbc2e6c18461c30323fe0d8b0 /addons/pos_restaurant/static/src/js/multiprint.js
parentb28ceec009e0e7fd7efa82177540ff7489112f5e (diff)
[FIX] web: properly set parent when using mixins
The parentedMixin doesn't automatically set the parent, so when this mixin is used, the parent must be set manually. This wasn't done at several places, and thus those elements weren't destroyed with their actual parent. In master, we should probably make the ParentedMixin set the parent itself.
Diffstat (limited to 'addons/pos_restaurant/static/src/js/multiprint.js')
-rw-r--r--addons/pos_restaurant/static/src/js/multiprint.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/pos_restaurant/static/src/js/multiprint.js b/addons/pos_restaurant/static/src/js/multiprint.js
index dac0a906850..1a135bdfe03 100644
--- a/addons/pos_restaurant/static/src/js/multiprint.js
+++ b/addons/pos_restaurant/static/src/js/multiprint.js
@@ -11,7 +11,8 @@ var QWeb = core.qweb;
var Printer = core.Class.extend(mixins.PropertiesMixin,{
init: function(parent,options){
- mixins.PropertiesMixin.init.call(this,parent);
+ mixins.PropertiesMixin.init.call(this);
+ this.setParent(parent);
options = options || {};
var url = options.url || 'http://localhost:8069';
this.connection = new Session(undefined,url, { use_cors: true});