my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Це запитання позначене
1
Відповісти
9581
Переглядів
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.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Реєстрація| Related Posts | Відповіді | Переглядів | Дія | |
|---|---|---|---|---|
|
|
2
лип. 24
|
4589 | ||
|
|
1
серп. 15
|
5377 | ||
|
|
2
груд. 21
|
26372 | ||
|
Get model data in a controller
Вирішено
|
|
4
жовт. 21
|
40551 | |
|
|
1
лип. 21
|
5872 |