Before this commit, when saving the pivot state in a favorite filter,
then restoring it, the row groupbys were ignored. This commit makes
sure that we take them into account if necessary.
Before this commit, when changing measures from the favorites menu (by
selecting a filter with some pivot_measures), the measures in the
dropdown menus were not correctly updated.
This commits make sure that we update the active measures in the menu after
each changes coming from a do_search.
Modern browser implement the autofill specs as described at
https://html.spec.whatwg.org/multipage/forms.html#autofill
This means that there is now a way to tell the browser when a password
field is supposed to be filled with the user's own password (e.g. on a
login field), and when it's supposed to be used to input a new secret
value (e.g. when changing someone else's password).
This can be distinguished by setting the autocomplete attribute
to `current-password` or `new-password`.
In addition, many browsers have decided to entirely disregard the
autocomplete='off' attribute value, because it is felt that using
a secure password manager (as provided by those browsers) is a net
gain for security, allowing users to pick stron passwords.
See also https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
Based on this, the framework should generally consider that
password fields in the backend are meant to be used for *setting*
new values (autocomplete="new-password", i.e. no autocompletion!),
whereas the password field on the login page can indeed be autofilled
with the user's current password (autocomplete="current-password").
In addition to making the above changes, this patch also
lets developer specify their own `autocomplete` attribute on
text input fields.
Be a little less strict when not showing o2m list view warning so if the
o2m is not editable (a modal is open instead of editing inline) we still
show warnings.
Also have warnings over modal overlays so they can be used for modals.
opw-702333
With 003d85b instead of getting the name of the relation
field_relation we get field_relation/id.
But the data about the related fields are not gotten all at once when
opening the export modal. They are gotten by clicking on the arrow of
the related record.
So we need to have these /id information saved in the export list,
otherwise for example the related records can be missing when exporting
from an export list, whilst everything was OK without using the saved
export list.
With the previous change, an export list could contain an id and .id
fields for the same relational field, so a change must also be done in
fields_info method used when getting a saved list.
opw-665994
opw-693535
note: adapted forward-port of 8.0's 29be9ae80 which was lost when
merging web enterprise onto web community.
The Python method `strftime` raises an error when the date is older than
01-01-1900 ("The datetime strftime() methods require year >= 1900"). If
the user mistyped the date (or was expecting 01-01-16 to be converted
into 01-01-2016), this can lead errors since the ORM uses this method
frequently.
opw-702313
The Python method `strftime` raises an error when the date is older than
01-01-1900 ("The datetime strftime() methods require year >= 1900"). If
the user mistyped the date (or was expecting 01-01-16 to be converted
into 01-01-2016), this can lead errors since the ORM uses this method
frequently.
opw-702313
An editable list can be drag-and-drop sorted by:
- displaying a sequence field,
- displaying a field with the `handle` widget
At first it was only working if the list was not specifically ordered,
but with 26bf35260 it also worked if the list was ordered on `sequence`
or `sequence ASC`.
This commit changes this so it works:
- if the list is not ordered (same as the original intention),
- if the list is ordered by the sequence field (widget `handle` or sequence)
This allows to have a custom model (on which we can't define _order) to be
ordered on a custom field.
This also remove a far-fetched oddity such as having the view ordered by
sequence but having a custom sequence field before `sequence`.
opw-704612
In e0c4ec54ca a change was done to improve the behavior in some
editable list instances, but this introduced a small issue for
list with line creation disabled.
With this change, doing tab or enter at last line should keep the
previous behavior of wrapping around and not creating a new line.
opw-703748
On UNIX, the timezone modules conversions can be reset by using
`time.tzset()`. On windows this is not available and the timezone (TZ)
environment variable must be set before the first import of time module.
If not, all datetime gotten in python without specifying UTC (such as
datetime.datetime.now) could be wrong.
This was fixed with 4a77c6a0 in 2013, but has come back since 389c2ba97b
imported pkg_resources (which do a `time` module import) before that.
closes#14926
opw-693764
The number of records selected by a FieldCharDomain was only computed
with the base language.
But when selecting the domain with a modal window, or when sending a
mass mailing restricted to a domain, the current user language is used.
With this commit, the number of records is computed with the current
user language.
opw-693836
When a search is performed and the completion feature is used (search on
a many2one field), clicking on a '(no result)' item causes a crash.
opw-703557
Simplifies the left margin calculation logic with a pre-defined width.
In practice, more use cases should be taken into account, and that could
just make the logic overkill.
opw-697626
In graph view, the y-axis always uses the standard float precision with
2 digits. This might not be enough if the precision was defined
differently for a given float type.
opw-697625
When there are too many labels to display on the x-axis, they overlap
and it simply becomes unreadable. By slightly rotating them, this can be
avoided in most cases.
opw-697625
opw-697626
Fix and issue is similar to odoo/odoo@1f06cc416
When clicking on delete icon before saving current list row edition (by
clicking outside the editable field), it could lead to traceback in some instances
because the deletion and saving are done concurrently.
closes#627
opw-695743
Before this revision,
using a selection field with as possible keys `0`,
such as `require_payment` in `website_quote`,
resulted to the records field values to be stored
as `NULL` instead of `0` in the database.
This leads to the inability:
- To distinguish records with this selection field not set
or set to `0` (as both are stored as `NULL`)
- To search for records with the field set to `0`
(as they are considered not set)
For instance, while having `website_quote` installed,
search for sales orders with `Payment` set to
`Not mandatory on website quote validation`: It won't
return any result, even if you have some.
opw-697454
Since commit 8625242884, the graph view crashed when
displaying a line chart with only one record. The reason is that the
method display_line can return undefined (if no line chart can be
displayed). In that case, there is no reasy to try to display its
tooltip.
This commit simply protect against the case where it is undefined.
When a user fills partially a date or datetime field, the system will
somehow autocomplete the value entered. For example, if the user enters
"11//11" then clicks on the Tab key, it will be completed as
"11/11/0000".
However, the year 0000 is not recognized in Python, and this causes a
crash upon saving.
opw-695035
Rev. 3f7d350fe21d9e2afb35a9ce3e2652940e3f259d1 introduced
auto-cancellation of the edit mode when the user clicks
outside the edited line.
The unfortunate downside was the auto-cancellation of the
edit mode also when the user presses ENTER while the
line is not valid.
This is especially annoying when using barcode scanners to
fill in values, as scanners usually send an ENTER keystroke
at the end of the input sequence.
When a many2one field is focused this event will often occur
before the autocompletion popup has a chance to open. At that
point the line is considered invalid, and the edition mode
is cancelled! If no field is considered dirty yet on the line
this simply drops the whole line, otherwise it will open a
navigation confirmation popup. Both results equally prevent
the use of barcode scanners.
This patch makes sure the edit mode is only cancelled when the
user indeed clicked outside the line, and not for other cases
where save() is requested, such as an ENTER keystroke.