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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
4
Apr 17
|
3099 | ||
|
0
Sep 24
|
384 | ||
|
0
Apr 24
|
361 | ||
|
0
Apr 24
|
93 | ||
|
4
Mar 24
|
298 |
just loop through on your object "your.model(1,2,3)"