As normal button can add confirm info as
<button name="lock" string="lock" type="object" confirm="Are you sure you want to lock this record?"/>
So how should I do this action on "save button" to let web pop-up a dialog box before I confirm. Or is there any way to pop-up dialog box to let me confirm after I clicked "save button",I try to use code as follow:
@api.constrains('data_file', 'filename', 'chip_type')
def get_data(self):
self.show_dialog()
do something...
def show_dialog(self)
return {'warning': {
'title': "confirm",
'message': "Are u sure u want to save the record?",
},
}
But the dialog did't show after I clicked 'save button',it seems only using @api.onchange with show_dialog function works,so how should I change my code?
Thanks a lot.