Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4515 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mei 15
3639
0
apr. 24
1343
2
mrt. 15
4641
0
mrt. 15
3954
2
mrt. 15
10714