diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-06-11 18:07:29 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-06-11 18:07:29 +0200 |
| commit | d369945699f19faec36a27fd3954c34bce8bae8a (patch) | |
| tree | 7db5034467208297fc577b726dca592b580d0a0a /addons | |
| parent | 1ddac412b7e90a7cbfe256d4106cc7f184248bca (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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 6 |
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, |
