[ADD]: hr_contract: add yaml test case for hr_contract module
bzr revid: atp@tinyerp.co.in-20100519053213-mw7sp811fn4ejaej
This commit is contained in:
parent
863e387e86
commit
e165694ef3
|
@ -42,6 +42,7 @@
|
|||
'hr_contract_view.xml'
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': ['test/test_hr_contract.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0046298028637',
|
||||
|
|
|
@ -142,13 +142,12 @@
|
|||
<group col='15' colspan='4'>
|
||||
<field name="name"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Department" icon="terp-project" domain="[]" context="{'group_by':'department_id'}"/>
|
||||
<filter string="Contract Type" icon="terp-project" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -203,6 +202,7 @@
|
|||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="working_hours"/>
|
||||
<field name="type_id"/>
|
||||
<field name="wage_type_id"/>
|
||||
<field name="wage"/>
|
||||
</tree>
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
- |
|
||||
In order to test hr_contract module in OpenERP,
|
||||
I will create contract for "Mark Johnson" employee.
|
||||
|
||||
- |
|
||||
First I create Employee "Mark Johnson"
|
||||
-
|
||||
!record {model: hr.employee, id: hr_employee_employee0}:
|
||||
address_home_id: base.res_partner_address_1
|
||||
company_id: base.main_company
|
||||
gender: male
|
||||
name: Mark Johnson
|
||||
user_id: base.user_root
|
||||
|
||||
- |
|
||||
Given that I have Contract wage period "monthly" and
|
||||
specify "hours in period" is "176.00"
|
||||
-
|
||||
!record {model: hr.contract.wage.type.period, id: hr_contract_wage_type_period_monthly0}:
|
||||
factor_days: 178.0
|
||||
name: monthly
|
||||
- |
|
||||
Given that I have Contract wage type "Monthly Gross Wage".
|
||||
select wage period "monthly" and type "Gross". with hour cost "1.9"
|
||||
-
|
||||
!record {model: hr.contract.wage.type, id: hr_contract_wage_type_monthlygrosswage0}:
|
||||
factor_type: 1.9
|
||||
name: Monthly Gross Wage
|
||||
period_id: 'hr_contract_wage_type_period_monthly0'
|
||||
type: gross
|
||||
|
||||
- |
|
||||
Now I start by create contract for "Mark Johnson".
|
||||
Select wage type "Monthly Gross Wage" and Wage period "monthly"
|
||||
which I have given.
|
||||
-
|
||||
!record {model: hr.contract, id: hr_contract_contract0}:
|
||||
advantages_gross: 0.0
|
||||
employee_id: 'hr_employee_employee0'
|
||||
advantages_net: 0.0
|
||||
date_end: '2011-05-18'
|
||||
date_start: '2010-05-18'
|
||||
name: contract1
|
||||
wage: 1.0
|
||||
wage_type_id: hr_contract_wage_type_monthlygrosswage0
|
||||
working_hours: resource.timesheet_group1
|
Loading…
Reference in New Issue