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

Hello everyone ! I want to do automated actions which create record in another model please, is there an problem with my code ? because it creates more than 1125 records instead of 1 only record.

Thanks !


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

Hi @Abdul Qoudouss

I hope you are doing well,

After checking your code I found the reason why there are multiple records being created instead of only one.

The reason is you have selected On creation & update as the trigger which will be executed on creation and updation of a record. You have not defined trigger field so the action will be fired for all fields.

- You will need to add a trigger field if you need to use On creation & updation as trigger, when that field is update then a record will be created and on creation of a record as well. and also add conditions in the python code for when the record should be actually created.

I hope this will be helpful. 

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

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

Thanks a lot ! I really appreciate ur help.
But it worked well for the odoo old version. I don't know why with Odoo 16, it creates a lot of records.
Thanks

Hi @Abdul Qoudouss

I checked this in odoo 16 as well and it seems to be working perfect, there may be some issue with the odoo version you are using now. I have aslo recorded a video and provide you the link below.

https://drive.google.com/file/d/1EmmFWqLO7lAlor7Nbhk1iwy826QBa-QD/view?usp=sharing

Hope this will be helpful.

ผู้เขียน

HI @Jainesh
Thanks u so much, may God help u so much.
Can i have your whatsApp number ?
Thanks much again !

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ธ.ค. 22
2077
0
ก.ย. 24
1297
0
ก.ค. 24
1227
0
ก.ค. 24
733
0
พ.ค. 24
26