This question has been flagged
4 Replies
3170 Views

I have a EDIT button, how i can disable or remove this functionality from my python code, when i press button.

Avatar
Discard

Why not with security rules from the CSV/XML?

Author

How i can do this, when i clicked on my button

Best Answer

Hi,

You can remove edit button by changing write access of a model to '0' in security files or by setting edit = false in that models form view.

eg:

<record id="sales_commission_form_view" model="ir.ui.view">
<field name="name">sales.commission.form</field>
<field name="model">sales.commission</field>
<field name="arch" type="xml">
<form create="false" edit="false" delete="false">

Regards

Avatar
Discard
Best Answer
Use fields_view_get method and make it ['edit'] = 'false'
Avatar
Discard