[FIX] web: list: tweak columns weight

This commit is contained in:
Aaron Bohy
2019-08-16 06:37:07 +00:00
parent 9ea5aecee8
commit cf318ad90c
2 changed files with 13 additions and 14 deletions
@@ -502,16 +502,16 @@ ListRenderer.include({
switch (field.type) {
case 'binary': return 1;
case 'boolean': return '40px';
case 'char': return 1;
case 'date': return '100px';
case 'datetime': return '150px';
case 'float': return '100px';
case 'char': return 2;
case 'date': return '92px';
case 'datetime': return '146px';
case 'float': return '92px';
case 'html': return 3;
case 'integer': return '80px';
case 'integer': return '74px';
case 'many2many': return 2;
case 'many2one': return 2;
case 'monetary': return 1.2;
case 'one2many': return 2.5;
case 'monetary': return '104px';
case 'one2many': return 2;
case 'reference': return 1.5;
case 'selection': return 1.5;
case 'text': return 2.5;
+6 -7
View File
@@ -1387,10 +1387,10 @@ QUnit.module('Views', {
QUnit.test('width of some of the fields should be hardcoded', async function (assert) {
const assertions = [
{ field: 'bar', expected: 40, type: 'Boolean' },
{ field: 'int_field', expected: 80, type: 'Integer' },
{ field: 'qux', expected: 100, type: 'Float' },
{ field: 'date', expected: 100, type: 'Date' },
{ field: 'datetime', expected: 150, type: 'Datetime' },
{ field: 'int_field', expected: 74, type: 'Integer' },
{ field: 'qux', expected: 92, type: 'Float' },
{ field: 'date', expected: 92, type: 'Date' },
{ field: 'datetime', expected: 146, type: 'Datetime' },
];
assert.expect(assertions.length + 1);
@@ -1452,9 +1452,8 @@ QUnit.module('Views', {
});
// the width is hardcoded to make sure we have the same condition
// between debug mode and non debug mode (#qunit-fixture is limited to
// 1000px)
list.$el.width('1000px');
// between debug mode and non debug mode
list.$el.width('1200px');
var startHeight = list.$('.o_data_row:first').height();
// start edition of first row