diff --git a/sao/src/theme/coog/sao.less b/sao/src/theme/coog/sao.less index 2bd25c35f01..ccd3807f24e 100644 --- a/sao/src/theme/coog/sao.less +++ b/sao/src/theme/coog/sao.less @@ -561,7 +561,7 @@ div.form-boolean > input[type=checkbox].input-checkbox.form-control[readonly] { // increase minimum width of fields .form { - .form-char, .form-password, .form-integer, .form-float, + .form-password, .form-float, .form-datetime, .form-time, .form-timedelta, .form-selection, .form-multiselection, .form-url, .form-email, .form-callto, .form-sip, .form-pyson { @@ -569,6 +569,14 @@ div.form-boolean > input[type=checkbox].input-checkbox.form-control[readonly] { min-width: 17ch; } } + .form-char, .form-integer { + input:not([size]) { + min-width: 17ch; + } + input[size] { + min-width: unset; + } + } .form-many2one, .form-one2one, .form-reference, form-binary { select { min-width: 15ch; diff --git a/sao/src/view/form.js b/sao/src/view/form.js index a4b1f6f43d9..50aada2dc23 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -2046,7 +2046,7 @@ function eval_pyson(value){ if (record) { length = record.expr_eval(this.attributes.size); if (length > 0) { - width = null; + width = (length + 2) + 'ch'; } } this.input.val(this.get_client_value()); @@ -2489,7 +2489,8 @@ function eval_pyson(value){ var value = ''; if (this.width !== null){ this.input_text.css('width', this.width + 'ch'); - this.input.css('width', (this.width + 5) + 'ch'); + this.input.css('width', (this.width + 2) + 'ch'); + this.group.css('width', (this.width + 2) + 'ch'); } if (field) { value = field.get_client(record, this.factor, this.grouping);