diff options
| author | Thibault Delavallée <tde@odoo.com> | 2018-09-13 17:53:12 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2018-09-21 11:22:01 +0200 |
| commit | 6663ff97b66fb3169f36bbc44e6bcffa5715c228 (patch) | |
| tree | bef3b7d25875cb04d212bc0d3e4a51fa7faad240 /addons/web/static/src/xml | |
| parent | da03aa31386d50e7f8a5853daabf29ce75e7eaf8 (diff) | |
[IMP] web: add an option to hide archive option in kanban columns
Currently kanban columns propose an Archive / Unarchive option if the
records model has an active field. It allows to directly archive or
restore all records belonging to that column. It is currently not possible
to control whether this option is present or not as it only depends on the
active field being defined on the model.
In some specific cases we want to be able to hide this option even if the
active field exists. For example future commits will hide this option for
leads (crm.lead) as business flow goes through marking them as won or lost
instead of archiving / restoring them.
This commit adds support of a new archivable parameter when defining the
kanban view that hides the archive buttons if it is set to False. Default
value is true so that current behavior is kept as it is by default.
Doc and tests are added.
This commit is linked to task ID 1880051 and PR #26977.
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/kanban.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/kanban.xml b/addons/web/static/src/xml/kanban.xml index adc213999f2..b91b8844752 100644 --- a/addons/web/static/src/xml/kanban.xml +++ b/addons/web/static/src/xml/kanban.xml @@ -23,7 +23,7 @@ <a t-if="widget.editable and widget.id" role="menuitem" class="dropdown-item o_column_edit" href="#">Edit Stage</a> <a t-if="widget.deletable and widget.id" role="menuitem" class="dropdown-item o_column_delete" href="#">Delete</a> </t> - <t t-if="widget.has_active_field"> + <t t-if="widget.has_active_field and widget.archivable"> <a href="#" class="dropdown-item o_column_archive_records">Archive All</a> <a href="#" class="dropdown-item o_column_unarchive_records">Unarchive All</a> </t> |
