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

I tried <field name=progress_rate" widget="progressbar"/> in kanban view.. It just showing the value instead of progressbar . Why widget="progressbar" not supporting in kanban view..Its supporting in form view and tree view. Is there any way to show the progressbar in kanban view?


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

Hi Ameera,

Try  widget gauge

For example Create two integer fields  

progress_rate = fields.Integer()
maximum_rate = fields.Integer()

Set widget="gauge" and  max_field is other field

<field name="invoiced_target" widget="gauge" style="width:120px;height:90px;cursor:pointer;" 
options="{'max_field': 'maximum_rate'}">
Progress
</field>


Example Code

<kanban>
    <field name="progress_rate"/> 
    <field name="maximum_rate"/>  
        <templates> 
            <t t-name="kanban-box">
                <div class="oe_kanban_global_click">  
                    <field name="progress_rate" widget="gauge" style="width:120px;height:90px;cursor:pointer;" 
                           options="{'max_field': 'maximum_rate'}"> 
                                   Progress                               
                    </field>                           
                </div>     
             </t>
        </templates>
</kanban>



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

Thanks Shameem

Good Shameem.. You have an up vote

can you tell us on wich ODOO version this widget is usable? thx

It is working in odoo 8 and odoo 9