[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`.
This commit is contained in:
Alexandre Kühn
2018-06-22 15:30:37 +02:00
parent 72003ca530
commit e4d3dfba49
3 changed files with 9 additions and 9 deletions
@@ -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.
@@ -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>
+2 -2
View File
@@ -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;