How to debug api.onchange methods? _logger.xyz() doesn't get printed on the server console. I don't see them at the browser's console also.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
3804
Visualizações
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!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
2
jan. 25
|
6075 | ||
computed fields
Resolvido
|
|
1
abr. 24
|
2097 | |
|
1
abr. 24
|
2313 | ||
|
1
dez. 23
|
3921 | ||
Menu item for users and group only
Resolvido
|
|
2
nov. 22
|
3282 |
The the below link show you how to use logging in Odoo
https://www.odoo.yenthevg.com/logging-in-odoo/
If you code is correct and you can't see the logger text then your method is not called.
If you want to get more help from the forum, please submit your code.
Hi Waleed,
Thanks for your response. The link you shared explains logging in Odoo in general context. But this case is specific to code inside @api.onchange. I believe api.onchange methods are generally not executed on the server-side and I assume those should be converted to equivalent Javascript code and executed at the client-side. If this is the case, how to debug api.onchange() methods in general?
The logging is working even in api.onchange methods but your method is not called at all. I already tested it and it's working. Please check why your method is not called at all.
I'm talking here about POS module. Does api.onchange methods get called for Odoo12 POS UI? It looks like different from the default odoo {form,tree,kanban} views. It has it's own UI in static/ directory. api.constrains() are getting called though.