El 30/07/15 a les 16:35, Jean Cavallo ha escrit:

2015-07-30 16:30 GMT+02:00 Sergi Almacellas Abellana <[email protected]
<mailto:[email protected]>>:

    There is some way to implement it without restricting create/delete
    access to sale.line model?


I had this problem, and solved it by patching the client to hide the
toolbar with an option to set in the view definition.


Mmm... I don't think this is the right solution for my case as I want the use to be able to navigate throw lines, open form view, and change view if they want.

I would be delighted if you found another solution !


I just get a solution that worked for me. I added a acces rule to the One2Many field disabling the creation and deletion access, so now the buttons are disabled on the client.

If you're interessed just add something like this on your xml definition:

<record model="ir.model.field.access" id="dashboard_sale_lines_access">
<field name="field" search="[('model.model', '=', 'model_name'), ('name', '=', 'field_name')]"/>
   <field name="perm_read" eval="True"/>
   <field name="perm_write" eval="True"/>
   <field name="perm_create" eval="False"/>
   <field name="perm_delete" eval="False"/ >
</record>



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

Reply via email to