projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b75593
)
[FIX] kanban quick-create: don't attempt creation if the field is empty
author
Xavier Morel
<xmo@openerp.com>
Wed, 28 Nov 2012 14:04:28 +0000
(15:04 +0100)
committer
Xavier Morel
<xmo@openerp.com>
Wed, 28 Nov 2012 14:04:28 +0000
(15:04 +0100)
bzr revid: xmo@openerp.com-
20121128140428
-s7w860xq7wlbi966
addons/web_kanban/static/src/js/kanban.js
patch
|
blob
|
history
diff --git
a/addons/web_kanban/static/src/js/kanban.js
b/addons/web_kanban/static/src/js/kanban.js
index
398d65d
..
d84515c
100644
(file)
--- a/
addons/web_kanban/static/src/js/kanban.js
+++ b/
addons/web_kanban/static/src/js/kanban.js
@@
-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("");