diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index baeb87acbd0..ee81492b8ad 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -652,7 +652,7 @@ cursor: pointer; } .openerp .oe_dropdown_toggle { - color: rgba(0, 0, 0, 0.3); + color: #4C4C4C; font-weight: normal; } .openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened { diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 2474ba9dc06..3923fcaf2ff 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -564,7 +564,7 @@ $sheet-padding: 16px position: relative cursor: pointer .oe_dropdown_toggle - color: rgba(0,0,0,0.3) + color: #4C4C4C font-weight: normal .oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened display: block diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 6d7e3c39054..0a6f4ed3a29 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -990,7 +990,7 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, { }; date.today = new py.def(function () { var d = new Date(); - return new date(d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate()); + return new date(d.getFullYear(), d.getMonth() + 1, d.getDate()); }); datetime.time = new py.type(function time() { throw new Error('datetime.time not implemented'); diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 8b12f39c5e4..fa1348a5f8c 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -119,6 +119,9 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess }, session_logout: function() { this.set_cookie('session_id', ''); + var url = "#"; + $.bbq.pushState(url); + window.location.search = ""; return this.rpc("/web/session/destroy", {}); }, get_cookie: function (name) { diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index b0ad23d6854..927d585a5be 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1033,7 +1033,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM || field.get("readonly") || field.field.type === 'one2many' || field.field.type === 'many2many' - || field.field.type === 'binary') { + || field.field.type === 'binary' + || field.password) { return false; } @@ -1681,11 +1682,11 @@ instance.web.form.compute_domain = function(expr, fields) { switch (op.toLowerCase()) { case '=': case '==': - stack.push(field_value == val); + stack.push(_.isEqual(field_value, val)); break; case '!=': case '<>': - stack.push(field_value != val); + stack.push(!_.isEqual(field_value, val)); break; case '<': stack.push(field_value < val); @@ -2246,7 +2247,9 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we var self = this; var $input = this.$el.find('input'); $input.change(function() { - self.internal_set_value(self.parse_value($input.val())); + if(self.is_syntax_valid()){ + self.internal_set_value(self.parse_value($input.val())); + } }); this.setupFocus($input); }, diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index b1bd959e4fb..9384ee7ebe8 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -390,7 +390,7 @@
- + 99+
@@ -681,13 +681,15 @@ -
+ +
-
+
+
@@ -1033,7 +1035,7 @@ t-att-autofocus="widget.node.attrs.autofocus" t-att-id="widget.id_for_label"> - + diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 398d65d17ce..00cf29de0a8 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -323,7 +323,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ $columns.sortable({ handle : '.oe_kanban_draghandle', start: function(event, ui) { - self.currently_dragging.index = ui.item.index(); + self.currently_dragging.index = ui.item.parent().children('.oe_kanban_record').index(ui.item); self.currently_dragging.group = ui.item.parents('.oe_kanban_column:first').data('widget'); ui.item.find('*').on('click.prevent', function(ev) { return false; @@ -334,7 +334,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ stop: function(event, ui) { var record = ui.item.data('widget'); var old_index = self.currently_dragging.index; - var new_index = ui.item.index(); + var new_index = ui.item.parent().children('.oe_kanban_record').index(ui.item); var old_group = self.currently_dragging.group; var new_group = ui.item.parents('.oe_kanban_column:first').data('widget'); if (!(old_group.title === new_group.title && old_group.value === new_group.value && old_index == new_index)) { @@ -1070,8 +1070,10 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({ */ quick_add: function () { var self = this; + var val = this.$input.val(); + if (/^\s*$/.test(val)) { return; } this._dataset.call( - 'name_create', [self.$input.val() || false, new instance.web.CompoundContext( + 'name_create', [val, new instance.web.CompoundContext( this._dataset.get_context(), this._context)]) .then(function(record) { self.$input.val(""); diff --git a/addons/web_kanban/static/src/xml/web_kanban.xml b/addons/web_kanban/static/src/xml/web_kanban.xml index 5f9d9fdac11..2bef63a5730 100644 --- a/addons/web_kanban/static/src/xml/web_kanban.xml +++ b/addons/web_kanban/static/src/xml/web_kanban.xml @@ -47,7 +47,9 @@
- + + 99+ +