my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
7334
أدوات العرض
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
|
2097 | ||
|
1
أغسطس 15
|
3531 | ||
|
2
ديسمبر 21
|
23951 | ||
Get model data in a controller
تم الحل
|
|
4
أكتوبر 21
|
37047 | |
|
1
يوليو 21
|
3872 |