Odoo Help


1 Answer

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--

| 4 4 11
Jodoigne, 比利时
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013.

He is now the Team Leader of the Website Team and support of our own website odoo.com.

Jérémy Kersten (jke)
2015/1/26 下午4:19


I'm not sure that  you can use groups in Qweb js.

Why not use the same code that in im_chat.js

    if (openerp.web && openerp.web.Model) {
        // Put the ImTopButton widget in the systray menu if the user is an employee
        var Users = new openerp.web.Model('res.users');
        Users.call('has_group', ['base.group_user']).done(function(is_employee) {
            if (is_employee) {

Good luck

Anubía, soluciones en la nube, S.L., Alejandro Santana
2015/1/27 下午6:22

Aaaaahhh... I just don't know a bit of javascript (yet). Is there any documentation on how to extend/override that in Odoo? I could change the group there, but I don't know how to use inheritance in Odoo js.

Jérémy Kersten (jke)
2015/1/28 上午4:21

You can find a tuto here : https://www.odoo.com/documentation/8.0/howtos/web.html And Js documentation here : https://www.odoo.com/documentation/8.0/reference/javascript.html The simple way for you (not the more elegant way), will be to remove the button if not respected your conditions. The code from previous Answer is from master, take a look in im_chat from version 8.

Anubía, soluciones en la nube, S.L., Alejandro Santana
2015/2/11 下午12:43

I finally solved it as explained here: https://www.odoo.com/es_ES/forum/help-1/question/how-to-override-js-code-in-odoo-75335

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now