odoo/odoo#156439
Created by JavaScript, Aaron Bohy (aab)
Closed
- label
- odoo-dev:master-semantic-kanban-aab
- head
- 76245618d5ef17a220b514e4fafa577d35fd86e9
| odoo/odoo | odoo/enterprise | |
|---|---|---|
| master | #156439 | #58044 |
[WIP] web, *: semantic kanban view engine
New semantic kanban engine: no more weird 'js qweb stuff' in your backend views.
We started from this 'generic kanban template' and simplified it a bit to have a few new node-types:
Layout
| Layout block in the image | Node |
| column | <aside><br>Attributes: full (default: "false") to expand on card padding (e.g. res_partner) |
| main > header/body/footer | <section><br>By default, will have classnames "d-flex justify-content-between flex-column".<br>Attributes:type (optional) set to "row" to have class "flex-row"No need for footer/header, the first/last section would stick to top/bottom of the card |
| ribbon | use a <widget> node with name="web_ribbon" almost anywhere in the template (like in form views).<br>Best practice would be to use it as direct child of the <kanban> node. |
| menu (not shown in the mockup) | <menu>injects the toggle in 'after title' section in the mockup (vertical ellipsis)<br>by default support any html and we encourage the use of button nodes and perhaps separator node with a string as a default sectioning mechanism; in addition to a default size in css? otherwise any custom html + css is fine (we add a class on the dropdown menu to make css targetting easy) |
New attributes on root node
| global_click | Default: true Replaces the oe_kanban_global_click / oe_kanban_global_click_edit logic<br>Around 27 kanban views where it must be set to disable the feature -> <kanban global_click="0"> |
| color | Optional.<br>Can be set to the field to use as color for the card border-left.<br>Replaces the kanban_color(record.color.raw_value) feature -> <kanban color="color"> |
Dropped features
kanban-tooltip template (3 usecases: gamification + 2x maintenance)-
kanban_getcolorname not even translated selection_mode (true is SelectCreateDialog), used to remove stuff -> automatically make the card inert in SelectCreateDialog (only allow to select the card)
-widget.deletable/ widget.editable-> automatically disable type="delete"/ type="edit"buttons/links- all rendering context (record / widget / luxon...)
- qweb directives (t-if/ t-esc ...) (
t-ifis replaced byinvisibleattribute) - automatically set
widget="many2many_tags"on many2many fields -> must be set in the arch now, like in list views -
type="open"as since form views are always in edit mode, it opens the record in edit anyway (like type="edit")