Commit Graph
254 Commits
Author SHA1 Message Date
dbhandqsm-odoo 6af61e81a9 [IMP] web_tour: review consume event for m2x widgets
Tour steps on m2x widgets are now consumed only when an actual record
is selected (not on random click on the widget).

closes odoo/odoo#21625

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-04-24 15:17:42 +00:00
Christophe Monniez f60636aefa [IMP] web_tour: add a startTour helper on odoo
As a start_tour helper was added on the python side (PR #32316),
a javascript helper counterpart was needed as suggested on the PR.

closes odoo/odoo#32441

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-05 08:53:14 +00:00
61b59c031f [REF] web_tour: adapt code after jQuery update
Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-06 20:07:17 +01:00
Christophe Monniez fec86404e7 [IMP] tests: replace browser_js success and failure strings
When evaluating js tests using the browser_js method, they are
considered a success when 'ok' is found in the console log and a failure
if 'error' is found instead.

This is not very robust and recently failed with this commit : 7410de111f
It adds a filter named 'Error' in a view, when the 'click_all' test
clicks on this filter, a message with the name of the filter is written
in the console, wrongly leading to a test failure.

With this commit, the browser_js method expects a log message in the
browser console with the explicit text "test successful".
On the other hand, any error in the console log will lead to a test
failure but a test can be forced to fail with the explicit error message
in the browser console "test failed".

As a bonus, the python logger should now also log browser js trace messages.

closes odoo/odoo#31158
2019-02-19 08:06:07 +00:00
Aaron Bohy 872c11dda4 [FIX] web_tour: consume step on click
Before this rev., steps were consumed on 'mousedown' events. This
caused an issue with the RainbowMan displayed at the end of tours
(which closes itself on 'click' events outside its $el).

Here is what occured when the user clicked on the last step's
element:
 - 'mouseenter' event triggered
 - current step consumed, as well as the tour, and a RainbowMan
   is instantiated and appended to the DOM
 - 'click' event triggered
 - RainbowMan closes itself because of that 'click' event

closes odoo/odoo#31148
2019-02-15 12:35:54 +00:00
Christophe Simonis cf52a04979 [MERGE] forward port branch saas-12.1 up to d3b8422c9c
closes odoo/odoo#30614
2019-01-28 13:58:11 +00:00
Christophe Simonis a337b9ec92 [MERGE] forward port branch 12.0 up to f854e01a98 2019-01-18 14:26:33 +01:00
qsm-odoo 606bae9e92 [FIX] web_tour: ensure Tip template is loaded
The 500 page has `session.is_frontend === undefined` as it has its own
whole HTML template.
In that case, the ajax.loadXML is not done, making the tour crash when
visiting a 500 error page.

This is needed for #29957 that has a test tour on 500 error page.

closes odoo/odoo#30240
2019-01-17 11:53:09 +00:00
Christophe Simonis 8aa8548d8a [MERGE] forward port branch 12.0 up to 3e4138deaa
closes odoo/odoo#30045
2019-01-09 15:56:53 +00:00
Odoo Translation Bot 652cecffde [I18N] Update translation terms from Transifex 2019-01-06 01:32:05 +01:00
Aaron Bohy b4387108de [FIX] web_tour: clear call stack between each step
This rev. concerns automatic executions of tours. It makes each
step executed in a setTimeout, thus ensuring that the call stack
has been emptied before executing the next step (which is the case
when the user manually executes the flow).
2019-01-14 11:29:53 +00:00
Aaron Bohy 6f7f235799 [FIX] web_tour: remove delay in test mode
For historical reasons, the tour manager executed each step of tour
in a setTimeout (10ms). When a step could be executed (i.e. when
its trigger selector has a match in the DOM), the element matching
its trigger was saved as a jQuery element (the $anchor), and in the
setTimeout, the action (e.g. click) was performed on that element.

However, it could happen that, after the delay, the $anchor was no
longer in the DOM, either because
 1) the tip selector had no match anymore, meaning that the element
    had been removed from the DOM meanwhile
 2) the tip selector still had a match in the DOM, but that element
    had been rerendered meanwhile
Case 2) occured sometimes when the main_flow_tour was executed in
community, when trying to open a Manufacturing Order after having
reloaded the Manufacturing Order list view (because the row of the
order to open that was saved as $anchor was the one of the list
before the reload, and that list was re-rendered during the delay).

