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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
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
Thanks it worked
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Jul 25
|
1341 | ||
|
2
Jul 25
|
7050 | ||
|
2
Jul 25
|
3410 | ||
|
2
Jul 25
|
3142 | ||
|
2
Jun 25
|
1845 |