Hi,
In v9 i was created popup form and added my custom Save and Cancel buttons, now in v10 that form shows both, my created Save Cancel and default Save Cancel
.
how to hide default buttons? i have tried on .py file which calls form add:
'flags': {'form': {'action_buttons': False},}
but nothing changed.
my code:
return
{
'name': _('Choose agreement type'),
'view_type': 'form',
'view_mode': 'form',
'res_model': 'sale.order',
'view_id': form.id,
'type': 'ir.actions.act_window',
'target': 'new',
'res_id': self.id,
'flags': {'form': {'action_buttons': False},}
}
form:
<record id="wizard_state_agreement" model="ir.ui.view">
<field name="name">sale.order.wizard_state_agreement</field>
<field name="model">sale.order</field>
<field name="arch" type="xml">
<form string="Please chose agreement type">
<sheet>
<group>
<field name="agreement_choose"/>
</group>
</sheet> <div>
<button name="change_state_agreement" string="Save" type="object" class="btn btn-primary"/>
<button special="cancel" string="Cancel" class="btn btn-default"/>
</div>
</form>
</field>
</record>