Commit Graph
12325 Commits
Author SHA1 Message Date
Christophe Simonis b81c2bce84 [MERGE] forward port branch saas-11.4 up to 3c108977c1 2018-10-22 16:59:51 +02:00
Odoo Translation Bot de265ce63e [I18N] Update translation terms from Transifex 2018-10-21 01:25:56 +02:00
Mohammed Shekha a4bcbecff1 [FIX] web: keyboard overlay with position absolute
Before this commit, when an element with access key has a CSS
position absolute , pressing the key 'ALT' to show the access
key overlay may break the position of the element.

This is due to altering the CSS position of the element which the
overlay is attached to: it becomes `relative`, so that the overlay
takes the whole size of the attached element.

In case of an absolute element, it should not become relative,
otherwise its position on the document may be completely different.
Since the overlay has position `absolute`, if its parent has also
position `absolute`, then keeping both with position `absolute` will
let the overlay take the size of the parent, without changing the
position of the parent.

Task-ID 1885445
2018-10-19 09:23:21 +00:00
TWA 972c8e9ff5 [FIX] web: File upload input on_clear event not propagated
The handler function was used directly in the code. The MouseEvent wasn't provided in that case.
This FIX split the handler function and the processing function so that it doesn't interfere.

closes odoo/odoo#27929
2018-10-18 08:55:07 +00:00
Christophe Simonis e9ae419fca [MERGE] forward port branch saas-11.3 up to 0de06a4132 2018-10-17 10:54:19 +02:00
mgh-odoo cb8dcb5913 [FIX] web: avoid margin on top of list view in mobile
When header was too long, the text was breaking into next line.
We want to avoid this behavior in mobile because it causes
a big margin on the top of the list view.

This issue was probably caused by the upgrade of Bootstrap.

task-1878252

closes odoo/odoo#27927
2018-10-18 08:44:22 +00:00
Christophe Simonis 41bf8ce6d9 [MERGE] forward port branch 11.0 up to b29b545fe8 2018-10-16 17:53:26 +02:00
Aaron Bohy 7063c50924 [FIX] web: FieldMany2one: don't ignore tabindex in readonly
opw 1889710
2018-10-16 10:58:49 +02:00
Martin Geubelle 70560d1f11 [IMP] web: add showSearchInput option on ModelFieldSelector
The option `showSearchInput` has been added on the ModelFieldSelector to allow
the user to easily filter the displayed fields. An input is displayed in the
popover title.

The search method is fuzzy for optimal results.

closes odoo/odoo#27788
2018-10-15 11:59:33 +00:00
Aaron Bohy 03fe95d6af [REF] web: small refactoring pass on some web components
(mainly views and ActionManager)

- add missing docstrings
- fix typos
- correctly order functions and imports
- put functions in correct sections
- stop using 'event' as argument of handlers
- don't call handlers directly
- remove trailing spaces/tabs
- move module created in stable version to its own file
- follow js guidelines in general

closes odoo/odoo#28024
2018-10-23 10:56:12 +00:00
Christophe Simonis 9dbb7d199c [MERGE] forward port branch 12.0 up to b81c2bce84 2018-10-22 17:57:08 +02:00
Vincent Schippefilt 2b0642d09e [IMP] web: remove es5 shim
The library es5 shim was usefull for older browsers that do not implement
completely the es5 specifications, like IE9.

As we do not support browsers older than IE11, that fully supports all
the features of es5, the library has become useless.

Removing this library will remove a little bit of noise in the callstack
when debugging.

closes odoo/odoo#27877
2018-10-19 08:49:56 +00:00
Géry Debongnie d91f0ce95d [IMP] web: log error when module crashes at loading
Before this commit, if a JS module caused an error while being
evaluated, the error was silently swallowed (and only logged in debug
mode, in the extra information about the state of all modules).

With this commit, we always log the error in the console.  Note that
this only applies to JS execution errors.  If a file has invalid
javascript structure, then a parsing error will happen, even before the
module system has the possibility to do anythin.

closes odoo/odoo#27836
2018-10-16 08:44:29 +00:00
Christophe Simonis 1ade6675c3 [MERGE] forward port branch 11.0 up to 717f458394 2018-10-11 16:29:46 +02:00
Aaron Bohy a781083186 [FIX] web: close m2o (in o2m) dialog with ESCAPE
Let's assume a one2many editable list containing a many2one field
(e.g. in a sales order, the product_id m2o in order_line o2m), and
the scenario where the user clicks on 'Create and Edit' in the o2m,
and then presses ESCAPE in the opened dialog.

Before this rev., it crashed because the 'navigation_move' (cancel)
event wasn't stop propagated by the form renderer (the one of the
dialog), and thus bubbled up to the list editable renderer, which
asked its basic model to discard a record it didn't know.

