diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index f2101b27fd3..5bf31d341ac 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -1088,16 +1088,7 @@ class Menu(http.Controller):
"""
s = request.session
Menus = s.model('ir.ui.menu')
- # If a menu action is defined use its domain to get the root menu items
- user_menu_id = s.model('res.users').read([s.uid], ['menu_id'],
- request.context)[0]['menu_id']
-
menu_domain = [('parent_id', '=', False)]
- if user_menu_id:
- domain_string = s.model('ir.actions.act_window').read(
- [user_menu_id[0]], ['domain'],request.context)[0]['domain']
- if domain_string:
- menu_domain = ast.literal_eval(domain_string)
return Menus.search(menu_domain, 0, False, False, request.context)
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js
index a4bcd1922de..74866112d99 100644
--- a/addons/web/static/src/js/core.js
+++ b/addons/web/static/src/js/core.js
@@ -460,14 +460,11 @@ instance.web.Session.include( /** @lends instance.web.Session# */{
.appendTo(document.body)
.load(function () {
try {
- if (options.error) {
- if (!this.contentDocument.body.childNodes[1]) {
- options.error(this.contentDocument.body.childNodes);
- }
- else {
- options.error(JSON.parse(this.contentDocument.body.childNodes[1].textContent));
- }
- }
+ if (options.error) {
+ var body = this.contentDocument.body;
+ var node = body.childNodes[1] || body.childNodes[0];
+ options.error(JSON.parse(node.textContent));
+ }
} finally {
complete();
}
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 247fd2d2a1a..e14d60747ed 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -3356,13 +3356,16 @@ instance.web.form.CompletionFieldMixin = {
instance.web.form.M2ODialog = instance.web.Dialog.extend({
template: "M2ODialog",
init: function(parent) {
+ this.name = parent.string;
this._super(parent, {
- title: _.str.sprintf(_t("Add %s"), parent.string),
+ title: _.str.sprintf(_t("Create a %s"), parent.string),
size: 'medium',
});
},
start: function() {
var self = this;
+ var text = _.str.sprintf(_t("You are creating a new %s, are you sure it does not exist yet?"), self.name);
+ this.$("p").text( text );
this.$buttons.html(QWeb.render("M2ODialog.buttons"));
this.$("input").val(this.getParent().last_query);
this.$buttons.find(".oe_form_m2o_qc_button").click(function(){
@@ -3621,6 +3624,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
minLength: 0,
delay: 250
});
+ // set position for list of suggestions box
+ this.$input.autocomplete( "option", "position", { my : "left top", at: "left bottom" } );
this.$input.autocomplete("widget").openerpClass();
// used to correct a bug when selecting an element by pushing 'enter' in an editable list
this.$input.keyup(function(e) {
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 24c5ba625b0..49c40579f27 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -1948,13 +1948,14 @@
-
-
-
+
+ or
+
diff --git a/addons/web/tests/test_menu.py b/addons/web/tests/test_menu.py
index fb9337a589b..0978a7093ad 100644
--- a/addons/web/tests/test_menu.py
+++ b/addons/web/tests/test_menu.py
@@ -28,9 +28,7 @@ class LoadTest(common.MockRequestCase):
self.MockMenus = model('ir.ui.menu')
# Mock the absence of custom menu
- model('res.users').read.return_value = [{
- 'menu_id': False
- }]
+ model('res.users').read.return_value = []
def tearDown(self):
del self.MockMenus
diff --git a/addons/web_graph/static/src/js/graph_widget.js b/addons/web_graph/static/src/js/graph_widget.js
index 84ca75ddda2..ce73a0b51c6 100644
--- a/addons/web_graph/static/src/js/graph_widget.js
+++ b/addons/web_graph/static/src/js/graph_widget.js
@@ -260,21 +260,12 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
option_selection: function (event) {
event.preventDefault();
switch (event.currentTarget.getAttribute('data-choice')) {
- case 'bar_grouped':
- this.bar_ui = 'group';
- if (this.mode === 'bar') {
- this.display_data();
- }
- break;
- case 'bar_stacked':
- this.bar_ui = 'stack';
- if (this.mode === 'bar') {
- this.display_data();
- }
- break;
case 'swap_axis':
this.swap_axis();
break;
+ case 'expand_all':
+ this.pivot.expand_all().then(this.proxy('display_data'));
+ break;
case 'update_values':
this.pivot.update_data().then(this.proxy('display_data'));
break;
diff --git a/addons/web_graph/static/src/xml/web_graph.xml b/addons/web_graph/static/src/xml/web_graph.xml
index 4522fd2504f..81804e5a9b1 100644
--- a/addons/web_graph/static/src/xml/web_graph.xml
+++ b/addons/web_graph/static/src/xml/web_graph.xml
@@ -35,6 +35,9 @@
+