Dear Sergi, On Tue, Mar 21, 2017 at 4:06 PM, Sergi Almacellas Abellana <se...@koolpi.com > wrote:
> 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 > > Thanks a lot. I opened Admin -> Model -> Model Access -> Buttons and tried to create a new record but I can not enter the values for Model and Name. The only thing I can select is the group which is not sufficient to save the record. Is this the right place to add access rule for buttons? Or, I should define these rules in the xml files? -- Regards, Khurram. -- 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/CAM3N3CwAWoYvM77JPFGjidzDp%3DPhgA1t6KGN3%3DnHdD5ihvDrGg%40mail.gmail.com.