跳至内容
菜单
此问题已终结
1 回复
4576 查看

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
15740
3
3月 16
4384
0
2月 16
4115
0
2月 23
1615
3
11月 21
12209