diff options
| author | Alexandre Kühn <aku@odoo.com> | 2018-06-22 13:41:32 +0200 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2018-06-22 15:30:37 +0200 |
| commit | e4d3dfba49b736740522cfcb89797d90ffd4604d (patch) | |
| tree | d1572aca16eaeeeeee26000c67a811d2881d3a92 | |
| parent | 72003ca530722a38fa53dd46567f6b948ab70e73 (diff) | |
[FIX] *: nocontent helper style for form view fields
*: hr_gamification, point_of_sale, web
Before this commit, no content helper in some form view fields were broken,
due to the style of the classname `.o_view_nocontent` that uses an absolute
position.
This is due to some templates that wrongly use this style for displaying a
help message, although this is only valid for views with no record.
This commit solves the issue by using another classname for those fields
with the nocontent helper, namely `.o_field_nocontent`.
| -rw-r--r-- | addons/hr_gamification/views/hr_employee_views.xml | 4 | ||||
| -rw-r--r-- | addons/point_of_sale/views/pos_session_view.xml | 10 | ||||
| -rw-r--r-- | addons/web/static/src/less/views.less | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/addons/hr_gamification/views/hr_employee_views.xml b/addons/hr_gamification/views/hr_employee_views.xml index c464f4a48a0..4390f50327b 100644 --- a/addons/hr_gamification/views/hr_employee_views.xml +++ b/addons/hr_gamification/views/hr_employee_views.xml @@ -11,8 +11,8 @@ <page string="Received Badges" attrs="{'invisible': [('user_id', '=', False)]}"> <field name="has_badges" invisible="1"/> <button string="Grant a Badge" type="action" name="%(action_reward_wizard)d"/> to reward this employee for a good action - <div class="o_view_nocontent" attrs="{'invisible': [('has_badges', '=', True)]}"> - <p class="o_view_nocontent_smiling_face"> + <div class="o_field_nocontent" attrs="{'invisible': [('has_badges', '=', True)]}"> + <p> Grant this employee his first badge </p><p class="oe_grey"> Badges are rewards of good work. Give them to people you believe deserve it. diff --git a/addons/point_of_sale/views/pos_session_view.xml b/addons/point_of_sale/views/pos_session_view.xml index bd18d81d329..5a82b72b0f2 100644 --- a/addons/point_of_sale/views/pos_session_view.xml +++ b/addons/point_of_sale/views/pos_session_view.xml @@ -92,11 +92,11 @@ <field name="cash_register_balance_end" nolabel="1" attrs="{'invisible' : [('state', '=', 'opening_control')]}" class="oe_bold oe_pos_total" widget="monetary" options="{'currency_field': 'currency_id'}"/> </group> <div class="oe_clear"/> - <div attrs="{'invisible' : ['|', ('cash_journal_id', '=', False), ('state', '!=', 'opening_control')]}" class="o_view_nocontent" groups="point_of_sale.group_pos_manager"> - <p class="o_view_nocontent_smiling_face"> - You can define another list of available currencies on the - <i>Cash Registers</i> tab of the <b><field name="cash_journal_id" class="oe_inline"/></b> - payment method. + <div attrs="{'invisible' : ['|', ('cash_journal_id', '=', False), ('state', '!=', 'opening_control')]}" class="o_field_nocontent" groups="point_of_sale.group_pos_manager"> + <p> + You can define another list of available currencies on the + <i>Cash Registers</i> tab of the <b><field name="cash_journal_id" class="oe_inline"/></b> + payment method. </p> </div> </div> diff --git a/addons/web/static/src/less/views.less b/addons/web/static/src/less/views.less index a4a400f1268..fab73c2d541 100644 --- a/addons/web/static/src/less/views.less +++ b/addons/web/static/src/less/views.less @@ -40,10 +40,10 @@ // No content helper .o_view_nocontent { - .o-position-absolute(20%, 0, 0, 0); + .o-position-absolute(20%, 0, 0, 0); pointer-events: none; z-index: 1; - + .o_nocontent_help { pointer-events: auto; max-width: 650px; |
