The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it -
creation/update: a mandatory field is not correctly set
[object with reference: name - name]
class Employee(models.Model):
_name = "hr.employee"
_description = "Employee"
_order = 'name_related'
_inherits = {'resource.resource': "resource_id"}
# _inherit = 'res.partner'
_inherit = ['mail.thread']
_inherit = 'res.partner'
firstname = fields.Char("First name")
lastname = fields.Char("Last name")
name = fields.Char(compute='comp_name', store=True)
@api.depends('firstname','lastname')
def comp_name(self):
self.name = (self.firstname or '')+' '+(self.lastname or '')
can i get any solution please??