コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4510 ビュー

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
15685
3
3月 16
4373
0
2月 16
4079
0
2月 23
1593
3
11月 21
12138