跳至內容
選單
此問題已被標幟
1 回覆
73 瀏覽次數

We'd like to eliminate the frustration our Users feel when the only way they can discover fillable fields on a record's Form View is to hover over the entire UI.

This is particularly evident in popups where default values for selection fields are presented the same way as labels.

As an example, take this popup which Users see when they define the Rules for a Delivery Method:



The word Weight is actually a Selection Field, but none of our Users happened to hover over it.


We started scoping a development to support Volume based costs before we realized this was already natively available, but the only way to know this was to either hover over the word to discover it was a field, or to review the source code.

Neither of these are realistic options for us.

While we do enjoy the minimalist design of the User Interface, we'd really like to make fields discoverable visually - who knows what other features we don't know exist because we don't have the time to move our mouse over and next to each word to discover what is a field and what is a label? 

頭像
捨棄
最佳答案

A simple custom module can resolve this.

Versions - Odoo 16.0, 17.0, 18.0 and 19.0


Layout:

web_style
__init__.py
__manifest__.py
static/static/src/css/style.css


Contents:

__init__.py

(empty)


__manifest__.py

{
    'name': "Web Style: Underline Fields",
    'depends': ['web'],
    'license': 'LGPL-3',
    'assets': {
        'web.assets_backend': [
            'web_style/static/src/css/style.css',
        ],
    },
}


static/static/src/css/style.css

/* Add a soft underline to all fields in the form view */

.o_form_view:not(.o_field_highlight)

.o_field_widget:not(.o_field_invalid):not(.o_field_highlight)

.o_input:not(:hover):not(:focus) {

    --o-input-border-color: var(--o-input-border-color-default, #E7E9ED);


Result:






頭像
捨棄