Now that most refactoring has been merged
It is better to have red a great work of another culture in translation than never to have read it at all.
― Henry Gratton Doyle
Barcodes are detected by catching keypresses. When a keypress is not
part of a barcode, it is 'released' by forging a keypress event.
For security reasons, a non-native keypress doesn't trigger the native
input mechanism. So in order to make both barcode-scanning and manual
keypresses work in a field, it is necessary to have a handler listen
to the 'false' keypresses and simulate the native input behaviour.
When a button in the modal's footer has an onclick handler and closes the
modal, the action of closing the modal should wait for the potential deferred
returned by the handler.
For instance, if an handler performs an asynchronous call and, when resolved,
triggers a notification, the notification doesn't reach the webclient if the
modal is already closed because the widgets hierarchy is broken.
This allows to detect barcode scans while the focus is in such a field.
It is not the default behaviour because buffering keystrokes to see if
they are a barcode then releasing them if they aren't isn't trivial
(it is impossible to trigger a native keyboard event).
A 'display: none' rule on hover has been added for boolean buttons, on each
'o_stat_button o_stat_text' that hasn't classname o_hover. This applies on
every stat button that isn't a boolean button, so their content is always
hidden on hover.
Disabling all warning coming from listview editable broke tests
because they relied on this behaviour.
The problem that was to be solved is that warnings coming from
listview editable were useless for the user in a form view. Another
solution must be found.
Backport of refactoring/fixes/features for the listview editable. This
includes changes to formview and listview too (as the listview editable
interacts with them).
The widget now provide labels that depend on widget option "terminology". For
each terminology, it provides four button labels that are shown depending on
the field's value and hover status on the button.
In method `user_has_groups`, make "Technical Features" effective in debug mode.
Make the group "Employees" inherit "Technical Features".
Make the group "Technical Features" invisible in the user form view.
Remove useless `ir.rule` attached on group "Technical Features".
Fix `test_acl` by avoiding the tricks around the group "Technical Features".
On a first edition of a view list editable, scrolling before the first
edition might cause an issue: the editing fields are higher than they
should.
This commit solves this.
This issue stems from jQuery .offset({value}) function which is broken
if the element we want to position:
- is in absolute postionning,
- is inside a scrolled element in non static positionning,
- has not both top and left css property setted,
- has no ancestor element between itself and the scrolled not in static
positionning.
This issue happens less (and probably not at all) in saas-6 since the
last condition is most often not met thanks to this change:
https://github.com/odoo/odoo/commit/1ccd87a#diff-27c072074221456684bfc5f150ca0bc9R876
This issue of jquery is solved since jquery 3.0.0-alpha1:
https://github.com/jquery/jquery/commit/2d71594
( the issue is shown in https://jsfiddle.net/wpjrnggf/ and we can see it
is solved with jQuery 3.0.0-alpha1 https://jsfiddle.net/L6ykpjgy/ )
closes#8251
opw-647622