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

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

Awatar
Odrzuć
Autor

Hi Panchal, there is no changes

Najlepsza odpowiedź

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>

 

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Hi Panchal, there is no changes

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
wrz 23
4944
12
paź 23
36020
2
mar 15
6223
4
mar 15
5125
0
mar 15
4957