Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2878 Näkymät

Hi everyone,

Say we have a sale team with access to a view form with a custom button in it.

If one of them login with his own odoo account and click on that button, is there a method to log that it is him that click on that button, a this time, etc ?


Thank you for your help.

Avatar
Hylkää
Tekijä Paras vastaus

Hi everyone,

I found a way.

in the action definition triggered by the button. You can access current user like this:

def test_identifier(self):
_logger.error("TEST LOG USER ID" + self.env.user.name)

I hope this will help
Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
jouluk. 23
2977
2
lokak. 23
6156
3
syysk. 23
3029
0
toukok. 23
2986
1
toukok. 23
2338