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.
لقد تم الإبلاغ عن هذا السؤال
1
الرد
6475
أدوات العرض
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
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل| المنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
|---|---|---|---|---|
|
|
0
مايو 15
|
5483 | ||
|
|
0
أبريل 24
|
2756 | ||
|
|
2
مارس 15
|
6774 | ||
|
|
0
مارس 15
|
5808 | ||
|
|
2
مارس 15
|
12644 |