diff --git a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py
index 90ba2aa7f6c..eb1437534d4 100644
--- a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py
+++ b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py
@@ -217,91 +217,3 @@ class report_timesheet_invoice(osv.osv):
""")
report_timesheet_invoice()
-class report_random_timsheet(osv.osv):
- _name = "report.random.timesheet"
- _description = "Random Timesheet Report"
- _auto = False
-
- _columns = {
- 'analytic_account_id': fields.many2one('account.analytic.account','Analytic Account', readonly=True),
- 'name': fields.char('Description', size=64, readonly=True),
- 'quantity': fields.float('Quantity', readonly=True),
- 'date': fields.date('Date', readonly=True),
- 'user_id': fields.many2one('res.users', 'User', readonly=True)
- }
- _order = "date desc"
-
- def __init__(self, pool, cr):
- super(report_random_timsheet, self).__init__(pool, cr)
- self.called = False
-
- def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- """ To call the init() method timely
- """
- if not self.called:
- self.init(cr, user)
- self.called = True # To make sure that init doesn't get called multiple times
-
- res = super(report_random_timsheet, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
- return res
-
- def init(self, cr, uid=1):
- drop_view_if_exists(cr, 'report_random_timesheet')
-
- cr.execute("""create or replace view report_random_timesheet as (
-
- select
- line.id as id, line.account_id as analytic_account_id, line.name as name,
- line.unit_amount as quantity, line.date as date, line.user_id as user_id
- from
- account_analytic_line line, hr_department dept,hr_employee dept_user
- where
- (dept.id = dept_user.department_id AND dept_user.id=line.user_id AND line.user_id is not null)
- AND (dept.manager_id = """ + str(uid) + """ )
- AND (line.date <= CURRENT_DATE AND line.date > (CURRENT_DATE-3))
- LIMIT 10
- )
- """ )
-
-report_random_timsheet()
-
-class random_timesheet_lines(osv.osv):
- _name = "random.timesheet.lines"
- _description = "Random Timesheet Lines"
- _auto = False
-
- _columns = {
- 'date': fields.date('Date', readonly=True),
- 'name': fields.char('Description', size=64, readonly=True),
- 'user_id': fields.many2one('res.users', 'User', readonly=True),
- 'quantity': fields.float('Quantity', readonly=True),
- 'product_id': fields.many2one('product.product', 'Product', readonly=True),
- 'analytic_account_id': fields.many2one('account.analytic.account','Analytic Account', readonly=True),
- 'uom_id': fields.many2one('product.uom', 'UoM', readonly=True),
- 'amount': fields.float('Amount', readonly=True),
- 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Invoicing', readonly=True),
- 'general_account_id': fields.many2one('account.account', 'General Account', readonly=True)
- }
-
- _order = "date desc"
-
- def init(self, cr):
- drop_view_if_exists(cr, 'random_timesheet_lines')
-
- cr.execute("""create or replace view random_timesheet_lines as (
- select
- line.id as id, line.date as date, line.name as name, line.unit_amount as quantity,
- line.product_id as product_id, line.account_id as analytic_account_id,
- line.product_uom_id as uom_id, line.amount as amount, line.to_invoice as to_invoice,
- line.general_account_id as general_account_id, line.user_id as user_id
- from
- account_analytic_line line
- where
- (line.date <= CURRENT_DATE AND line.date > (CURRENT_DATE-15))
- )
- """ )
-
-random_timesheet_lines()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
index b763f96c10a..1d2f5195687 100644
--- a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
+++ b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
@@ -425,85 +425,5 @@
src_model="res.users"/>
-
-
-
- report.random.timesheet.tree
- report.random.timesheet
- tree
-
-
-
-
-
-
-
-
-
-
-
- Random Timesheet
- report.random.timesheet
- form
- tree,form
-
-
-
-
-
-
- random.timesheet.lines.search
- random.timesheet.lines
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- random.timesheet.lines.tree
- random.timesheet.lines
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ir.actions.act_window
- Working Hours
- random.timesheet.lines
- form
- tree,form
- {'search_default_user_id':uid }
-
-
-
diff --git a/addons/hr_timesheet_invoice/security/ir.model.access.csv b/addons/hr_timesheet_invoice/security/ir.model.access.csv
index c647fec62cf..9d8c41be2cd 100644
--- a/addons/hr_timesheet_invoice/security/ir.model.access.csv
+++ b/addons/hr_timesheet_invoice/security/ir.model.access.csv
@@ -7,8 +7,6 @@
"access_report_timesheet_account","report_timesheet.account","model_report_timesheet_account","base.group_hr_manager",1,1,1,1
"access_report_timesheet_account_date","report_timesheet.account.date","model_report_timesheet_account_date","base.group_hr_manager",1,1,1,1
"access_report_timesheet_invoice","report_timesheet.invoice","model_report_timesheet_invoice","base.group_hr_manager",1,1,1,1
-"access_report_random_timesheet","report_random_timesheet","model_report_random_timesheet","base.group_hr_manager",1,1,1,1
-"access_report_random_timesheet_lines","random_timesheet_lines","model_random_timesheet_lines","base.group_hr_manager",1,1,1,1
"access_report_analytic_account_close_manager","report.analytic.account.close.manager","model_report_analytic_account_close","base.group_hr_manager",1,1,1,1
"access_report_account_analytic_line_to_invoice_manager","report.account.analytic.line.to.invoice.manager","model_report_account_analytic_line_to_invoice","base.group_hr_manager",1,1,1,1
"access_account_invoice_hr_user","account.invoice.hr.user","account.model_account_invoice","base.group_hr_user",1,1,1,1