Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4572 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ

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)]}">

Tác giả

Doesn't work....

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

And how can i do that?

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 24
15733
3
thg 3 16
4382
0
thg 2 16
4108
0
thg 2 23
1606
3
thg 11 21
12201