This code should work:
<?xml version="1.0"?>
<openerp>
....
<data>
<!-- removes John Smith-->
<function model="hr.contract" name="unlink">
<function eval="[[('employee_id', '=', ref('emp_john_smith'))]]" model="hr.contract" name="search"/>
</function>
<function model="hr.employee" name="unlink">
<!-- ids = --> <value eval="[ref('emp_john_smith')]"/>
</function>
</data>
</openerp>
But its a little risky remove an hr.employee because it has a lot of related entities. Maybe is better "deactivate" them like this:
<?xml version="1.0"?>
<openerp>
....
<data noupdate="1">
<!-- deactivates John Smith -->
<function model="hr.employee" name="deactivate">
<!-- ids = --> <value eval="[ref('emp_john_smith')]"/>
</function>
</data>
</openerp>
where deactivate is a method like this:
class hr_employee(Model):
_name = str('hr.employee')
_inherit = str('hr.employee')
def deactivate(self, cr, uid, ids, context=None):
if isinstance(ids, (int, long)):
ids = [ids]
vals = {'active': False}
res = super(hr_employee, self).write(cr, uid, ids, vals, context)
return res