Note: same fix as in 8445baa (done in saas-11.3), but with a
simpler test.

Task 1878254
2018-10-11 11:21:57 +02:00
Christophe Simonis 32b19115e9 [FIX] web,mrp: move test to adequate module 2018-10-10 18:50:37 +02:00
Martin Geubelle f249c5ef2a [FIX] web: restore broken datepicker input behavior
In Firefox, the input behavior and visual representation (navigation, caret
placement, value selection, etc.) was broken when using a datepicker (easily
reproductible on date and datetime widgets).

This was due to the `focus` event being stopped on the input, which doesn't
seem to be correctly supported by Firefox.

The deleted code was supposed to toggle the picker when the field was clicked
(see odoo/odoo@89093a1) (toggle on click and disable focus) but the lib
correctly supports on focus without extra code.

This also fixes the fact that the datepicker was not open on focus (only on
clicked). In some tests where the field was the first in the form view, it is
now correctly autofocused.

Forward-port: not useful from 12.0 because the code has changed with BS4 and
this has already been applied in odoo/odoo@6692919 and odoo/odoo@c63630d.

Closes #23438

closes odoo/odoo#27657
2018-10-11 08:41:48 +00:00
Christophe Matthieu 4aec0b7740 [FIX] calendar: notifications may appear
Following the transformation into notification service, performed by
commit 07cd24b1ec, calendar has been
forgotten.
2018-10-10 16:29:28 +02:00
Christophe Simonis 7415f40fbd [MERGE] forward port branch 11.0 up to a69f117bbf 2018-10-10 14:40:01 +02:00
David Monjoie ea1ad98354 [FIX] web: css fixes for Firefox
- fix statusbar overflowing on the right and triggering a scrollbar
- fix background of the trash icon of the editable list remove
  button which was white rather transparent
- fix cursor that was not properly displayed as pointer when on
  top of the trash icon, while it properly transformed in the td

closes odoo/odoo#27806
2018-10-15 14:18:05 +00:00
David Monjoie 3ed45466f1 [FIX] web: fix menu app button when menu_id can't be inferred
There used to be no processing done at all when loading the client
from an url missing a menu_id and from which the menu could not
be inferred from the action_id. This resulted in the app name
button in the menu being empty but still present and not bound to
any action. Clicking on it triggered a traceback.

This commit stops ignoring the case when the menu cannot be
inferred from the action and hides the entire menu and submenus
for this particular action. They will be restored when entering
an action from which a proper menu can be inferred.

closes odoo/odoo#27791
2018-10-17 11:39:41 +00:00
Adrien Dieudonne 59b7dec69c [FIX] web: line chart x ticks labels overlapp
Before this commit, we tried to hide some labels depending
of the available size of the graph.
However, it doesn't worked when the graph is updated.

A much simpler solution is to use the scale’s automatic tick
generator implemented in D3.
So, in this commit, we realized that 'tickValues' is unnecessary
because data are passed correctly (see 'svg.datum(data);') and
labels are defined in 'ticksLabels'. There is nothing else to do.

We had to remove the skipped test because 'renderEnd' is not triggered
for line chart. We need to update nv.d3.

We already tried to fix this issue in the following commit:
https://github.com/odoo-dev/odoo/commit/c4937132a38873761fa0ac0b41c983b917cb52f1

Documentation:
https://github.com/d3/d3-axis#axis_tickValues

closes odoo/odoo#27828
2018-10-16 06:37:27 +00:00
Alexandre Kühn 661483c026 [FIX] web: no duplication function for change_menu_section
Revision on https://github.com/odoo/odoo/commit/b7cf456560dc4fd7c1217ba90f0b5609466ede50

The commit above assumed the function `change_menu_section` was
mistakenly removed. However, it was turned into a handler function
and renamed according to our JS guidelines `_onChangeMenuSection`.

This commit removes the duplicated logic by removing the
function `_onChangeMenuSection` and using `change_menu_section`
as the handler for the bus event `change_menu_section`.

closes odoo/odoo#27809
2018-10-15 14:37:21 +00:00
Odoo Translation Bot e774b2cb1c [I18N] Update translation terms from Transifex 2018-10-14 01:23:43 +02:00
Sébastien Theys c73efc27b7 [FIX] web: stabilize sequence for new records on last page
Before this commit, the compute sequence was relying on the fact the ID was used
as a secondary order key to get the right result.

This is necessary when adding items between pages because we don't resequence
the following elements.

However this was not necessary when adding new elements on the last page since
there are no following elements to resesquence in that case.

PR: #27639
2018-10-12 14:29:51 +00:00
Lucas Perais (lpe) cba5f7a98f [FIX] web: fetch dependency fields in x2many
Image field widget need the __last_update field alongside them
for caching purposes, though that field should never be present explicitly
in the views

