[imp] added warning when no item selected in reports
authorniv-openerp <nicolas.vanhoren@openerp.com>
Wed, 7 Sep 2011 13:28:10 +0000 (15:28 +0200)
committerniv-openerp <nicolas.vanhoren@openerp.com>
Wed, 7 Sep 2011 13:28:10 +0000 (15:28 +0200)
bzr revid: nicolas.vanhoren@openerp.com-20110907132810-q0norgc0qrlvg3hs

addons/web/static/src/js/views.js

index 37738d3..d94c697 100644 (file)
@@ -444,7 +444,10 @@ openerp.web.Sidebar = openerp.web.Widget.extend({
                 if (item.action) {
                     var ids = self.widget_parent.get_selected_ids();
                     if (ids.length == 0) {
-                        //TODO niv: maybe show a warning?
+                        $("<div />").text(_t("You must choose at least one record.")).dialog({
+                            title: _t("Warning"),
+                            modal: true
+                        });
                         return false;
                     }
                     var additional_context = {