diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2017-12-12 15:53:45 +0100 |
|---|---|---|
| committer | Adrien Dieudonné <adr@odoo.com> | 2017-12-18 09:30:48 +0100 |
| commit | 12048bd68ac952413b7a7d3fd2aaa58dd1251b6b (patch) | |
| tree | ad798721a822d4380af0c477c82d3a9d60d3e7a8 /addons/web/static/src/xml | |
| parent | 9de2bd54e5dea1d62f4ffbb63dd9f809d339902b (diff) | |
[FIX] web: kanban column id may be based on value
A kanban column has two identifiers:
- db_id: framework unique identifier for the column
- id: either the record res_id (grouped on x2o) or the value
The issue is that sometimes the value may be a any string which
would be source of issue unexpected for an ID (and there was one
issue in mobile renderer).
This code change this so "id" is either the record res_id or
`undefined` value, and when used in XML we use id or fallback on db_id
when we need an identifier.
So in the XML data-id on a colum is always either the ID of the record
the group is based on, or the db_id in the form.
opw-782433
closes #21199
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/kanban.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/xml/kanban.xml b/addons/web/static/src/xml/kanban.xml index 1cf5e6d34ec..d6428b7296a 100644 --- a/addons/web/static/src/xml/kanban.xml +++ b/addons/web/static/src/xml/kanban.xml @@ -9,7 +9,7 @@ </t> <t t-name="KanbanView.Group"> - <div t-attf-class="o_kanban_group#{widget.data_records.length == 0 ? ' o_kanban_no_records' : ''}" t-att-data-id="widget.id"> + <div t-attf-class="o_kanban_group#{widget.data_records.length == 0 ? ' o_kanban_no_records' : ''}" t-att-data-id="widget.id or widget.db_id"> <div class="o_kanban_header"> <div class="o_kanban_header_title" t-att-title="widget.data_records.length + ' records'" data-delay="500"> <span class="o_column_title"><t t-esc="widget.title"/></span> @@ -112,7 +112,7 @@ <t t-name="KanbanView.MobileTabs"> <div class="o_kanban_mobile_tabs"> <t t-foreach="data" t-as="group"> - <div class="o_kanban_mobile_tab" t-att-data-id="group.res_id"> + <div class="o_kanban_mobile_tab" t-att-data-id="group.res_id or group.id"> <span class="o_column_title"><t t-esc="group.value"/></span> </div> </t> |
