← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 731332] Re: [6.0.1] HR-category: many2many link defined incorrectly

 

** Branch linked: lp:~openerp-dev/openobject-addons/trunk-bug-731332-ara

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/731332

Title:
  [6.0.1] HR-category: many2many link defined incorrectly

Status in OpenERP Modules (addons):
  Fix Committed

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



References