Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
6678 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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);
});
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
paź 20
3765
0
sie 19
3803
1
sie 19
10112
2
lip 23
784
0
maj 20
2529