跳至內容
選單
此問題已被標幟
1 回覆
4474 瀏覽次數

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
15658
3
3月 16
4351
0
2月 16
4059
0
2月 23
1525
3
11月 21
12087