I want to get and display current login user name
in qweb report
in odoo. Can someone please tell me, how can i do it or give me some example code. I'll be very thankful...!
The request
variable will always be available in a qweb context. You can use request.env.user
object. Hence in a report, you can insert something like: <span t-esc="request.env.user.name"/>
.
You can use "user" in your qweb template to get details of current login user, it is record of res.users.
To print the user name
<span t-esc="user.name"></span>
Click here to see more
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With