Before this commit, the dependencies of field widgets were not merged into
the model's fields definition, creating a traceback when adding an image field widget
into a x2many list

After this commit, there is no traceback and the image field works properly

closes #27545
2018-10-09 14:16:56 +02:00
Alexandre Kühn 5c12a664d5 [FIX] web: click on href inside kanban record
Before this commit, when clicking on a link in a kanban
record having `href` that is set, it was opening the record
and accessing the `href`.

The intended behaviour is to not open a record if any children
component of the record contains either a click event or is
a link with `href`. The former was correctly handled, but not
the latter.

This commit fixes the issue by preventing opening the record
when clicking on a inner link with href from a kanban record.

Closes #24664

closes odoo/odoo#27529
2018-10-09 08:39:50 +00:00
Lucas Perais (lpe) 62cbc5f240 [FIX] board: translate custom views according to current user
Have a user in English, put a sale report as "favorite" (pinned to dashboard app)
Change the user's language

Before this commit, the pinned view was in English (because it was recorded that way)

After this commit, the pinned view is in the user's language.

OPW 1890664

closes odoo/odoo#27574
2018-10-12 08:36:19 +00:00
Odoo Translation Bot 44069cc4bd [I18N] Update translation terms from Transifex 2018-10-14 03:21:07 +02:00
Sébastien Theys 57ae9428b4 [FIX] web: prevent URL click from opening a record
If we click on a link, we only want to open the URL,
and not the record when the button is on a list.

PR: #27230
2018-10-12 12:45:38 +00:00
Benoît Fontaine 347a3bd948 [FIX] web: use correct context attribue
Disable the possibility to create partner from calendar's sidebar
The option "can_create: false" was present but badly referred

Fixes odoo/odoo#27666
2018-10-12 11:58:19 +00:00
len-odoo ad79cc09c6 [FIX] web: don't allow reference widget to be set on char fields
The reference widget is expecting a models list as selection attribute
in the field declaration.
It does not exist in the case of the char field.
Support for char fields was added to allow for external identifiers,
but it only works in readonly.
As a consequence, it tracebacks in Edit mode when used in studio.

We thusly remove char field from the list of supported fields.

opw 1892602

closes odoo/odoo#27708
2018-10-12 10:13:50 +00:00
len-odoo 52d779007d [FIX] web: use read to update record values after resequence
Commit:
https://github.com/odoo/odoo/commit/818c18e55d0718286ff5bf332186a10f4d7a58ef
Updated the resequence logic in a way that was almost falser than before.
The added test however did work by coincidence, as index values were equal to
the sequence field values.
To be sure that we synchronize with what happens on the server, we do a read
after the resequence.
Additionnally, we take into account the result of the server resequence return;
if it is false, it means no resequencing happened, so we should not do a read.

opw 1867049

closes odoo/odoo#27184
2018-10-12 07:51:12 +00:00
8445baa08d [FIX]web: do not crash when dismissing a modal with escape
stopPropagation of navigation_move event for where direction=cancel,
currently if navigation_move event throws error when user press escape
in dialog where dialog is opened from editable list record

Scenario: Install website_sale -> Open Product form(variant enable) ->
open variant tab -> open Attribute m2o form popup and press Escape on dialog
Result: Error
Expected: It should close dialog and keep editable list view record open,
btw m2o field should also be focused when dialog is closed but that's
another issue, will be fixed in another ongoing task

Related to Issue: #1873919

Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2018-10-09 09:46:39 +02:00
Xavier Morel 14ff69a46c [IMP] web: keep ?query on becoming superuser
Being in debug mode is necessary to become superuser (whether on the
login page or within the client), however because the becoming
endpoint would straight redirect to the _login_redirect result the
debug mode would be lost, which is commonly inconvenient.

Replace the redirect_with_hash call by local_redirect, which goes
through great pains to conserve the ?debug by default.

Task 1908202

closes odoo/odoo#29058
2018-11-27 09:32:57 +00:00
Lucas Perais (lpe) 034a27f630 [FIX] web: customizing filter doesn't close dropdown
Have a many2one, click on search more

Open the filter menu of the search view

Add custom filter

Click to select a field

Before this commit, the whole dropdown closed

After this commit, it doesn't

OPW 1911337

closes odoo/odoo#28969
2018-11-26 14:47:44 +00:00
Lucas Perais (lpe) 889bdd3569 [FIX] web: fielddate[time] should select their value when entering them
Before this commit, when focusing on a date[time] field, the value was not selected
In v11.0, it was

This is due mostly because of the migration to BootStrap 4

After this commit, the value inside the input is selected

OPW 1911333

closes odoo/odoo#28989
2018-11-26 14:51:09 +00:00
Odoo Translation Bot 07f6b8ef57 [I18N] Update translation terms from Transifex 2018-11-25 01:26:32 +01:00
Aaron Bohy 06b91b7658 [FIX] web: benchmarks: add missing test_utils
Without those, the benchmarks suite can't run.

closes odoo/odoo#28996
2018-11-23 15:00:17 +00:00
Aaron Bohy fad35964bf [IMP] web: backport of new asserts
This rev. is a complement to the partial backport 49e78f46 of
abf32b8. In addition to the helpers, we also backport the asserts
(like isVisible, containsOnce...).

closes odoo/odoo#28994
2018-11-23 14:51:49 +00:00
Christophe Monniez 4f28121065 [FIX] web: increase clickEveryWhere test timeout again
Two minutes increase was obviously not enough.

closes odoo/odoo#27709
2018-10-12 08:34:37 +00:00
Aaron Bohy 76cc621c1d [FIX] web: grouped list view: group header layout
This rev. ensures that the group name is vertically centered inside
the group header row. Padding rules have been moved from enterprise
to community.

Task 1878254

closes odoo/odoo#27603
2018-10-11 19:03:57 +00:00
Jeremy Kersten c4e0e5461c [FIX] web: guess resize placeholder
Before this commit, if you ask for a small image, you was waiting a picture of
64x64 but in case this image was not found, a placeholder with an other size
was returned.

Now, we try to guess the asked size, and return a resized placeholder.

This bug appear since we change the default placeholder picture with a big one

This will fix several issue and avoid to hard code size everywhere in the code

Eg: commit 92f837c and commit https://github.com/odoo/odoo/commit/154fc7d9dd550d35b7266af024e54c20e18938fc#diff-9af1af2039d16d6b544d481b4ee1ed7cR144

closes odoo/odoo#27695
2018-10-11 17:21:53 +00:00
qsm-odoo c7f72248a9 [FIX] web: clear all BS4 alerts
Commit https://github.com/odoo/odoo/commit/8caf84f70ada259f041b424d37686845604d182a
was not handling the case where there was an invisible DOM element
between the button box and the alert component. Let us clear all alerts.

This commit also introduces a way to properly fix/extend bootstrap in
future fixes/updates (some of our rules may already be moved in that
file once it is forward-ported to master).

closes odoo/odoo#27662
2018-10-11 16:31:24 +00:00
Martin Trigaux 57884ccdc8 [I18N] all: convert remaining model: translation entries
It should be model_terms:

Fixes odoo/docker#219

closes odoo/odoo#27664
2018-10-11 09:49:01 +00:00
Nicolas Lempereur 92bfbfd4f7 [FIX] web: improve style header background layout
As per fpodoo specification:

- decrease max width of logo (from max 33% of header width, to max 22%)
- decrease font-size of tagline by 30%

So logo is smaller, and company address has less probability to get
pushed lower (since sum of contents are larger than width).

Sizing the header works as follow:

If the header is equal to wkhtmltopdf page width or bigger, it is zoomed
out until it fits. So with current configuration:

- 100% of width is 900px,
- company tagline is at maximum 33% (300/900),
- company logo is at maximum 20% (200/900),
- remaining (company address) is remaining space of 44% (400/900)

closes #27641
2018-10-11 14:18:13 +00:00
Alexandre Kühn b7cf456560 [FIX] web: self.menu.change_menu_section is not a function
Revision on https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242

The commit above changed the menu in community, so that it
looks like enterprise. To do so, it copies the menu management
from the enterprise repository to the community repository.

Some code about the home menu has been removed, since it is replaced
with the app menu in community. However, some functions have been
removed by accident, such as `change_menu_section`.

Closes #27436
2018-10-10 15:39:25 +00:00
ThanhDodeurOdoo 1dbb555aab [FIX] document: JS feature disabled
Reason: This feature currently has unfixed bugs, does an unnecessary RPC and
was functionally replaced by a button inside the chatter in commit
7f97c9f and the menu inside the debug manager in commit d12b88315.

This commit disables the JS part of the document module to prepare
for the complete removal of the whole module and the MOV of
the indexation to base.

Closes #27613
2018-10-10 18:28:13 +00:00
Martin Trigaux 0aa0cec97a [FIX] web: do not warn on empty field
If no value is specified on the datefield, do not set a warnfuture message

Remove code comment that was referring the condition present at b51b0d66c2
but no longer present.

Add tests

Fixes #27551

closes odoo/odoo#27593
2018-10-10 13:59:36 +00:00
Christophe Monniez 8d9e276a9f [FIX] web: increase clickEveryWhere test timeout
Actually, in normal conditions, the test last a little bit less than 30
min as Admin user in enterprise edition.
This is to close of the timeout and as expected, the timeout was
reached.

With this commit, the Admin test in increased of 2 minutes.
The Demo test duration is slightly faster and does not need an increase.

closes odoo/odoo#27608
2018-10-10 08:03:08 +00:00