[IMP] hr_timesheet: small code and test cleanup
bzr revid: rco@openerp.com-20111221105214-kgwedzef47lvoii8
This commit is contained in:
parent
d87f491178
commit
bc40611002
|
@ -57,10 +57,10 @@ to set up a management by affair.
|
||||||
],
|
],
|
||||||
'demo_xml': ['hr_timesheet_demo.xml'],
|
'demo_xml': ['hr_timesheet_demo.xml'],
|
||||||
'test': [
|
'test': [
|
||||||
'test/test_hr_timesheet.yml',
|
'test/test_hr_timesheet.yml',
|
||||||
'test/hr_timesheet_report.yml',
|
'test/hr_timesheet_report.yml',
|
||||||
'test/hr_timesheet_demo.yml',
|
'test/hr_timesheet_demo.yml',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'active': False,
|
'active': False,
|
||||||
'certificate': '0071405533469',
|
'certificate': '0071405533469',
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
user_id: base.user_demo
|
user_id: base.user_demo
|
||||||
date: !eval time.strftime('%Y-%m-%d')
|
date: !eval time.strftime('%Y-%m-%d')
|
||||||
account_id: account.analytic_administratif
|
account_id: account.analytic_administratif
|
||||||
unit_amount: 1.0
|
unit_amount: 1.0
|
||||||
|
|
|
@ -48,4 +48,4 @@
|
||||||
'date': (datetime.now()+timedelta(2)).strftime('%Y-%m-%d %H:%M:%S'),
|
'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',
|
'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'})
|
'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)
|
self.sign_out_result_end(cr, uid, [new_id], context)
|
||||||
|
|
|
@ -88,7 +88,6 @@ class hr_so_project(osv.osv_memory):
|
||||||
return timesheet_obj.create(cr, uid, res, context=context)
|
return timesheet_obj.create(cr, uid, res, context=context)
|
||||||
|
|
||||||
def sign_out_result_end(self, cr, uid, ids, context=None):
|
def sign_out_result_end(self, cr, uid, ids, context=None):
|
||||||
print""
|
|
||||||
emp_obj = self.pool.get('hr.employee')
|
emp_obj = self.pool.get('hr.employee')
|
||||||
for data in self.browse(cr, uid, ids, context=context):
|
for data in self.browse(cr, uid, ids, context=context):
|
||||||
emp_id = data.emp_id.id
|
emp_id = data.emp_id.id
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
I check that state is "Confirmed".
|
I check that state is "Confirmed".
|
||||||
-
|
-
|
||||||
!assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
|
!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.
|
The manager will accept This request by click on "Accept" button.
|
||||||
-
|
-
|
||||||
|
@ -120,4 +120,4 @@
|
||||||
I check that state is "Done".
|
I check that state is "Done".
|
||||||
-
|
-
|
||||||
!assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
|
!assert {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
|
||||||
- state == 'done'
|
- state == 'done'
|
||||||
|
|
|
@ -18,4 +18,4 @@
|
||||||
task_ids = self.browse(cr, uid, task_work, context)
|
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.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.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'
|
assert task_ids.product_uom_id.name == "Hour", 'Error, The Hour in Timesheet is not ok'
|
||||||
|
|
|
@ -91,4 +91,4 @@
|
||||||
Check for timesheet_ids in HR manager's timesheet
|
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}:
|
!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
|
- len(timesheet_ids) > 0
|
||||||
|
|
Loading…
Reference in New Issue