I have written a simple views/menu_items.xml to make a basic view of res.patner to test how tour works in odoo
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<act_window id="action_all_customers"
name="All customers"
res_model="res.partner"
view_mode="list,form"
domain="[('customer', '=', True)]"
context="{'default_customer': True}"
limit="80" />
<menuitem id="menu_custom_toplevel"
name="My custom menu" />
<menuitem id="menu_custom_left"
parent="menu_custom_toplevel"
name="This will appear in the left bar" />
<menuitem id="menu_all_customers"
parent="menu_custom_left"
action="action_all_customers"
sequence="10"
groups="" />
</odoo>
and in the project/static/src/js I worte a simple 2 step tour with the name example tour
odoo.define('example.tour',function(require){
"use strict";
var core =require('web.core');
var tour =require('web_tour.tour');
var _t=core._t;
tour.register('example_tour',{
url:"/web",
},[tour.STEPS.MENU_MORE,{
trigger:'.oe_menu_toggler[data-menu-xmlid="chap10.menu_custom_toplevel"]',
content:_t('Want to <b>create customers</b>?<br/><i>Click on My customer menu to start.</i>'),
position:'bottom',
},
{
trigger: '.o_list_button_add',
content: _t('Let\'s create your first customer.'),
position: 'right',
width: 200,
}
]);
});
I have written the asset file as well. In odoo when I start my "example.tour" from start tour from the developer tours it works fine and shows me the tour running quickly but how do I make the tour appear automatically when I login it did sometimes appear automatically for other tours and sometimes for my tour but I don't how
the solution is simple delete the cookies on the odoo page this will solve the problem. and if that dosent work in odoo you have to activate developer mode (with assets) go to settings on the right corner of the page there you will find the option activate developer mode (with assets) press on it and then after that on your left corner of the scree there is the dashboard in (General Settings Technical>User interface>Tours) and delete the tours you want to reuse