跳至內容
選單
此問題已被標幟
1 回覆
8825 瀏覽次數

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

頭像
捨棄
最佳答案

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.

頭像
捨棄
作者

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().

作者

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.

作者

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

相關帖文 回覆 瀏覽次數 活動
2
1月 16
35576
2
8月 19
4656
0
9月 20
37
1
8月 20
4653
1
4月 20
5187