Dear all,
I am using Odoo 12 and need your help on solving a problem I am having with the methods order.
I have 2 modules. Each one is inheriting the same method from the core odoo module.
Module 1 - Installed first:
@api.multi
def button_validate(self):
#Run some code here...
super(StockPicking,self).button_validate()
Module 2 - Installed after first module, and depends on first module:
@api.multi
def button_validate(self):
#Run some code other code here...
super(StockPicking,self).button_validate()
The problem I am facing is the second module code is being executed in first place.
How can I force it to run after the first module code?
I have set the second module as dependant on the first module but it did not solved my problem.
Any advise?
Thank you all in advance
Best regards
PM
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
5229
Lượt xem
it's standard behavior. odoo follow the same MRO as python
ref: https://makina-corpus.com/blog/metier/2014/python-tutorial-understanding-python-mro-class-search-path
either change the logic or dependancy
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 8 19
|
3113 | ||
|
1
thg 4 25
|
3415 | ||
|
4
thg 2 25
|
2293 | ||
|
1
thg 8 24
|
1954 | ||
|
2
thg 11 24
|
3123 |