Skip to Content
Menu
This question has been flagged
1 Reply
11859 Views

I'm converting module (v.12) to (v.14). To replace @api.one and @api.multi, i put self.ensure_one() , which is not worked. 

It shows key error and value error "expected singleton" with too many values.

How could i solve it?

Avatar
Discard
Best Answer

Hi,
You can just remove @api.multi from the code, the function will work properly.
From Odoo 13 onward @api.multi and @api.one are not used.
To remove the singleton error , you can loop inside the function using: for rec in self:

Regards

Avatar
Discard
Author

Thanks it worked

Related Posts Replies Views Activity
1
Jul 25
1341
2
Jul 25
7050
2
Jul 25
3410
2
Jul 25
3142
2
Jun 25
1845