Skip to Content
Menu
This question has been flagged
4 Replies
4561 Zobrazenia

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

Avatar
Zrušiť

Why not with security rules from the CSV/XML?

Autor

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
Zrušiť
Best Answer
Use fields_view_get method and make it ['edit'] = 'false'
Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
aug 25
2753
3
feb 25
3964
0
máj 24
46
1
apr 24
3597
4
sep 23
5150