İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4519 Görünümler

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.

Avatar
Vazgeç
En İyi Yanıt

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
Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
May 15
3641
0
Nis 24
1343
2
Mar 15
4659
0
Mar 15
3985
2
Mar 15
10715