On Thu, Jul 10, 2014 at 1:25 AM, Cédric Krier <cedric.kr...@b2ck.com> wrote:
> On 09 Jul 19:14, Guillem Barba Domingo wrote: > > You can set the allowed groups to a button. > > Search "button" in *.xml of modules (not in view directory) and you will > > find the solution. > > > > Today I realized that the button is not hidden but if you try to click on > > it it raise an error. I tried it on "Force assign" button. > > Why the button is not hidden? > > If you don't have access, the button is readonly: > > > http://hg.tryton.org/trytond/file/62f1b9747e9f/trytond/model/modelview.py#l441 > > *File account_invoice/invoice.xml line233 - 271. * http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/invoice.xml#l233 It provide the access for the cancel, post, validate_invoice button. But when I using the same method to give the "pay" button (can be find at http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/view/invoice_form.xml#l62 ) It still give the readonly state. So is there any different for giving access normal button with the wizard button ( http://hg.tryton.org/modules/account_invoice/file/09da725cfc13/invoice.py#l1372 )? @ModelView.button_action('account_invoice.wizard_pay') def pay(cls, invoices): pass > > I think it would be better UX, but I don't investigated if it's hard to > > impement. > > Are you sure you closed the client before testing new configuration > because views are cached by the client. > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: cedric.kr...@b2ck.com > Tel: +32 472 54 46 59 > Website: http://www.b2ck.com/ >