Protect Cancel button with a confirmation pop-up
This commit is contained in:
@@ -16,6 +16,8 @@ class PurchaseOrder(models.Model):
|
||||
fiscal_position_id = fields.Many2one(track_visibility='onchange')
|
||||
incoterm_id = fields.Many2one(track_visibility='onchange')
|
||||
partner_ref = fields.Char(track_visibility='onchange')
|
||||
# field 'partner_id': native value for track_visibility='always'
|
||||
partner_id = fields.Many2one(track_visibility='onchange')
|
||||
# for report
|
||||
delivery_partner_id = fields.Many2one(
|
||||
'res.partner', compute='_compute_delivery_partner_id', readonly=True)
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
<field name="fiscal_position_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
<button name="button_cancel" type="object" position="attributes">
|
||||
<attribute name="confirm">Are you sure you want to cancel this purchase order?</attribute>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user