El 21/03/17 a les 11:58, Khurram Shahzad ha escrit:
Dear All,

Hi Khurram,

I have created a model and given 'read' and 'write'  access to a user. I
have placed an action button on this model's form view so that user can
start a wizard which uses the ID of the model to do something. The user
can see the button enabled and can start the wizard by clicking it.

Now. what we want is to disallow the user to 'change' the record. For
this, we removed 'write' access from the user. As a side effect, the
action button was also disabled. How can we keep this action button
enabled with read only access on the model?

You should explicitly gran access to this button to the user [1]. If no access rules exist for the button only users with write access on the model are allowed to click it[2]

Hope it helps!


[1] http://doc.tryton.org/4.2/trytond/doc/topics/access_rights.html?highlight=button#button [2] http://hg.tryton.org/trytond/file/dc9bcb369211/trytond/model/modelview.py#l596

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/3e83abbf-0f0f-9c7c-7dd1-792e467c60fa%40koolpi.com.

Reply via email to