Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4492 Widoki

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!

Awatar
Odrzuć

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

Autor

Doesn't work....

Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

And how can i do that?

Powiązane posty Odpowiedzi Widoki Czynność
3
wrz 24
15667
3
mar 16
4359
0
lut 16
4063
0
lut 23
1568
3
lis 21
12111