2013/10/2 Josias Pérez <jep...@gmail.com>

> Hi,
>
> I'm working for a POS module on tryton.
>
> At the moment, have 2 question:
>
> 1. We create a group called Team Sales, that can access to Sales and Sales
> Lines, but we want that they can't view some fields (specially related to
> cost_price). We can hide on fields permission, but at the same time, they
> need to create stock moves, that requiere to read cost_price. The question
> is how to hide the field (cost_price) only in the view, but still can read
> for create the stock moves. They can't see the stock moves, only create
> that.
>

define an 'states' attribute that set 'invisible' the field if user is not
in the required fields:
field_name = fields.XXX(..., states={
        'invisible': Not(Eval('groups', []).contains(Id('MODULE',
'GROUP_XML_ID'))),
        })


2. How to give access permission to buttons that call wizards? They aren't
> listed neither on button neither in wizard permission access.
>

I supose the button get permissions from wizard (if user has permissions
over wizard can see the button). It make sense.

-- 
Guillem Barba
http://www.guillem.alcarrer.net

Reply via email to