Odoo Help

0

0
1 Answer
1
Avatar

Niyas Raphy India

--Niyas Raphy--
27456
| 7 7 11
Wayanad, Kerala, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123
Whatsapp : +917736136763
Happy to help :)

Niyas Raphy India
9/18/19, 1:08 PM

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

Ask a Question
Writer
5178
Usman
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now