my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Dette spørgsmål er blevet anmeldt
1
Svar
9491
Visninger
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.
Kan du lide at diskutere? Læs ikke bare med, deltag aktivt i debatten!
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
|
2
jul. 24
|
4485 | ||
|
|
1
aug. 15
|
5287 | ||
|
|
2
dec. 21
|
26275 | ||
|
|
4
okt. 21
|
40433 | ||
|
|
1
jul. 21
|
5752 |