my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
لقد تم الإبلاغ عن هذا السؤال
1
الرد
9514
أدوات العرض
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
|
4502 | ||
|
|
1
أغسطس 15
|
5291 | ||
|
|
2
ديسمبر 21
|
26284 | ||
|
Get model data in a controller
تم الحل
|
|
4
أكتوبر 21
|
40465 | |
|
|
1
يوليو 21
|
5783 |