The goal of this commit is to have better search results when fuzzy
searching. Before this commit, the position of a match was irrelevant
to the search results. After, a match in a first position has more
weight than a match in last position. This is better, because we often
want to find results using the first letters.
This is controversial, but I could not find a better way to do this
without rewriting the whole library myself (which might not be a bad
idea, it is only 50 lines long)
The current behavior was allowing going on the previous row if the
user is at the start of an editable element and on the next row if the
user is at the end of an editable element. The problem was, we did not
want this behavior when the editable element is a select or m2o (as
the up and down input should open the select/m2o dropdown instead).
By putting the shortcuts lowercase, it is easier to remember and to user.
Instead of Alt + Shift + letter, we have Alt + letter for Windows and Linus users
Instead of Control + Alt + Shift + letter, we have Control + Alt + letter for mac users
The combinations Alt + d and Alt + e are reserved to the browsers, so other letters are chosen
for these actions
When opening a record from a list view, the Edit button in the control panel
sometimes bounced. This was because we listened to event 'mouseup', and
astonishingly, the 'mouseup' event of the click in the list view was catched
by the form view.
The reason why we listened to 'mouseup' instead of 'click' is that some
widgets need the event to be propagated to the body. So this fix simply makes
the form view listen to 'click' instead of 'mouseup', but removes the call to
stopPropagation() on the catched event.
With this commit, actions can have a type=fullscreen. This means that
the navbar will be hidden, for the action and for all subsequent actions
open in the breadcrumb
There is no real security behind this, this is just a feature for
convenience, so users can bookmark an url an open some action in a way
that they are not distracted by anything. In short, this is some kind of
light 'kiosk' mode.
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.
Mainly:
- JS refactoring and linting
- Conversion of .sass into .less split into multiple files
- Templates cleaning and DOM simplification
- Re-generation of web.pot, and update of .po files
The read_slice method in dataset is problematic, because it alters the
dataset ids. So, if 2 consecutive read_slice are started, but the first
one ends after the second one, we don't have the correct ids in the
dataset.
This commit just make sure that previous read_slice do not alter the ids
of the next read_slice.
The list view Column widget should be exposed, so it can be extended.
This is required to allow the creation of other kind of list widgets.
The _format method is not extendable if we don't add this line.
(comment from ged) The file list_view.js should be split in two, and
reorganized, but this should not be done in 9.0.
e8a00bc50d moved the get_file function
from web.session to web.ajax. The issue is that get_file uses
session.url() for iOS devices. Also, in order to prevent an infinite
spinner options.complete() is called before actually opening up the new
window. Although this resolves the issue it still requires the user to
configure Safari to allow pop-ups, otherwise they are silently ignored.
opw-672882
Following commit 8276fb585, the data exported should match the data
displayed on the list view. Therefore, we need to make sure that the
context used match the context of the list view.
When a filter is applied in the list view, the context is evaluated
thanks to pyeval (see the call to `/web/dataset/search_read`). The fix
is to evaluate the context in a similar way.
opw-674473
- Fix for status widget (b25c054c93) moved
to appropriate file: addons/web/static/src/js/views/form_widgets.js
even though the problem is less severe in 9.0 (no crash but triggers
form save, which is unnecessary)
- Fix for website_event_sale ignored (880e951f34)
because the problem does not exist anymore in 9.0, probably due to
refactoring 66871ee65b
When the warning on form view is closed by cancel or OK button, all is
well. But if the modal is closed by any other way the def will stay pending
blocking next operations.
This commit set the deferred as dejected if not resolved when the modale
is closed.
closes#11688
opw-671371
Current behavior before PR: if you create a new record within a one2many
field and the model's form has a clickable status bar defined, clicking
this status bar will raise an exception because the virtual id
(one2many_v_XXXX) will be passed to the model's write method
Desired behavior after PR is merged: clicking just changes the cached
value
For some reason, it was lost. Probably in the graph view/pivot view split.
This commit simply accepts the attribute, but default to true, so nothing
changes unless you have explicitely set it to false.
Also, fixes en error introduced by a forward port (the use of
openerp.web.format_value)
automatically try to detect type of columns from the first 10 rows of file:
If column only contains integer, only show, int, float, monetary, m2o, o2m, m2m fields in wizard
If column only contains true/false values, only show boolean fields in wizard
etc
add an advanced mode which is the same as previous import (show all fields)
Support different date format and float value with currency as well as float value with parenthesis to reprensent negative value.
The editable list view method 'edit' is supposed to wait for the
record to be completely loaded. But when loading the defaults values,
it ignored the actual loading and completed too early. This commit
chains the deferred with the form record.
I recently removed some rpc from init fieldmany2manytag (it was in a
mutex) and moved it to the willStart method (without mutex). The
fieldmany2many tag widget needs this information before it can be
rendered. However, in editable list views, the rendering engine does
not wait for the fields to be ready before completing its initialization
process. As a result, the field many2many tag was rendered before it
was ready, which broke various things, including its position.
This commit attempts to bring sanity to this issue by making sure that
the rendering engine waits for its fields to be ready. Also, the
editable list view should detect correctly when the form is loaded.
If this commit introduces new issues with the editable list view and
onchanges, I will not be pleased. You don't want to bring me this sad
news without at least something to buy my good will.
We have an interesting problem when editing all custom float fields and all
fields with no explicit digit attributes: the propertiesmixin tries to
check if the number was changed, according to their declared precision.
But for these specific fields, it does not find a digit attribute, and
defaults to 2. Then, it makes sure that the changes are ignored if the
new value is too close to the old value (with 2 digits precision)
For example, if the user sets the value to 1.234, then save, then change
it to 1.235, then save, the form view will display 1.234 and totally
ignore the change.
Not that handling the digit precision is done in the propertiesmixin and
in the field float widget. Also, they do different things, and in some
case, may not be the same. All this logic should be moved to the
fieldfloat widget.