Skip to content
Permalink
Browse files

[IMP] *: Add progress bar on kanban views based on activities

Purpose
=======

If the activities are available on a model (i.e. inherits mail.activity.mixin),
add a progress bar based on the activities if nothing is defined yet.
  • Loading branch information...
vas-odoo authored and tivisse committed Aug 22, 2018
1 parent 4cd0081 commit 5f0452f56e9d14c558ec5124ae77072a25d3b4c1
@@ -200,6 +200,8 @@
<field name="date_invoice"/>
<field name="state"/>
<field name="currency_id"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
@@ -198,6 +198,7 @@
<field name="message_needaction_counter"/>
<field name="activity_ids"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
@@ -291,6 +291,8 @@
<field name="model">fleet.vehicle.log.contract</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
@@ -325,6 +325,8 @@
<field name="message_follower_ids"/>
<field name="message_ids"/>
<field name="message_needaction_counter"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record">
@@ -191,6 +191,8 @@
<field name="arch" type="xml">
<kanban class="o_kanban_small_column">
<field name="employee_id"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_card oe_kanban_global_click">
@@ -145,6 +145,8 @@
<field name="total_amount"/>
<field name="date"/>
<field name="state"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
@@ -123,6 +123,7 @@
<field name="message_needaction_counter"/>
<field name="activity_ids" />
<field name="activity_state" />
<progressbar field="kanban_state" colors='{"done": "success", "blocked": "danger"}'/>
<templates>
<t t-name="kanban-tooltip">
<ul class="oe_kanban_tooltip">
@@ -421,6 +422,7 @@
<field name="technician_user_id"/>
<field name="activity_ids" />
<field name="activity_state" />
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-tooltip">
<ul class="oe_kanban_tooltip">
@@ -196,6 +196,8 @@
<field name="product_uom_id" options="{'no_open':True,'no_create':True}"/>
<field name="date_planned_start"/>
<field name="state"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
@@ -68,6 +68,8 @@
<field name="product_uom_id"/>
<field name="state"/>
<field name="location_id"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
@@ -89,6 +89,7 @@
<field name="message_partner_ids"/>
<field name="activity_ids" />
<field name="activity_state" />
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">

@@ -71,6 +71,8 @@
<field name="product_variant_count"/>
<field name="product_variant_ids"/>
<field name="currency_id"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
@@ -426,6 +426,8 @@
<field name="id"/>
<field name="image_small"/>
<field name="lst_price"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
@@ -531,7 +531,7 @@
<kanban default_group_by="stage_id" class="o_kanban_small_column o_kanban_project_tasks" on_create="quick_create" quick_create_view="project.quick_create_task_form" examples="project">
<field name="color"/>
<field name="priority"/>
<field name="stage_id" options='{"group_by_tooltip": {"description": "Stage Description", "legend_priority": "Use of stars"}}'/>
<field name="stage_id" options='{"group_by_tooltip": {"legend_priority": "Use of stars"}}'/>
<field name="user_id"/>
<field name="user_email"/>
<field name="sequence"/>
@@ -334,6 +334,8 @@
<field name="state"/>
<field name="date_order"/>
<field name="currency_id"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
@@ -198,6 +198,8 @@
<field name="address_id"/>
<field name="guarantee_limit"/>
<field name="state"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
@@ -144,6 +144,8 @@
<field name="date_order"/>
<field name="state"/>
<field name="currency_id"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
@@ -151,6 +151,8 @@
<field name="location_dest_id"/>
<field name="state"/>
<field name="date"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
@@ -14,6 +14,7 @@
<field name="website_url"/>
<field name="activity_ids"/>
<field name="activity_state"/>
<progressbar field="kanban_state" colors='{"done": "success", "blocked": "danger"}'/>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="o_dropdown_kanban dropdown" groups="base.group_user">

0 comments on commit 5f0452f

Please sign in to comment.
You can’t perform that action at this time.