コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4118 ビュー

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
1838
1
1月 24
4940
2
3月 23
2689
1
8月 22
2423
3
6月 20
10478