Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
8407 Zobrazení

How to create and write multiple records by overriding create and write method of odoo12 ??

Avatar
Zrušit
Nejlepší odpověď

Create method uses api.model and due to that you can only create one record at a time.

Write method uses api.multi and due that you can update multiple records at a time.

Avatar
Zrušit
Autor

while i am using @api.multi and trying to write multiple record at a time ,then it trows singleton error and suggest to use ensure_one().

Autor

You are right for the above answer but somehow i want to write multiple records at a time.So please suggest

You can create a wizard for that and based on some conditions search your records and write the value to them.

Autor

Is there any suggestions for this type of solutions please sir ..and thank you very much

Related Posts Odpovědi Zobrazení Aktivita
2
led 16
35041
2
srp 19
4323
0
zář 20
37
1
srp 20
4177
1
dub 20
4744