Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
4568 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

Why not with security rules from the CSV/XML?

Tác giả

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
Use fields_view_get method and make it ['edit'] = 'false'
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 25
2754
3
thg 2 25
3965
0
thg 5 24
46
1
thg 4 24
3597
4
thg 9 23
5151