<td style="padding: 0.25rem; vertical-align: middle;">
<!-- <span t-esc="o.line_ids.filtered(lambda line: line.code == 'ETF').mapped('total')[0] if o.line_ids.filtered(lambda line: line.code == 'ETF') else ''"-->
<!-- t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"/>-->
<span t-esc="sum(o.line_ids.filtered(lambda line: line.code == 'ETF').mapped('total')"
t-options="{'widget': 'monetary', 'display_currency': o.company_id.currency_id}"/>
</td>
Those two spans are same span by differentr ways,one is commented, but error occure, How can i solve this ,
*first method error,odoo.addons.base.models.ir_qweb.QWebError: Error while rendering the template:
ValueError: The value send to monetary field is not a number.
Template: hr_payroll.report_payslip
Reference: 1571
Path: /t/t/div/table[1]/tbody/tr[4]/td[2]/span
Element: <span t-esc="o.line_ids.filtered(lambda line: line.code == \'ETF\').mapped(\'total\')[0] if o.line_ids.filtered(lambda line: line.code == \'ETF\') else \'\'" t-options="{\'widget\': \'monetary\', \'display_currency\': o.company_id.currency_id}"/>
*second method error,odoo.addons.base.models.ir_qweb.QWebError: Error while rendering the template:
ValueError: Can not compile expression: sum(o.line_ids.filtered(lambda line: line.code == 'ETF').mapped('total')
Template: hr_payroll.report_payslip_lang, How can i solve this? can someone help me?
Is it custom code?