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

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
2542
1
8월 15
3770
2
12월 21
24380
4
10월 21
37549
1
7월 21
4104