Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5055 มุมมอง

Hi,

I'm using odoo 14 and I want to build a form that can create multiple records at the same time.

Is there any way I can do that?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Need to created records in the same model ? If so adding a one2many inside the form will helps ?

If you need to create records in multiple models, better to override the create method of a model and then create records in the another models from the create function.

Reference:

1. One2many:  https://www.youtube.com/watch?v=QOyFQOlroFc&t=54s

2. Override Create Method: https://www.youtube.com/watch?v=_-fs_NBeOLI

3. Delegation Inheritance: https://www.youtube.com/watch?v=CkUulwB6k3o

Thanks

อวตาร
ละทิ้ง
ผู้เขียน

Thanks for your Answer Niyas, I needed to create the records in the same model, but I couldn't find the way so I've created another model with a one2many field and now I have a form to create multiple records for my original model, but I'm not really happy with this solution.

Thanks for the answers and the references!

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ค. 21
1585
1
ก.ค. 25
2178
2
ก.ค. 25
7681
2
ก.ค. 25
4102
2
ก.ค. 25
3846