I'm trying to filter objects in the database that belong to the current year. I'm getting the above error, please help
<t t-foreach="o.search([(o.date_from.year, '=', datetime.datetime.now().year)])" t-as="year"> <t t-foreach="request.env['hr.payslip.line'].search([('slip_id', '=', year.id)])" t-as="lines"> <tr t-foreach="lines" t-as="line">
<td>#value from line#</td> </tr> </t> </t>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
Hello Kelly,
Try this:
<t t-if="o.search([(o.date_from.year, '=', datetime.datetime.now().year)])">
<t t-foreach="request.env['hr.payslip.line'].search([('slip_id', '=', year.id)])" t-as="lines">
<tr t-foreach="lines" t-as="line">
<td>#value from line#</td>
</tr>
</t>
</t>
Accept and upvote answer if helpful
Thanks and Regards
Haresh Kansara
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar