From bc40611002a5bed155973925007dc650041f06c9 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 21 Dec 2011 11:52:14 +0100 Subject: [PATCH] [IMP] hr_timesheet: small code and test cleanup bzr revid: rco@openerp.com-20111221105214-kgwedzef47lvoii8 --- addons/hr_timesheet/__openerp__.py | 8 ++++---- addons/hr_timesheet/test/hr_timesheet_demo.yml | 2 +- addons/hr_timesheet/test/test_hr_timesheet.yml | 2 +- addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py | 1 - .../hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml | 4 ++-- addons/project_timesheet/test/work_timesheet.yml | 2 +- .../test/worktask_entry_to_timesheetline_entry.yml | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/addons/hr_timesheet/__openerp__.py b/addons/hr_timesheet/__openerp__.py index f276fa24757..247a763fe10 100644 --- a/addons/hr_timesheet/__openerp__.py +++ b/addons/hr_timesheet/__openerp__.py @@ -57,10 +57,10 @@ to set up a management by affair. ], 'demo_xml': ['hr_timesheet_demo.xml'], 'test': [ - 'test/test_hr_timesheet.yml', - 'test/hr_timesheet_report.yml', - 'test/hr_timesheet_demo.yml', - ], + 'test/test_hr_timesheet.yml', + 'test/hr_timesheet_report.yml', + 'test/hr_timesheet_demo.yml', + ], 'installable': True, 'active': False, 'certificate': '0071405533469', diff --git a/addons/hr_timesheet/test/hr_timesheet_demo.yml b/addons/hr_timesheet/test/hr_timesheet_demo.yml index 755f21a0500..a868be2d710 100644 --- a/addons/hr_timesheet/test/hr_timesheet_demo.yml +++ b/addons/hr_timesheet/test/hr_timesheet_demo.yml @@ -3,4 +3,4 @@ user_id: base.user_demo date: !eval time.strftime('%Y-%m-%d') account_id: account.analytic_administratif - unit_amount: 1.0 \ No newline at end of file + unit_amount: 1.0 diff --git a/addons/hr_timesheet/test/test_hr_timesheet.yml b/addons/hr_timesheet/test/test_hr_timesheet.yml index fdca798e0c9..19c72a46d2b 100644 --- a/addons/hr_timesheet/test/test_hr_timesheet.yml +++ b/addons/hr_timesheet/test/test_hr_timesheet.yml @@ -48,4 +48,4 @@ 'date': (datetime.now()+timedelta(2)).strftime('%Y-%m-%d %H:%M:%S'), 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'), 'info': 'Create Yaml for hr module', 'name': 'Quentin Paolino', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'absent'}) - self.sign_out_result_end(cr, uid, [new_id], context) \ No newline at end of file + self.sign_out_result_end(cr, uid, [new_id], context) diff --git a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py index 8931b125844..e3f7f0c7acb 100644 --- a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py +++ b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py @@ -88,7 +88,6 @@ class hr_so_project(osv.osv_memory): return timesheet_obj.create(cr, uid, res, context=context) def sign_out_result_end(self, cr, uid, ids, context=None): - print"" emp_obj = self.pool.get('hr.employee') for data in self.browse(cr, uid, ids, context=context): emp_id = data.emp_id.id diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml index f86d85f527a..1cb97ca8afd 100644 --- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml +++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml @@ -110,7 +110,7 @@ I check that state is "Confirmed". - !assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}: - - state == 'confirm' + - state == 'confirm' - The manager will accept This request by click on "Accept" button. - @@ -120,4 +120,4 @@ I check that state is "Done". - !assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}: - - state == 'done' \ No newline at end of file + - state == 'done' diff --git a/addons/project_timesheet/test/work_timesheet.yml b/addons/project_timesheet/test/work_timesheet.yml index a53fd766567..d9c1212c022 100644 --- a/addons/project_timesheet/test/work_timesheet.yml +++ b/addons/project_timesheet/test/work_timesheet.yml @@ -18,4 +18,4 @@ task_ids = self.browse(cr, uid, task_work, context) assert task_ids.user_id.id == ref("project.res_users_analyst"), 'Error, The User in Timesheet is not Correct' assert task_ids.date == start, 'Error, The Date in Timesheet is not ok' - assert task_ids.product_uom_id.name == "Hour", 'Error, The Hour in Timesheet is not ok' \ No newline at end of file + assert task_ids.product_uom_id.name == "Hour", 'Error, The Hour in Timesheet is not ok' diff --git a/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml b/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml index 3635a7ec8fb..a6ccc63749a 100644 --- a/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml +++ b/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml @@ -91,4 +91,4 @@ Check for timesheet_ids in HR manager's timesheet - !assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_sheetforhrmanager0, string: After hr manager's work task, length of timesheet line of current timesheet must be greater then 1}: - - len(timesheet_ids) > 0 \ No newline at end of file + - len(timesheet_ids) > 0