diff --git a/views/event_registration_template.xml b/views/event_registration_template.xml index 6a8f329acf9b94ef9aa8dce2df4400412e2c3a4b..bf2ea6ffb86af198718bf313082b42b9b7965bdd 100644 --- a/views/event_registration_template.xml +++ b/views/event_registration_template.xml @@ -10,17 +10,16 @@ expr="//t[@t-if="question.question_type == 'simple_choice'"]//t[@t-as='answer']//option" position="attributes" > - <attribute - name="t-if" - >(answer.number_max and not answer.fully_booked) or answer.number_max == 0</attribute> - <attribute - name="t-out" - >answer.name + " (" + str(answer.remaining_number) + " restant(es))"</attribute> - </xpath> + <attribute name="t-if">answer.number_max == 0</attribute></xpath> <xpath expr="//t[@t-if="question.question_type == 'simple_choice'"]//t[@t-as='answer']//option" position="after" > + <option + t-elif="answer.remaining_number > 0" + t-out="answer.name + ' (' + str(answer.remaining_number) + ' restant(es))'" + t-att-value="answer.id" + /> <option t-else="" t-out="answer.name + ' (Épuisé)'"