Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi,
The issue is in the line,
spObj =self.env['social.approval'].search([('booking_id', '=', rec.id)])
From the above code you are getting multiple records to the variable spObj, so you have to iterate the spObj over a for loop or give limit=1, along with search.
spObj =self.env['social.approval'].search([('booking_id', '=', rec.id)], limit=1)
or
spObj =self.env['social.approval'].search([('booking_id', '=', rec.id)], limit=1)
for obj in spObj:
for obj.special_approval_line_ids
Like this update the code and see.
Thanks
just loop through on your object "your.model(1,2,3)"