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:41 +0100
commit3b2127c690959e1e43063b09472028a69a62fcb2 (patch)
treea4ec11fc358cc1e99865196673a86fc16d9b4762 /addons/pos_restaurant/static/src/js/multiprint.js
parent3b9dda6106f9dd3eabd5dcb14f484a6072937dd6 (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});