This rev. removes the default delay of 10ms, but the feature is
kept such that one can still manually run a tour slowly (e.g. to
debug or to make a demo).
2019-01-14 11:29:53 +00:00
Christophe Simonis f351dd8cab [MERGE] forward port branch 12.0 up to 047e2b28de 2018-12-12 11:38:25 +01:00
Odoo Translation Bot 47aae6faba [I18N] Update translation terms from Transifex 2018-12-23 01:29:13 +01:00
Odoo Translation Bot ec4ee14c89 [I18N] Update translation terms from Transifex 2018-12-09 01:16:26 +01:00
Sébastien Theys 87d75f78d6 [IMP] web_tour: allow simulating click without leave
This is important if the mouse must stay on the element after it has been
clicked. This is the case for the product image zoom, which will be tested in
the following commit.
2018-12-18 13:02:06 +00:00
Odoo Translation Bot 3ce5c8bebd [I18N] Update translation terms from Transifex 2018-12-16 01:18:51 +01:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Christophe Simonis e1f9499d26 [MERGE] forward port branch 12.0 up to 053bb45706 2018-12-05 18:46:15 +01:00
Antoine GuenetandGorash eb0ea8efbe [ADD] web_editor,*: Tests for new structure of web editor
The refactoring also had to be done in order to create a set of unit
tests.
Each behavior can be tested, including the behaviors performed as a
consequence of keyboard interactions (for instance: Enter, Tab...).
This commit also contains some changes to test_utils that were
necessary given the new structure of the wysiwyg editor.

Co-authored-by: Gorash <chm@odoo.com>
2019-01-17 08:40:21 +00:00
Christophe Simonis ce4cc24621 [MERGE] forward port branch 12.0 up to 82a1e1dcc3 2018-11-29 20:06:16 +01:00
Christophe Simonis 7a0243ec15 [MERGE] forward port branch 12.0 up to b3052b690f 2018-11-23 12:11:32 +01:00
Christophe Monniez ff051bf829 [IMP] web_tour: better logs in case of failure
With this commit, a failing tour will display more information in the logs,
which may be useful for debugging purpose.

- display full html instead of just the content of body
- display the 'content' flag of the step, which is very useful to see
  which step failed

closes odoo/odoo#28863
2018-11-21 09:23:17 +00:00
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01:00
Nicolas Seinlet 1512f1d60a [IMP] web_tour: restrict tour access to own ones
Even if only admin can access all tours, retrict tour access
to own user

closes odoo/odoo#28736
2018-11-15 16:11:03 +00:00
Odoo Translation Bot dcc077afc5 [I18N] Update translation terms from Transifex 2018-11-11 01:26:46 +01:00
Odoo Translation Bot 790bd62f14 [I18N] Update translation terms from Transifex 2018-11-04 01:27:12 +01:00
Odoo Translation Bot 29dc21ae4b [I18N] Update translation terms from Transifex 2018-10-28 01:25:21 +02:00
Géry Debongnie f0a7d69dcf [FIX] web_tour: only allow one active tip at once
Before this commit, the code for the tour system was kind of naive and
simply activated tips for each tour.  This was not really an issue,
since most user install one app at a time, so they had the time to
follow a tour, and when they install the next app, it is no longer
active.

However, since we activated the multi-app feature in our website, it now
happens that multiple apps are installed at once.  Because of this, this
commit is now necessary.

closes odoo/odoo#28178
2018-10-26 08:30:48 +00:00
Nicolas Lempereur a4f34c6480 [FIX] web_tour: tooltip message over document viewer
Currently:

- normal modals have a z-index of 1050 ($zindex-modal)
- chat window have a z-index of 1051
  ($zindex-model + 1 == $o-mail-thread-window-zindex)
- document viewer modal have a z-index of 1052
  ($o-mail-thread-window-zindex + 1)
- tour tooltip ball and messages have a z-index of 1051 ($zindex-modal)

A tooltip ball is in the DOM next to the element that is pointed out, so
if the element is inside a document viewer modal we see the ball.

But a tooltip message is positioned inside the body, so if we hover a
ball inside the document viewer modal, the tooltip message is behind the
modal.

In this commit, we set tooltip to bootstrap $zindex-tooltip value (1070
a of now).

