There are 3 core methods that are related to a record. They are Create, Write, and Unlink. You can call them Create, Update, and Delete.
To override a model create/update/delete functions in Odoo, you can create a new module that extends the original model and adds the new functionality.
Overriding these functions is simple. Here are the codes:
class CustomModel(models.Model):
_name='custom.info'
name = fields.Char('name')
@api.model
def create(self, values):
res = super(CustomModel,self).create(values)
return res
@api.multi
def write(self, values):
res = super(CustomModel, self).write(values)
return res
@api.multi
def unlink(self, values):
res = super(CustomModel, self).unlink()
return res