summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-03-24 10:29:06 +0100
committerAaron Bohy <aab@odoo.com>2015-03-24 13:33:10 +0100
commit48f4605f5a206eedb905da1c9683115f1ae2231f (patch)
tree19e585d4145031fce310f36245f5cc684e30bebf /addons/web/static/src/js/framework
parent73e855aee9b6d812ea22032477300e0b1b3b6381 (diff)
[IMP] Web, Web_diagram: better integration of the Diagram view
The 'New node' button is inserted in the ControlPanel. Breadcrumbs are now handled as well. The 'multi_record' flag has been added to the views to distinguish views displaying several records, like the List view, from views displaying a single record like the Form view and the Diagram view. This flag is used by the ViewManager to manage its view stack. Fixes the breadcrumb bug when switching between Form view and Diagram view (the last element of the view stack is now replaced by the new one in that case).
Diffstat (limited to 'addons/web/static/src/js/framework')
-rw-r--r--addons/web/static/src/js/framework/view.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/framework/view.js b/addons/web/static/src/js/framework/view.js
index 4ef61233a9d..42ad86b4044 100644
--- a/addons/web/static/src/js/framework/view.js
+++ b/addons/web/static/src/js/framework/view.js
@@ -13,6 +13,9 @@ var View = Widget.extend({
* Define a view type for each view to allow automatic call to fields_view_get.
*/
view_type: undefined,
+ // multi_record is used to distinguish views displaying a single record
+ // (e.g. FormView) from those that display several records (e.g. ListView)
+ multi_record: true,
init: function(parent, dataset, view_id, options) {
this._super(parent);
this.ViewManager = parent;