[FIX] hr: properly set label in kanban-box

In recruitment, clicking on configuration > job positions > kanban view
leads to an odoo client error.

The qweb template cannot evaluate the condition on the client side.
With this commit, the ternary condition is properly evaluated.

Also, an unnecessary t-attf is removed.

Closes #26486
This commit is contained in:
Christophe Monniez
2018-08-21 12:08:31 +02:00
committed by GitHub
parent a05ae78abd
commit c8762eaa03
+2 -2
View File
@@ -393,7 +393,7 @@
<kanban class="o_kanban_mobile">
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="oe_kanban_global_click">
<div>
<strong><field name="name"/></strong>
</div>
@@ -402,7 +402,7 @@
</div>
<div>
<span>Vacancies : <field name="expected_employees"/></span>
<span t-att-class="'pull-right label label-success' if record.state.raw_value == 'recruit' else 'pull-right label label-danger'">
<span t-att-class="record.state.raw_value == 'recruit' and 'pull-right label label-success' or 'pull-right label label-danger'">
<field name="state"/>
</span>
</div>