Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
6860 Vizualizări

hello guys can i add button on main navigation bar at the top same line with the login user? thanks in advance :)

Imagine profil
Abandonează
Cel mai bun răspuns

Create a custom xml template for the button ie

<templates>

<t t-name="MyModule.TopButtonMenu">
<li class="o_mail_navbar_item">
<button>My Button</button>
</li>
</t>
</templates>

And place it at the top menu with javascript

odoo.define('MyModule.TopButton', function(require) {
"use strict";
​var SystrayMenu = require('web.SystrayMenu');
var TopButton = Widget.extend({
template:'MyModule.TopButtonMenu',
events: {
"click": "on_click"
},
on_click: function (event) {
//do action
}
});
SystrayMenu.Items.push(TopButton);
});
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
oct. 20
4000
0
aug. 19
3979
1
aug. 19
10314
2
iul. 23
784
0
mai 20
2618