تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4496 أدوات العرض

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
سبتمبر 24
15668
3
مارس 16
4359
0
فبراير 16
4066
0
فبراير 23
1570
3
نوفمبر 21
12115