Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
7809 Tampilan

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

Avatar
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jul 24
2560
1
Agu 15
3779
2
Des 21
24388
4
Okt 21
37557
1
Jul 21
4138