opw-1893035
closes #27928
2018-10-23 08:49:52 +00:00
Martin Geubelle 717111479b [FIX] web: do not block tour with blockUI
A previous rev. odoo/odoo@2672143 has prevented a tip to be consumed
in automated tours when blockUI was displayed.

This condition is not exactly correct. A blockUI element can be displayed
on any node, not only the webclient (which is the case when calling
`framework.blockUI`. This is the use case we want to deal, not the others.

So the tip cannot be consumed only with `o_ui_blocked` now.

closes odoo/odoo#28060
2018-10-23 10:23:06 +00:00
Odoo Translation Bot de265ce63e [I18N] Update translation terms from Transifex 2018-10-21 01:25:56 +02:00
Odoo Translation Bot e774b2cb1c [I18N] Update translation terms from Transifex 2018-10-14 01:23:43 +02:00
Odoo Translation Bot 07f6b8ef57 [I18N] Update translation terms from Transifex 2018-11-25 01:26:32 +01: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
Julien (juc) Castiaux e451a3e955 [FIX] web_tour: adjust ACLs to allow tour disabling
Run odoo-bin using "--without-demo=all"
Install any module (I used CRM)
On the main page, a droplet should appear under the newly installed module
As admin, using the debug mode, click on the "Disable tour" button
The action is restricted due to the missing ACL

opw-1890350

closes odoo/odoo#27655
2018-10-11 12:12:18 +00:00
Odoo Translation Bot b6c8919444 [I18N] Update translation terms from Transifex 2018-10-07 02:27:57 +02:00
Odoo Translation Bot a01c1bf5bf [I18N] Update translation terms from Transifex 2018-09-30 02:25:45 +02:00
Odoo Translation Bot 1d79bf0273 [I18N] Update translation terms from Transifex 2018-09-23 02:29:29 +02:00
Martin Trigaux ae1fed50d5 [I18N] export saas-11.5 source terms 2018-09-21 16:32:59 +02:00
Vincent Schippefilt cfbdba7ff2 [FIX] web_tour: drag&drop trigger a mouseenter event before beginning the drag 2018-09-20 11:10:34 +02:00
Aaron Bohy 66c716d781 [FIX] *: adapt calls to _is_superuser
Rev. 2f7c03d added a second admin user (id 2), the 'human' one, on
top of the 'technical' one (id 1, also known as the superuser).
Basically, all calls to _is_superuser() should have been changed to
_is_admin(). They weren't. As a consequence, some features that
were previously available for the admin weren't anymore (e.g.
tours).

This rev. replaces all calls to _is_superuser() by calls to
_is_admin().
2018-09-18 20:31:28 +02:00
Odoo Translation Bot 53908da50c [I18N] Update translation terms from Transifex 2018-09-18 18:08:33 +02:00
Martin trigaux 710f67ad4b [I18N] export saas-11.5 source terms
To match new model_terms syntax
2018-09-18 14:30:04 +02:00
Alexandre Kühn 81bce622bc [FIX] web_tour: place tooltip above dropdown-menu
Before this commit, a tip on a dropdown menu item was visible.

This is due to the positioning of the tip, which was on the
dropdown-menu (because it has overflow `auto`). The tip was
appended on the dropdown-menu, and may overflow as a result.

This commit handles specifically the case of dropdown-menu,
so that dropdown-menu is never a candidate for the placement
of the tip.
2018-09-17 16:46:53 +02:00
Alexandre Kühn 38c7ed3c73 [FIX] *: adapt tours for the new community navbar
*: crm,
   hr_expense,
   hr_recruitment,
   point_of_sale,
   project,
   sale,
   stock,
   web_tour,
   test_main_flows,
   test_new_api

To sum up:
- Click on "Apps Menu" then the app item.
  (previously: click on '+' then the app item).
- Click on navbar section menu item.
  (previously: click on sidebar section menu item).
2018-09-17 16:46:53 +02:00
Odoo Translation Bot e9111f46a6 [I18N] Update translation terms from Transifex 2018-09-16 02:21:25 +02:00
Odoo Translation Bot 0b2349ee41 [I18N] Update translation terms from Transifex 2018-09-14 11:30:58 +02:00
Odoo Translation Bot 956720ed7f [I18N] Update translation terms from Transifex 2018-09-09 02:25:15 +02:00
Odoo Translation Bot e8606ce00b [I18N] Update translation terms from Transifex 2018-09-02 02:24:05 +02:00