[FIX] Project: Tour tips displayed in other apps

- Description: before this fix, some tips of the project tour poped up
in other apps when the tour was not finished. With this fix, those
particular tips are only displayed in the project app.

- Implementation: Some triggers used in the project tour are generic
class that are also used in other modules (in this case, classes
related to the chatter). When leaving the tour at those steps, the
tip in question will pops up every time this class appears in other
apps (i.e. often for classes related to the chatter). To fix this, the
parameter extra-trigger is used for tour steps related to a generic
class.

closes odoo/odoo#110716

Task: 3024151
X-original-commit: c8f86844a427e0f9665b6f9c5e9e182795fb809e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
Hugo Carlier (Huca)
2023-01-23 19:28:46 +01:00
parent b119cca37b
commit 07f6362268
@@ -87,12 +87,14 @@ tour.register('project_tour', {
position: "bottom",
}, {
trigger: ".o_ChatterTopbar_buttonSendMessage",
extra_trigger: '.o_form_project_tasks',
content: Markup(_t("Use the chatter to <b>send emails</b> and communicate efficiently with your customers. \
Add new people to the followers' list to make them aware of the main changes about this task.")),
width: 350,
position: "bottom",
}, {
trigger: ".o_ChatterTopbar_buttonLogNote",
extra_trigger: '.o_form_project_tasks',
content: Markup(_t("<b>Log notes</b> for internal communications <i>(the people following this task won't be notified \
of the note you are logging unless you specifically tag them)</i>. Use @ <b>mentions</b> to ping a colleague \
or # <b>mentions</b> to reach an entire team.")),
@@ -100,9 +102,11 @@ tour.register('project_tour', {
position: "bottom"
}, {
trigger: ".o_ChatterTopbar_buttonScheduleActivity",
extra_trigger: '.o_form_project_tasks',
content: Markup(_t("Create <b>activities</b> to set yourself to-dos or to schedule meetings.")),
}, {
trigger: ".modal-dialog .btn-primary",
extra_trigger: '.o_form_project_tasks',
content: _t("Schedule your activity once it is ready."),
position: "bottom",
run: "click",