[6.0.1] HR-category: many2many link defined incorrectly

Bug #731332 reported by Jeroen Mollers
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

Version: 6.0.1

Module: hr

The many2many link (category_ids) between hr_employee and hr_employee_category is defined incorrectly. The category_id and emp_id foreign keys are swapped.

The many2many field hr_employee.category_ids is currently defined as:
fields.many2many('hr.employee.category', 'employee_category_rel','category_id','emp_id','Category'),

It should be defined as (note the swap of category_id and emp_id):
fields.many2many('hr.employee.category', 'employee_category_rel','emp_id','category_id','Category'),

The incorrect definition leads to incorrect foreign key constaints on the employee_category_rel table.

Jeroen

Related branches

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello Jeroen,

I have fixed the problem in lp:~openerp-dev/openobject-addons/trunk-bug-731332-ara branch. It will be merge soon with trunk addons.

Revision ID: <email address hidden>
Revision No: 4504

Thank you,
ara

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
milestone: none → 6.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.