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

my function is defined in the website controller and I wish to call it from a model, e.g (res.partner) 

アバター
破棄
最善の回答

You can do this by:

Importing the controller into the model and then you can call the function from the controller. for eg:

from odoo.addons.module_name.controllers.main import class_name_of_the_controller.
Thank you.

アバター
破棄
関連投稿 返信 ビュー 活動
2
7月 24
2541
1
8月 15
3769
2
12月 21
24374
4
10月 21
37539
1
7月 21
4103