The column parent_id on object hr.department must be set as ondelete='cascade' or 'restrict'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenERP - Human Resources |
Fix Released
|
Undecided
|
Sandy Carter (http://www.savoirfairelinux.com) |
Bug Description
Note: This only happens with hr_department_
The parent_id field in the hr.department object does not have an on_delete value which causes OpenERP to display the following message when loading records which specify parents through an xml:
ERROR db openerp.osv.orm: The column parent_id on object hr.department must be set as ondelete='cascade' or 'restrict'
Steps to reproduce (Module included as tar.bz2):
- Create a module which depends on hr_department_
- To the module, add an hr_data.xml file such as this:
<?xml version = "1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="dep_parent" model="
<field name="name">Parent department</field>
</record>
<record id="dep_child" model="
<field name="name">Child department</field>
<field name="parent_id" ref="dep_parent"/>
</record>
</data>
</openerp>
- Start OpenERP, installing the module, the message will display
This is not a show stopper: OpenERP will keep running, but it can trigger testing environments.
Related branches
- Daniel Reis: Approve
- Maxime Chambreuil (http://www.savoirfairelinux.com): Approve (code review)
-
Diff: 11 lines (+1/-0)1 file modifiedhr_department_sequence/hr_department.py (+1/-0)
Changed in openerp-hr: | |
assignee: | nobody → Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) |
no longer affects: | openerp-travel |
Changed in openerp-hr: | |
status: | New → Fix Committed |
Changed in openerp-hr: | |
status: | Fix Committed → Fix Released |