[RM/ADD] rearragned the yaml and refcetored the yamls

bzr revid: jam@tinyerp.com-20111129043849-i0k4udno1x2jklz1
This commit is contained in:
Jigar Amin - OpenERP 2011-11-29 10:08:49 +05:30
parent f78796c637
commit 46348ccf31
3 changed files with 12 additions and 10 deletions

View File

@ -46,8 +46,8 @@ It also manages the leaves of every resource.
'demo_xml': ['resource_demo.xml' 'demo_xml': ['resource_demo.xml'
], ],
'test': [ 'test': [
'test/on_chnage_resource.yml',
'test/test_resource.yml', 'test/test_resource.yml',
'test/on_chnage_resource.yml',
], ],
'installable': True, 'installable': True,
'active': False, 'active': False,

View File

@ -1,5 +1,7 @@
- |
In Order to Test resource : I use the 'Demo resource' from Demo Record, with 38 Hours / week and 9 Hours / Day working calendar scheduled.
- -
I generate resource detail for the User "Demo" First, I generate resource detail for the User "Demo"
- -
!python {model: resource.resource}: | !python {model: resource.resource}: |
res = self.generate_resources(cr, uid, [ref('base.user_demo')], ref('timesheet_group1')) res = self.generate_resources(cr, uid, [ref('base.user_demo')], ref('timesheet_group1'))
@ -8,16 +10,16 @@
assert resource.get('efficiency') == 0.8, "Wrong resource has been Generated" assert resource.get('efficiency') == 0.8, "Wrong resource has been Generated"
assert resource.get('vacation'), 'No vaction calculated' assert resource.get('vacation'), 'No vaction calculated'
-
I compute vecation for the reource "Demo Resource"
-
!python {model: resource.resource}: |
res= self.compute_vacation(cr, uid, ref('timesheet_group1'), ref('resource_resource_demorsource'))
assert res, "No vacation generated for the resource 'Demo Resource'."
- -
I compute the working calendar for the resource 'Demo Resource'. I compute the working calendar for the resource 'Demo Resource'.
- -
!python {model: resource.resource}: | !python {model: resource.resource}: |
res= self.compute_working_calendar(cr, uid, ref('timesheet_group1')) res= self.compute_working_calendar(cr, uid, ref('timesheet_group1'))
assert res, "No working calendar generated for the resource 'Demo Resource'." assert res, "No working calendar generated for the resource 'Demo Resource'."
-
I compute vacation for the resource "Demo Resource" based on his Resource Leave Request(s).
-
!python {model: resource.resource}: |
res= self.compute_vacation(cr, uid, ref('timesheet_group1'), ref('resource_resource_demorsource'))
assert res, "No vacation generated for the resource 'Demo Resource'."

View File

@ -1,5 +1,5 @@
- -
I changing the Resource of the Leave of 'Demo Resource'. I create resource calendar leave record to call event resource onchange event for "Demo Resource".
- -
!record {model: resource.calendar.leaves, id: resource_calendar_leaves_demoleave1}: !record {model: resource.calendar.leaves, id: resource_calendar_leaves_demoleave1}:
calendar_id: resource.timesheet_group1 calendar_id: resource.timesheet_group1