Shravy
Shravy

Reputation: 666

How to resolve this error in OpenErp?

I have been trying the following code in openerp and I had been getting this error

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]

In my py file, i had inherited one module

class hr_expense_expense(osv.osv):
_name = "hr.expense.expense"
_inherit = "hr.expense.expense"
_inherits = {'hr.employee':'first_approver'}

Upvotes: 0

Views: 1408

Answers (1)

Daniel Reis
Daniel Reis

Reputation: 13342

You don't give details, but I'm pretty sure the _inherits line should be removed. You probably made a confusion and actually want to add Many2one relation.

Upvotes: 2

Related Questions