Hello all,
I'm trying to extend the PaymentScreenWidget to show a content block only if the total amount of the order is negative (a return). To do so I have the next t-extend on my code:
<t t-extend='PaymentScreenWidget'>
<t t-if="widget.pos.get_order().get_total_with_tax() < 0">
<t t-jquery=".paymentmethods-container" t-operation='append'>
<div>Blah blah content</div>
</t>
</t>
</t>
When I open the POS all I get is a black screen and the next error message on the console:
Uncaught Error: QWeb2: Error while extending template 'PaymentScreenWidgetNo expression given
The same happens if I use conditionals that exist on the original PaymentScreenWidget, for example:
<t t-extend='PaymentScreenWidget'>
<t t-if="widget.pos.get_client()">
<t t-jquery=".paymentmethods-container" t-operation='append'>
<t t-esc="widget.pos.get_client().name" />
</t>
</t>
</t>
Any ideas?
Thank you!