Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2272 Weergaven

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


Avatar
Annuleer
Auteur

<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>

Beste antwoord

Did you find a solution to your issue ?

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
jan. 20
3631
3
jul. 25
22147
0
sep. 23
144
0
jul. 23
2453
1
jul. 20
2799