← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

** Changed in: openobject-addons
   Importance: Undecided => Low

** Changed in: openobject-addons
       Status: New => Confirmed

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP R&D Addons Team 3 (openerp-dev-addons3)

-- 
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):
  Confirmed

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