← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 832569] Re: [6.0] hr_holidays, holidays report per department shows Inactive employees

 

Hello,

I think that this bug as to be reopened and investigated further.

the fix of Yannick replacing SQL by ORM is indeed good, but normally he
would not have needed to use the ('active', '=', True) condition.

As a comment in the osv in _where_calc method of the orm says :
        # if the object has a field named 'active', filter out all inactive
        # records unless they were explicitely asked for

But :
self.pool.get('hr.employee').search(cr, uid, [], context=context)
returns => all the employees active or inactive

This has also other impacts on the HR module because, as instance, an
employee without the extended view group, has not the "active" filter
button on the Employees search view and see all employees including the
inactive ones in the Employees view.

Thanks
Guewen

** Changed in: openobject-addons
       Status: Fix Committed => Confirmed

-- 
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/832569

Title:
  [6.0] hr_holidays, holidays report per department shows Inactive
  employees

Status in OpenERP Modules (addons):
  Confirmed

Bug description:
  Hello,

  When showing employees' holidays per departments report, unactives
  employees are shown.

  A psql request isn't checking the employee status in:
  http://bazaar.launchpad.net/~openerp/openobject-addons/6.0/view/head:/hr_holidays/report/holidays_summary_report.py

  A proposed patch that corrects the request to get only active
  employees is added.

  Best Regards,
  Yannick

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/832569/+subscriptions


References