my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
此问题已终结
1
回复
9501
查看
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
|
4490 | ||
|
|
1
8月 15
|
5288 | ||
|
|
2
12月 21
|
26278 | ||
|
|
4
10月 21
|
40443 | ||
|
|
1
7月 21
|
5766 |