Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
8121 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
2894
1
Agu 15
4026
2
Des 21
24710
4
Okt 21
37935
1
Jul 21
4393