Skip to Content
Menu
This question has been flagged
1 Atsakyti
7861 Rodiniai

my function is defined in the website controller and I wish to call it from a model, e.g (res.partner) 

Portretas
Atmesti
Best Answer

You can do this by:

Importing the controller into the model and then you can call the function from the controller. for eg:

from odoo.addons.module_name.controllers.main import class_name_of_the_controller.
Thank you.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
liep. 24
2601
1
rugp. 15
3801
2
gruod. 21
24450
4
spal. 21
37629
1
liep. 21
4185