my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
此問題已被標幟
1
回覆
9510
瀏覽次數
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
|
4495 | ||
|
|
1
8月 15
|
5291 | ||
|
|
2
12月 21
|
26282 | ||
|
|
4
10月 21
|
40453 | ||
|
|
1
7月 21
|
5780 |