my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
This question has been flagged
1
Odpovědět
9511
Zobrazení
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!
Přihlásit se| Related Posts | Odpovědi | Zobrazení | Aktivita | |
|---|---|---|---|---|
|
|
2
čvc 24
|
4496 | ||
|
|
1
srp 15
|
5291 | ||
|
|
2
pro 21
|
26283 | ||
|
Get model data in a controller
Vyřešeno
|
|
4
říj 21
|
40454 | |
|
|
1
čvc 21
|
5781 |