diff --git a/addons/hr_contract/security/hr_contract_security.xml b/addons/hr_contract/security/hr_contract_security.xml index b891099e447..39f923a895b 100644 --- a/addons/hr_contract/security/hr_contract_security.xml +++ b/addons/hr_contract/security/hr_contract_security.xml @@ -2,9 +2,5 @@ - - Human Resources / Contract - - diff --git a/addons/hr_timesheet_sheet/report/timesheet_report.py b/addons/hr_timesheet_sheet/report/timesheet_report.py index a8c0440a053..6688c747983 100644 --- a/addons/hr_timesheet_sheet/report/timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/timesheet_report.py @@ -35,7 +35,7 @@ class timesheet_report(osv.osv): 'name': fields.char('Description', size=64,readonly=True), 'product_id' : fields.many2one('product.product', 'Product'), 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True), - 'user_id': fields.many2one('res.users', 'User',readonly=True), + 'employee_id': fields.many2one('hr.employee', 'Employee',readonly=True), 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing',readonly=True), 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True), 'nbr': fields.integer('#Nbr',readonly=True), @@ -60,8 +60,8 @@ class timesheet_report(osv.osv): tools.drop_view_if_exists(cr, 'timesheet_report') cr.execute(""" create or replace view timesheet_report as ( - select - min(aal.id) as id, + select + min(aal.id) as id, htss.date_current, htss.name, htss.date_from, @@ -91,14 +91,14 @@ class timesheet_report(osv.osv): AND day.name = sheet.date_current) where sheet.id=htss.id) as total_attendance, aal.to_invoice, aal.general_account_id, - htss.user_id, + htss.employee_id as employee_id, htss.company_id, htss.department_id, htss.state - from account_analytic_line as aal - left join hr_analytic_timesheet as hat ON (hat.line_id=aal.id) - left join hr_timesheet_sheet_sheet as htss ON (hat.line_id=htss.id) - group by + from hr_timesheet_sheet_sheet as htss + left join hr_analytic_timesheet as hat ON (hat.create_uid=htss.create_uid) + left join account_analytic_line as aal ON (hat.line_id=aal.id) + group by to_char(htss.date_current,'YYYY'), to_char(htss.date_current,'MM'), to_char(htss.date_current, 'YYYY-MM-DD'), @@ -116,7 +116,8 @@ class timesheet_report(osv.osv): htss.state, htss.id, htss.department_id, - htss.user_id + htss.employee_id + ) """) timesheet_report() diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml index a015ff933d2..d7fa7681a6b 100644 --- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml +++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml @@ -7,7 +7,7 @@ graph - + @@ -21,7 +21,7 @@ - + @@ -72,7 +72,7 @@ domain="[('state','=','done')]"/> - + @@ -90,7 +90,7 @@ - + @@ -117,7 +117,7 @@ timesheet.report form tree,graph - {'search_default_month':1,'search_default_User_id':1,'group_by_no_leaf':1,'group_by':[]} + {'search_default_month':1,'search_default_Employee_id':1,'group_by_no_leaf':1,'group_by':[]}