跳至内容
菜单
此问题已终结
2 回复
6550 查看

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

形象
丢弃
编写者

Hi Panchal, there is no changes

最佳答案

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>

 

形象
丢弃
编写者 最佳答案

Hi Panchal, there is no changes

形象
丢弃
相关帖文 回复 查看 活动
2
9月 23
4964
12
10月 23
36022
2
3月 15
6223
4
3月 15
5127
0
3月 15
4963