my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Diese Frage wurde gekennzeichnet
1
Antworten
9502
Ansichten
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.
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren| Verknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
|---|---|---|---|---|
|
|
2
Juli 24
|
4494 | ||
|
|
1
Aug. 15
|
5289 | ||
|
|
2
Dez. 21
|
26279 | ||
|
|
4
Okt. 21
|
40446 | ||
|
|
1
Juli 21
|
5769 |