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

As far as I know, Odoo Studio only accepts data folder when importing a .zip module in Odoo Studio.

Is there a way to add a function and trigger it with a button in Odoo Studio without adding a module folder in the addons path?

아바타
취소
베스트 답변

Hi Jean,

You can indeed only imports data (XML/CSS/SCSS) with a .zip module in Odoo.
There is no way to directly create a field and add a function to it with studio but what you want to do is possible though. 
You can first create your new field with Studio and add it on the form. Then create an automated action
with the trigger condition set to 'Based on Form Modification' and fill in your field name in 'On change Fields trigger'.
Set the 'Action To Do' to 'Execute Python code and then you can execute your custom Python code from there. 

Note: If you can code Python functions and need to do more advanced operations it might be worth it to code it in your own module though? It is easier to keep track off if you do a lot of modifications and you still have more flexibility than through the frontend (for example with Python libraries).


Regards,
Yenthe

아바타
취소
관련 게시물 답글 화면 활동
4
7월 19
3740
2
1월 19
3506
1
12월 20
11272
1
7월 25
1254
2
3월 25
1507