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

I am trying to update all records of a table during the initialization of my module but I cannot figure out how to do it. I have read something about monkey patch and tried to implement it but not sure if it fits my case. What I want to do now is to get all the records of a certain database table during the initialization of the module itself and eventually make some changes to each one of them.

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

You can use pre_init_hook  defined in odoo __manifest__.py file and 

'pre_init_hook': 'pre_init_hook',
and define method in __init__.py file and write update code accordingly
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 15
3625
0
เม.ย. 24
1324
2
มี.ค. 15
4635
0
มี.ค. 15
3941
2
มี.ค. 15
10708