Use `search_count` instead of `search_read` to determine the presence of a
mail, because:
- reading all fields is not useful;
- reading all fields causes access errors for user `admin`.
Time has come to update a bit applications name, summary and website links.
Purpose is to have a website page correctly set for applications to be used
in conjunction with the newly-introduced discover button.
Names and summaries are updated to be more updated and shiny.
This commit is related to task ID 47179 and 1861544. Related PR are #1834
and #2365. First one is about classic applications while second one is about
website applications.
Co-Authored-By: Nimesh Jethva <nje@odoo.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.
* [FIX] Update some title attributes for a11y.
* [IMP] Add aria-labels
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views
* [IMP] Add 'alt' attribute on 'img' tags
* [IMP] Add aria-label and title on icons.
* [IMP] Add dialog role on modals.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [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 role on alerts
* [IMP] Add role="button" on simili buttons
* [IMP] Use dialog role, header, main and footer tags for modals
* [FIX] Set all tabs aria-selected since we don't have proper script to set the attribute correctly.
* [IMP] Add widget, navigation or img role to aria-labelled items
As the possibility to test tags was introduced, some tests must me
adapated to work as before.
Tests that have to run at 'post_install' have to be tagged '-at_install'
and 'post_install'.
Also, nightly tests that contact external entities have to be tagged
'-standard' to avoid to be launched by default. Also they have to be
tagged 'external' so that they can be selected alone.
website_form_editor does not depend on project but apparently just
assumes it's been installed and the form construction tour uses it to
change the "action" selection to issues then (back to?) sending an
email.
This ends up triggering two additional "change" events on the email
option, which adds a new email_to field every time, blocks the
submission of the form (since they're all required and only one is
filled) and breaks the tour.
On "toggle_email_to", only add an email_to field if it's not already
present.
website_form_editor does not depend on project but apparently just
assumes it's been installed and the form construction tour uses it to
change the "action" selection to issues then (back to?) sending an
email.
This ends up triggering two additional "change" events on the email
option, which adds a new email_to field every time, blocks the
submission of the form (since they're all required and only one is
filled) and breaks the tour.
On "toggle_email_to", only add an email_to field if it's not already
present.
The new RPC API calls the '/web/dataset/search_read' route for a
search_read instead of '/web/dataset/call_kw/model/method'. The
first one returns an object with keys count and records, whereas
the other one only returns the records.
When converting the code in website_form_editor to this new API,
one forgot to update the handling of the RPC result.
The website_form_editor code was adapted to the new rpc methods, but
this concerns class that do not have the rpc method. We use the
callback argument to specify a given ajax method
Use performModelRPC instead of Model object or use ajax if performModelRPC
is not available
nb: EventDispatcherMixin include now the custom_events managment instead
of widget[REMOVE] web.dataModel
Automatically whitelist fields added to a website_form through the form
editor.
Ideally fields *removed* from a form should be removed from the
whitelist, but since we don't/can't keep track of the website's form,
there's no way to know if a field is needed by multiple forms and thus
no way to remove them.
Plus that would require way more source-tracking than just whitelisting
all the form's fields, I don't know if snippet widgets can track the
removal of elements from a page (easily anyway).
- Prevent user from removing the Submit button
- Renamed Success Page into Thank You Page in the modal
- Destroy the snippet if user closes the very first configuration modal
- Replaced display_name field by subject in tour because the former was readonly
- Changed "Editor" to "Builder" in module name
- Removed field domain, need to fix it later
- Removed lingering console.log
- Require recipient e-mail
- Added missing Date field