跳至内容
菜单
此问题已终结
4 回复
4573 查看

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

形象
丢弃

Why not with security rules from the CSV/XML?

编写者

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

最佳答案

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

形象
丢弃
最佳答案
Use fields_view_get method and make it ['edit'] = 'false'
形象
丢弃
相关帖文 回复 查看 活动
2
8月 25
2754
3
2月 25
3969
0
5月 24
46
1
4月 24
3597
4
9月 23
5154