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

I'm disabling the delete default button and I'm adding a new unlink button to one2many field. When I open the form, the button isn't clickable, I need to save first and edit the form to be able to click on it. 

My questions :

  •  Is there any solution to make the button clickable before saving? 
  • Is it possible to add a condition to the default delete button?

exemple in the comment


形象
丢弃
编写者

<field name="config_model_field_ids">
<tree readonly="0" delete="false" create="false" editable="bottom">
<field name="field_id"
options="{'no_create': True,'no_open': True}"
force_save="1"
context="{'name_only': True}"
readonly="1"/>
<field name="readonly"/>
<field name="config_model_id" invisible="1"/>
<field name="required"/>
<field name="updatable"
attrs="{'readonly': [('readonly', '=', True)]}"/>
<button name="unlink"
attrs="{'invisible': [('required', '=', True)]}"
class="btn-danger" style="background-color:#BB6464;" type="object"
icon="fa-trash"/>
</tree>
</field>

最佳答案

Did you find a solution to your issue ?

形象
丢弃
相关帖文 回复 查看 活动
0
1月 20
3618
3
7月 25
22132
0
9月 23
144
0
7月 23
2445
1
7月 20
2793