تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
7892 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 24
2636
1
أغسطس 15
3839
2
ديسمبر 21
24497
4
أكتوبر 21
37667
1
يوليو 21
4202