25 lines
1.4 KiB
XML
25 lines
1.4 KiB
XML
|
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
|
<odoo>
|
||
|
|
<!-- Override survey question template -->
|
||
|
|
<template id="survey_question_custom" inherit_id="survey.question">
|
||
|
|
<xpath expr="//div[@class='o_survey_question_answers']" position="replace">
|
||
|
|
<div class="o_survey_question_answers">
|
||
|
|
<t t-foreach="question.suggested_answer_ids" t-as="answer">
|
||
|
|
<div class="form-check">
|
||
|
|
<input type="radio"
|
||
|
|
t-attf-name="question_{{question.id}}"
|
||
|
|
t-att-value="answer.id"
|
||
|
|
class="form-check-input"
|
||
|
|
t-att-id="'answer_' + str(answer.id)"/>
|
||
|
|
<label t-att-for="'answer_' + str(answer.id)" class="form-check-label">
|
||
|
|
<!-- Display Khmer numeral -->
|
||
|
|
<t t-set="khmer_map" t-value="{'A': '១', 'B': '២', 'C': '៣', 'D': '៤', 'E': '៥', 'F': '៦', 'G': '៧', 'H': '៨', 'I': '៩', 'J': '១០'}"/>
|
||
|
|
<t t-esc="khmer_map.get(answer.answer_row[:1].upper(), answer.answer_row[:1])"/>
|
||
|
|
<t t-esc="answer.answer_row[1:] if len(answer.answer_row) > 1 else ''"/>
|
||
|
|
</label>
|
||
|
|
</div>
|
||
|
|
</t>
|
||
|
|
</div>
|
||
|
|
</xpath>
|
||
|
|
</template>
|
||
|
|
</odoo>
|