In the file pos.xml, I'm able to display the customer name on the receipt. But if no customer is selected for the order, I get this error :
Error: QWeb2 - template['PosTicket']: Runtime Error: TypeError: dict.order.changed.client is null
How to write a condition to check if client.name is null or not? My condition doesn't work...
<t t-if="order.changed.client.name is not null">
| Client : <t t-esc="order.changed.client.name || 'Client anonyme'"/> |
Do you know how to fix it please?
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 10/8/15, 7:27 PM|
|Seen: 854 times|
|Last updated: 10/27/15, 9:42 AM|