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.
Esta pergunta foi sinalizada
1
Responder
6473
Visualizações
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
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscrever-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
|
0
mai. 15
|
5482 | ||
|
|
0
abr. 24
|
2756 | ||
|
|
2
mar. 15
|
6772 | ||
|
|
0
mar. 15
|
5805 | ||
|
|
2
mar. 15
|
12640 |