summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-06-11 18:07:29 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-06-11 18:07:29 +0200
commitd369945699f19faec36a27fd3954c34bce8bae8a (patch)
tree7db5034467208297fc577b726dca592b580d0a0a
parent1ddac412b7e90a7cbfe256d4106cc7f184248bca (diff)
[IMP] added warning messages in o2m when using an unsupported type of view, also removed form view handling in o2m
bzr revid: nicolas.vanhoren@openerp.com-20120611160729-wtqg0o0ry12pyi04
-rw-r--r--addons/web/static/src/js/view_form.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 2a858a6df4e..836bfff7ec5 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2737,7 +2737,6 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
this.dataset.o2m = this;
this.dataset.parent_view = this.view;
this.dataset.child_name = this.name;
- //this.dataset.child_name =
this.dataset.on_change.add_last(function() {
self.trigger_on_change();
});
@@ -2769,6 +2768,11 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
modes = !!modes ? modes.split(",") : ["tree"];
var views = [];
_.each(modes, function(mode) {
+ if (! _.include(["list", "tree", "graph", "kanban"], mode)) {
+ instance.webclient.notification.warn(
+ _.str.sprintf("View type '%s' is not supported in One2Many.", mode));
+ return;
+ }
var view = {
view_id: false,
view_type: mode == "tree" ? "list" : mode,