Skip to Content
Menu
This question has been flagged
2 Replies
6679 Rodiniai

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', ),
        

Portretas
Atmesti
Autorius

Hi Panchal, there is no changes

Best Answer

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>

 

Portretas
Atmesti
Autorius Best Answer

Hi Panchal, there is no changes

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
rugs. 23
5037
12
spal. 23
36114
2
kov. 15
6308
4
kov. 15
5256
0
kov. 15
5073