콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4165 화면

Just wondering is there a way to call a method on launch of the module? meaning when i starts up?

아바타
취소
베스트 답변

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.

관련 게시물 답글 화면 활동
1
7월 24
1976
1
1월 24
5190
2
3월 23
2779
1
8월 22
2484
3
6월 20
10586