[FIX] web_kanban: remove add new column on 'Discard'

The 'Add New Column' was still in `folded` mode after clicking on 'Discard'
because the mode was toggle two times: one by `_cancel` and another one by
`_onClick` which already toggles the mode.
This commit is contained in:
Martin Geubelle
2017-04-19 17:49:34 +02:00
parent 90d6573579
commit 3b3e71c2dd
2 changed files with 10 additions and 9 deletions
@@ -184,14 +184,6 @@ var ColumnQuickCreate = AbstractQuickCreate.extend({
// Private
//--------------------------------------------------------------------------
/**
* @override
* @private
*/
_cancel: function () {
this.folded = true;
this._update();
},
/**
* Triggers up an event to quick create a column with the given value
*
+10 -1
View File
@@ -587,7 +587,7 @@ QUnit.module('Views', {
});
QUnit.test('create a column in grouped on m2o', function (assert) {
assert.expect(10);
assert.expect(12);
var nbRPCs = 0;
var kanban = createView({
@@ -615,6 +615,15 @@ QUnit.module('Views', {
kanban.$('.o_column_quick_create').click();
assert.ok(kanban.$('.o_column_quick_create input').is(':visible'),
"the input should be visible");
// discard the column creation and click it again
kanban.$('.o_column_quick_create .o_kanban_cancel').click();
assert.notOk(kanban.$('.o_column_quick_create input').is(':visible'),
"the input should not be visible after discard");
kanban.$('.o_column_quick_create').click();
assert.ok(kanban.$('.o_column_quick_create input').is(':visible'),
"the input should be visible");