Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
6705 Lượt xem

i want to create a statusbar with button and states but the problem that buttons does not appear and there is no colors. this is my code please someone help me

 <form string="Formulaire programme" version="7.0" > 
            <header>
                  <button name="button_valide"  type='object' string="Valider"   states="validate" />
                <button name="button_annuler"  type='object' string="Annuler" states="canceled"  />
                <field name="state"  widget="statusbar" statusbar_visible="validate,canceled" statusbar_colors='{"proforma":"validate","canceled":"red"}'/>
                           
            </header>

and this is the python code

'state': fields.selection([
            ('validate','Validate'),
            ('canceled','Canceled'),
            ],'Status', readonly=True, required=True,
            track_visibility='onchange', ),
        

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Panchal, there is no changes

Câu trả lời hay nhất

Hi

Try this code

 

                <header>
                    <button name="button_valide"  type='object' string="Valider"   states="validate" />
                    <button name="button_annuler"  type='object' string="Annuler" states="canceled"  />
                    <field name="state"  widget="statusbar" statusbar_visible="validate,canceled" statusbar_colors='{"validate":"blue","canceled":"red"}'/>
                               
                </header>

 

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Hi Panchal, there is no changes

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 23
5105
12
thg 10 23
36155
2
thg 3 15
6353
4
thg 3 15
5286
0
thg 3 15
5110