Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
4563 Visualizzazioni

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

Avatar
Abbandona

Why not with security rules from the CSV/XML?

Autore

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

Risposta migliore

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
Abbandona
Risposta migliore
Use fields_view_get method and make it ['edit'] = 'false'
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
ago 25
2753
3
feb 25
3964
0
mag 24
46
1
apr 24
3597
4
set 23
5150