summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorHiral Bhavsar <hbh@odoo.com>2018-07-09 10:20:53 +0530
committerYannick Tivisse <yti@odoo.com>2018-07-26 13:43:22 +0200
commitb7e2d4759688b4735c789237b0ebafbc2469e34d (patch)
tree283ceae26c085e4692523bb32278d7adc529fbf0 /addons/web/static/src/js/views/basic/basic_controller.js
parenta4d6bff197b894f70eaecf5aa4e2088e5b014780 (diff)
[FIX] web: Make progress bar work with selection fields
Purpose ======= The progress bar on a kanban column doesn't work with selection fields Specification ============= In kanban view, subgroupCounts of progressbar should work if columns are grouped with a selection field Currently, progressbar's subgroupCounts only worked if column is grouped by a 'Many2one' field. If column is grouped by a 'selection' field then its not working. For example, If column is grouped by a 'Many2one' field then we've tuple, {'state': (2, 'Signatures in Progress')} So, here for preparing progressBar values for subgroupCounts we'll get {Signatures in Progress: {overdue: 0, planned: 0, today: 1}} But for a selection field, we'll have a string 'sent' i.e a technical value, {'state': 'sent'} So here 'group_by_value' as a 'key' will never be matched as we have 'sent' instead of 'Signatures in Progress'. We've a technical value instead of its UI value and dict of subgroupCounts would be based on UI values that's why it'll never find values. To fix this issue we need to set proper 'group_by_value'. That's why added one condition for 'selection' field to gets its value of specific state inside 'read_progress_bar' method. Related to Task: 1862371
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions