Hello, i'm in odoo 10 in qweb report
I want to browse my invoices records ( <tr t-foreach="docs" t-as="o">)
and i want to sum the total_amount for all invoices where the date_invoice is in january, then for february etc...
I've tried this:
<t t-set="adquat_janvier" t-value="sum([o.amount_total for o in docs if date_invoice in ('20190101','20190131') ])"/>
But there is the following error
SyntaxError: unexpected EOF while parsing Error when compiling AST SyntaxError: unexpected EOF while parsing (<unknown>, line 0) Template: 1126 Path: /templates/t/t/t/t[2] Node: <t t-content="True"/>
I've tried this too :
<t t-set="adquat_janvier" t-value="sum([(date_invoice in ('20190101','20190131') and o.amount_total) for o in docs ])"/>
How can i set debug mode ? (with pdb ?)