[FIX] web,*: restrict kanban examples availability

*: project,utm

**Before this commit**
With the following steps, it is possible to use kanban column quick
creation with unexpected fields, i.e. creating projects instead of
stages inside a project:
- Project > New > Groupby 'Project'
- Click on the "see examples" link in the column in creation
- Apply any column examples
- Instead of stages inside the project, new projects are created

**After this commit**
The kanban_examples registry elements should now clearly
state which are the allowed groupby fields.
The 'See examples' link will not be displayed if the groupby field
is not allowed.

**Usage**
See the modified files in project and utm modules in this commit.

Taskid: 3246042
Part-of: odoo/odoo#115909
This commit is contained in:
Bruno Boi
2023-03-29 09:33:35 +02:00
parent ba45832946
commit d2575b50eb
6 changed files with 25 additions and 1 deletions
@@ -6,6 +6,7 @@ import { registry } from "@web/core/registry";
const exampleData = {
ghostColumns: [_lt('Ideas'), _lt('Design'), _lt('Review'), _lt('Send'), _lt('Done')],
applyExamplesText: _lt("Use This For My Campaigns"),
allowedGroupBys: ['stage_id'],
examples: [{
name: _lt('Creative Flow'),
columns: [_lt('Ideas'), _lt('Design'), _lt('Review'), _lt('Send'), _lt('Done')],