Community mailing list archives

Accessing user from qweb template in view

Torvald Baade Bringsvor, Torvald B. Bringsvor
- 03/20/2015 07:45:36

I'm trying to solve the following:

A field should be editable for members of one group only, it should be read only for everyone else.

Using the group attribute in the field tag in the view doesn't work since we need to display the field for the users who are not members.
So I tried adding a little qweb template to the view to be able to do a t-if on the group membership if the users, but I can't find anywhere in the docs what kind of data you have available when you are in a regular view (not a website view).

Can anyone shed some light on this? Or is there some way to resolve this in plain XML view lingo?


Torvald Baade Bringsvor
Bringsvor Consulting AS - Odoo (formerly OpenERP) implementation partner