[hr_timesheet] Employee timesheet reports confuse employee id and user id
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
bzr revno: 4437
There are errors in the Employees Timesheet report and the Employee Timesheet report which prevent the reports from generating the correct information.
The Employees Timesheet incorrectly passes the employee ID into the 'emp_create_xml' method so it is generating the timesheet for the wrong user. It should pass in the user id.
Steps to reproduce: use a database with multiple users and employees. Report on users that have their hr.employee ID different to their res.user ID.
The Employee Timesheet ignores the employee_id parameter and incorrectly uses the logged-on user's id to generate the report. So the generated report will be incorrect if the user chooses a different employee in the wizard.
Steps to reproduce: use a database with multiple users and employees. Run the report for the logged on user and then re-run for another employee. You'll see that the reports are identical, even though is different user was selected.
A patch is attached to fix both reports.
Related branches
- OpenERP R&D Team: Pending requested
-
Diff: 46 lines (+5/-5)3 files modifiedhr_timesheet_invoice/report/account_analytic_profit.rml (+1/-1)
hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py (+1/-1)
hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit_view.xml (+3/-3)
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | In Progress → Fix Released |
In hr_timesheet report wizard, we are getting the employee as an input for printing the report while report prints according to user logged in to the system not employee.
Would you please check it and here patch is also attached for fixing the problem in both reports of hr_timesheet.
Thanks.