23 lines
634 B
JavaScript
23 lines
634 B
JavaScript
/** @odoo-module **/
|
|
|
|
import { registry } from "@web/core/registry";
|
|
import { rpc } from "@web/core/network/rpc";
|
|
|
|
registry.category("web_tour.tours").add('test_json_auth', {
|
|
steps: () => [{
|
|
trigger: 'body',
|
|
run: async function () {
|
|
await rpc('/test_get_dbname').then( function (result){
|
|
return rpc("/web/session/authenticate", {
|
|
db: result,
|
|
login: 'admin',
|
|
password: 'admin'
|
|
});
|
|
});
|
|
window.location.href = window.location.origin;
|
|
},
|
|
}, {
|
|
trigger: 'span:contains(Mitchell Admin), span:contains(Administrator)',
|
|
}
|
|
]});
|