From 9834565c6541edf643d314fc11f70d324238e099 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 5 Apr 2012 18:03:15 +0200 Subject: [imp] refactoring to allow easy usage of embedded view in any view bzr revid: nicolas.vanhoren@openerp.com-20120405160315-vn2gawdesxuy53b3 --- addons/web/static/src/js/view_tree.js | 1 - 1 file changed, 1 deletion(-) (limited to 'addons/web/static/src/js/view_tree.js') diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js index 6039e4a0822..72a643b3d51 100644 --- a/addons/web/static/src/js/view_tree.js +++ b/addons/web/static/src/js/view_tree.js @@ -39,7 +39,6 @@ openerp.web.TreeView = openerp.web.View.extend(/** @lends openerp.web.TreeView# }, start: function () { - this._super(); return this.rpc("/web/treeview/load", { model: this.model, view_id: this.view_id, -- cgit v1.2.3 From 759be357ce22c2ebde17a509cb80b9af01089f81 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 17 Apr 2012 14:15:59 +0200 Subject: [imp] remaining of refactoring bzr revid: nicolas.vanhoren@openerp.com-20120417121559-e94wr8ym8sb2f7c1 --- addons/web/static/src/js/view_tree.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'addons/web/static/src/js/view_tree.js') diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js index 72a643b3d51..9e938fe293a 100644 --- a/addons/web/static/src/js/view_tree.js +++ b/addons/web/static/src/js/view_tree.js @@ -2,12 +2,12 @@ * OpenERP web library *---------------------------------------------------------*/ -openerp.web.view_tree = function(openerp) { -var QWeb = openerp.web.qweb, - _lt = openerp.web._lt; +openerp.web.view_tree = function(instance) { +var QWeb = instance.web.qweb, + _lt = instance.web._lt; -openerp.web.views.add('tree', 'openerp.web.TreeView'); -openerp.web.TreeView = openerp.web.View.extend(/** @lends openerp.web.TreeView# */{ +instance.web.views.add('tree', 'instance.web.TreeView'); +instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeView# */{ display_name: _lt('Tree'), /** * Indicates that this view is not searchable, and thus that no search @@ -17,8 +17,8 @@ openerp.web.TreeView = openerp.web.View.extend(/** @lends openerp.web.TreeView# /** * Genuine tree view (the one displayed as a tree, not the list) * - * @constructs openerp.web.TreeView - * @extends openerp.web.View + * @constructs instance.web.TreeView + * @extends instance.web.View * * @param parent * @param dataset @@ -203,7 +203,7 @@ openerp.web.TreeView = openerp.web.View.extend(/** @lends openerp.web.TreeView# 'fields_view': self.fields_view.arch.children, 'fields': self.fields, 'level': $curr_node.data('level') || 0, - 'render': openerp.web.format_value, + 'render': instance.web.format_value, 'color_for': self.color_for }); @@ -226,12 +226,12 @@ openerp.web.TreeView = openerp.web.View.extend(/** @lends openerp.web.TreeView# return this.rpc('/web/treeview/action', { id: id, model: this.dataset.model, - context: new openerp.web.CompoundContext( + context: new instance.web.CompoundContext( this.dataset.get_context(), local_context) }).pipe(function (actions) { if (!actions.length) { return; } var action = actions[0][2]; - var c = new openerp.web.CompoundContext(local_context); + var c = new instance.web.CompoundContext(local_context); if (action.context) { c.add(action.context); } -- cgit v1.2.3