Hello,
I want to execute a piece of code on every page load, no matter what url is. Could anyone please help?
Thank you in advance!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I want to execute a piece of code on every page load, no matter what url is. Could anyone please help?
Thank you in advance!
Hi,
I don't know if it's all you need but to begin, you can use ir.actions.server. I give you an example from my XML :
<record id="action_chargement_ratio" model="ir.actions.server"> <field name="name">Chargement Ratio</field> <field name="type">ir.actions.server</field> <field name="model_id" ref="model_miadi_poidsconditionnement"/> <field name="code">action = env['miadi.poidsconditionnement'].chargement_ratio()</field> </record>
In the <field name="code">, you can call a function or directly write you python code.
Regards,
MIADI
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up