Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
8983 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Tác giả

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.

Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 1 16
35757
2
thg 8 19
4779
0
thg 9 20
37
1
thg 8 20
4814
1
thg 4 20
5357