[IMP] hr_timesheet: small code and test cleanup
authorRaphael Collet <rco@openerp.com>
Wed, 21 Dec 2011 10:52:14 +0000 (11:52 +0100)
committerRaphael Collet <rco@openerp.com>
Wed, 21 Dec 2011 10:52:14 +0000 (11:52 +0100)
bzr revid: rco@openerp.com-20111221105214-kgwedzef47lvoii8

addons/hr_timesheet/__openerp__.py
addons/hr_timesheet/test/hr_timesheet_demo.yml
addons/hr_timesheet/test/test_hr_timesheet.yml
addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
addons/project_timesheet/test/work_timesheet.yml
addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml

index f276fa2..247a763 100644 (file)
@@ -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',
index 755f21a..a868be2 100644 (file)
@@ -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
index fdca798..19c72a4 100644 (file)
@@ -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)
index 8931b12..e3f7f0c 100644 (file)
@@ -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
index f86d85f..1cb97ca 100644 (file)
   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.
 -
   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'
index a53fd76..d9c1212 100644 (file)
@@ -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'
index 3635a7e..a6ccc63 100644 (file)
@@ -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