Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
7982 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
2724
1
Agu 15
3912
2
Des 21
24548
4
Okt 21
37757
1
Jul 21
4268