This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.
task-3370463
closesodoo/odoo#127469
Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
- base.view_base_module_uninstall
- base.base_module_install_review_view_form
- base.base_module_install_review_view_form
were the only 3 views in which a node was set outside the
<form>, <tree>, <kanban>, ... node.
```sql
master-all=# SELECT name FROM ir_ui_view WHERE type != 'qweb' AND inherit_id IS NULL AND arch_db ->> 'en_US' not ilike '<' || type || '%';
name
---------------------------------------
Uninstall module
base.module.install.request.view.form
base.module.install.review.view.form
(3 rows)
```
These were introduced by odoo/odoo#99438.
The goal was to set these warnings on top of the form view,
with no margins for a better UI.
While this serves an understandable purpose,
not having <form> as the root node causes issues:
- First, as seen in the above revision,
it requires to have to specify the view type in the XML data file,
because the view type is guessed from the root node of the view
```diff
<record id="view_base_module_uninstall" model="ir.ui.view">
<field name="name">Uninstall module</field>
<field name="model">base.module.uninstall</field>
+ <field name="type">form</field>
```
- Second, in the view post-processing, some implementations
are based on the root node of the view,
and not having `<form>` as the root node for instance makes
the view not editable, or not pass the `readonly`, `required`
attributes from the Python model.
https://github.com/odoo/odoo/blob/7b9bd9d37731fae724dc5d91da656dab70aa9ad4/odoo/addons/base/models/ir_ui_view.py#L1146-L1147https://github.com/odoo/odoo/blob/7b9bd9d37731fae724dc5d91da656dab70aa9ad4/odoo/addons/base/models/ir_ui_view.py#L1375-L1379
We could use the view type from the model itself,
instead of the root node, to determine the type of the view,
but then you wouldn't be able to use attributes set on the view node,
such as `editable="1"`, to determine if the root/view node is editable
or not.
https://github.com/odoo/odoo/blob/7b9bd9d37731fae724dc5d91da656dab70aa9ad4/odoo/addons/base/models/ir_ui_view.py#L1352
Because the `<form>` node wasn't the root node in the uninstall form view,
the modifiers attributes (`readonly`, `required`) were not passed
from the field python model to the view,
and the Studio fields
`custom_views`, `custom_reports`, `custom_models`, `custom_fields`
were editable in the view, while they shouldn't as those
are readonly computed fields.
A constraint will be added in master, to prevent developers
to create views with as root node something else than the view type.
The constraint is not added in stable 16.0 to avoid to suddenly
raise a constraint exception for modules from the community
and customers in production databases.
closes#107947closesodoo/odoo#108319
X-original-commit: c9dd160242c55dc824d4300635528dc82309f599
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit does the following changes:
- Improve some project filter and views
- Align the module kanban buttons
- Sort the module in uninstallation wizard
task-2731708
closesodoo/odoo#83339
Related: odoo/enterprise#23783
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Define `data-hotkey` on most used action buttons.
For the modals, the following keys are dedicated for "special"
actions:
- Alt+G: add
- Alt+V: save
- Alt+Z: cancel
closesodoo/odoo#73275
Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Most of the modules have a square icon but some don't. For instance, the
flags of l10n modules, or other third party modules.
Flags have very specific proportions, and we don't want them to be
resized when rendered.
While we could hardcode a square icon for each problematic icon, it
would be more manipulations, and the flags are already in the repo
without the right proportions; we don't want to duplicate binaries.
The many2many `module_ids` kanban field of the uninstall wizard has also
been updated to look more like the generic kanban view for the modules.
The classes in the kanban view of `fleet_vehicle_model_view_form` seem
to have been copy-pasted and are useless. It has been removed to reduce
future possible side effects of changing css.
closesodoo/odoo#56421
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit adds a warning banner near the bottom of the uninstall
wizard warning the user of the consequences of module uninstallation and
advising him to try it first on a duplicate database so as to avoid
borking the database.
The Cancel/Confirm buttons were also swapped and the Cancel one was
made primary to avoid mindless "next-clicking"
closesodoo/odoo#33396
Task-id: 1824392
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.
This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.
* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items