İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
7777 Görünümler

my function is defined in the website controller and I wish to call it from a model, e.g (res.partner) 

Avatar
Vazgeç
En İyi Yanıt

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.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Tem 24
2541
1
Ağu 15
3769
2
Ara 21
24375
4
Eki 21
37541
1
Tem 21
4103