my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Denna fråga har flaggats
1
Besvara
9516
Vyer
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.
Njuter du av diskussionen? Läs inte bara, delta också!
Skapa ett konto idag för att ta del av exklusiva funktioner och engagera dig i vår fantastiska community!
Registrera dig| Relaterade inlägg | Svar | Vyer | Verksamhet | |
|---|---|---|---|---|
|
|
2
juli 24
|
4505 | ||
|
|
1
aug. 15
|
5294 | ||
|
|
2
dec. 21
|
26296 | ||
|
|
4
okt. 21
|
40472 | ||
|
|
1
juli 21
|
5787 |