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

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
2454
1
أغسطس 15
3682
2
ديسمبر 21
24232
4
أكتوبر 21
37405
1
يوليو 21
4036