Just wondering is there a way to call a method on launch of the module? meaning when i starts up?
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ờ
What do you mean by 'when it starts up' ?
Do you mean when the module is installed or upgraded? If so, define an init function:
def init(self, cr):
Several OpenERP modules make use of this functionality, particular models representing reports.
like when you double click on the firefox browser icon the browser 'starts up' when you select the module from the menu bar it starts up. cant make it any clearer than that really
No. Modules don't work this way. They are loaded or 'started up' when they are installed (the init function above can run at this time) and any other functions within them are only called when records are read, created, updated or deleted.
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 | |
---|---|---|---|---|
|
1
thg 7 24
|
1838 | ||
|
1
thg 1 24
|
4940 | ||
|
2
thg 3 23
|
2689 | ||
|
1
thg 8 22
|
2424 | ||
|
3
thg 6 20
|
10478 |