[IMP] delivery: Add confirm to cancel shipment button to avoid doing it by mistake.

TT38655

closes odoo/odoo#98846

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
Víctor Martínez
2022-09-07 23:10:45 +02:00
parent f3974bea4b
commit 8d8857928b
+1 -1
View File
@@ -236,7 +236,7 @@
<label for="carrier_tracking_ref"/>
<div name="tracking">
<field name="carrier_tracking_ref" class="oe_inline" attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}"/>
<button type='object' class="fa fa-arrow-right oe_link" name="cancel_shipment" string="Cancel" attrs="{'invisible':['|','|','|',('carrier_tracking_ref','=',False),('delivery_type','in', ['fixed', 'base_on_rule']),('delivery_type','=',False),('state','not in',('done'))]}"/>
<button type='object' class="fa fa-arrow-right oe_link" confirm="Cancelling a delivery may not be undoable. Are you sure you want to continue?" name="cancel_shipment" string="Cancel" attrs="{'invisible':['|','|','|',('carrier_tracking_ref','=',False),('delivery_type','in', ['fixed', 'base_on_rule']),('delivery_type','=',False),('state','not in',('done'))]}"/>
</div>
<label for="weight" string="Weight"/>
<div>