summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/kanban.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-09-14 22:43:43 +0200
committerqsm-odoo <qsm@odoo.com>2017-09-14 23:48:56 +0200
commit33f9e90bd5a9ad3e9239f1b414ea012bb94fa1c0 (patch)
tree18f7ec62c340b1e6e63e5520565b0bd4b7d8a10c /addons/web/static/src/xml/kanban.xml
parent031dc1d952837c0d9740e1caac1ab1d923863545 (diff)
[IMP] web, *: add kanban column progress bars
* crm, project Add a new feature which allows to put a progressbar in the kanban columns. The progressbar shows with the same color the amount of records whose value of a given field are the same in the column. It also indicate the sum of another given field or simply the total number of records. It also allows to subgroup the column content. To define a progressbar, add this as a direct child of the kanban arch: <progressbar field="<name of the field to use for subgroups>" colors="{<one possible value for the above field>: <success, warning or danger>, ...}" sum="<name of the field to sum or nothing to use total number of records>"/> Also: - Properly update record model data's parentID when moving a record - ...
Diffstat (limited to 'addons/web/static/src/xml/kanban.xml')
-rw-r--r--addons/web/static/src/xml/kanban.xml15
1 files changed, 15 insertions, 0 deletions
diff --git a/addons/web/static/src/xml/kanban.xml b/addons/web/static/src/xml/kanban.xml
index c7e7c83e836..acde7fcc739 100644
--- a/addons/web/static/src/xml/kanban.xml
+++ b/addons/web/static/src/xml/kanban.xml
@@ -91,4 +91,19 @@
</tbody>
</table>
</t>
+
+<t t-name="KanbanView.ColumnProgressBar">
+ <div class="o_kanban_counter">
+ <div class="o_kanban_counter_progress progress">
+ <t t-foreach="widget.colors" t-as="color">
+ <t t-set="count" t-value="widget.subgroupCounts[color] || 0"/>
+ <div t-attf-class="progress-bar transition-off bg-#{color_value}-full#{count ? ' o_bar_has_records' : ''}#{widget.activeFilter ? ' active progress-bar-striped' : ''}"
+ t-att-data-filter="color"
+ t-attf-data-original-title="#{count} #{color}"
+ t-attf-style="width: #{count ? (count * 100 / widget.groupCount) : 0}%;"/>
+ </t>
+ </div>
+ <div class="o_kanban_counter_side"><t t-esc="widget.totalCounterValue"/></div>
+ </div>
+</t>
</template>