On 10 Jul 08:52, Markus Bala wrote: > On Thu, Jul 10, 2014 at 3:19 AM, Cédric Krier <cedric.kr...@b2ck.com> wrote: > > > On 10 Jul 01:48, Markus Bala wrote: > > > 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. > > > > I don't understand. > > > > Below is the access i made for the "Pay" button: > <record model="ir.model.button" id="invoice_pay_button"> > <field name="name">pay</field> > <field name="model" search="[('model', '=', > 'account.invoice')]"/> > </record> > <record model="ir.model.button-res.group" > id="invoice_pay_button_group_cashier"> > <field name="button" ref="invoice_pay_button"/> > <field name="group" ref="account.group_cashier"/> > </record> > > The result of the pay button, readonly.
It sounds normal if you are not in the group 'account.group_cashier' which by the way doesn't exist in account module. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
pgps7X7sZdX5N.pgp
Description: PGP signature