I try to override the controller of website_event addons for the path
"/event/", but my replacement is ignored by Odoo.
This is how I do:
- Create a file in my addon at the path "controllers/main.py"
- Be sur controllers is imported in main __init__.py file
- Be sur main is imported in controllers __init__.py file
- Import the original controller class inside this new main.py file
- Create a class that inherit from the original controller class
- Write a method, inside this new class, called events() with an
@http.route() as decorator
Aaaaand, Odoo never use my new method. I put a breakpoint in it, and
Odoo didn't stop at it. I know Odoo see and evaluate my file because
if I do a mistake inside this file Odoo stop to work.
I already try to restart Odoo and re-install my addon.
I compared to similar thing I do in the past, and cannot see a
difference except in the past it's work.
Any idea?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
3065
أدوات العرض
I found the raison of my problem: This controller method is already override by
another addon and this other addon is also at the end of the dependency tree.
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
2
أغسطس 18
|
2894 | ||
|
0
يونيو 16
|
3951 | ||
|
0
مارس 15
|
3367 | ||
|
0
مارس 15
|
4448 | ||
|
1
أبريل 22
|
5213 |