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

Hello guys, so i will post some photos because it's more easier to me explain what im trying to do. I have a button and i want to automatically create a notebook page when i click in that button. So, this is my button:


And when i click in that button, automatically create another notebook page like this:


Appreciate your time guys!

아바타
취소

1. create button

<button name="calling_function" type="object" string="change_notebook_visibility"/>

2. In current model add this function

Add Boolean:
is_notebook_hidden = field.Boolean(default=True)

And add function:
def change_notebook_visibility():
self.is_notebook_hidden = False

3. Add to notebook xml
<notebook attrs="{'invisible': [('is_notebook_hidden', '=', False)]}">

작성자

Doesn't work....

베스트 답변

Maybe you can have Example notebook hidden by default and when you click "Send Email" button, set  "Example" notebook visibility to True.

아바타
취소
작성자

And how can i do that?

관련 게시물 답글 화면 활동
3
9월 24
16103
3
3월 16
4589
0
2월 16
4346
0
2월 23
1825
3
11월 21
12538