[FIX] survey: properly display filter label
While seeing the survey results, user can filter the answers. When the filter is applied, '>' character is added between each letter of the filter label. This string formatting operation was needed prior v14 for the answers of matrix type question. But with survey the refactoring (see commit[1]), we already get the formatted answers from controller, so we don't have to manage it from the xml template. This commit removes string operation from xml template responsible for adding '>' (greater than) character between each letter of the filter label and thus displays the label properly. commit[1] - https://github.com/odoo/odoo/commit/351a4439b3a28d3832cd9bf17840dc9feaad7231 Task-2638463 closes odoo/odoo#76968 X-original-commit: ccd0970d51a05378ac3cd7a8d86321a5cbbe98ae Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<span t-att-class="'badge only_left_radius filter-all %s' % 'badge-secondary' if search_finished else 'badge-primary o_active_filter'">All surveys</span>
|
||||
<span t-att-class="'badge only_right_radius filter-finished %s' % 'badge-secondary' if not search_finished else 'badge-primary o_active_filter'">Finished surveys</span>
|
||||
<span t-foreach="search_filters" t-as="filter_data">
|
||||
<span class="badge badge-primary only_left_radius"><i class="fa fa-filter" role="img" aria-label="Filter" title="Filter"></i></span><span class="badge badge-primary no_radius" t-esc="filter_data['question']"></span><span class="badge badge-success only_right_radius" t-esc="' > '.join(filter_data['answers'])"></span>
|
||||
<span class="badge badge-primary only_left_radius"><i class="fa fa-filter" role="img" aria-label="Filter" title="Filter"></i></span><span class="badge badge-primary no_radius" t-esc="filter_data['question']"></span><span class="badge badge-success only_right_radius" t-esc="filter_data['answers']"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user