[IMP] hr_payroll:Added yaml for hr_payroll
bzr revid: mtr@mtr-20100706090709-hmefb20mdmxb9tb4
This commit is contained in:
parent
13aa45be31
commit
4d68c0c8c2
|
@ -54,6 +54,12 @@
|
|||
'wizard/hr_payroll_employees_detail.xml',
|
||||
'wizard/hr_payroll_year_salary.xml',
|
||||
|
||||
],
|
||||
'test': [
|
||||
'test/payslip.yml',
|
||||
'test/payment_advice.yml',
|
||||
'test/payroll_register.yml',
|
||||
|
||||
],
|
||||
'demo_xml': [
|
||||
'hr_payroll_demo.xml'
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
-
|
||||
I test the 'Payment Advice' in order to check the hr_payroll in OpenERP
|
||||
-
|
||||
I create a new employee “Richie”
|
||||
-
|
||||
!record {model: hr.employee, id: hr_employee_richie0}:
|
||||
address_home_id: base.res_partner_address_1
|
||||
address_id: base.res_partner_address_9
|
||||
birthday: '1984-05-01'
|
||||
children: 0.0
|
||||
contract_ids:
|
||||
- advantages_gross: 0.0
|
||||
advantages_net: 0.0
|
||||
date_end: '2011-07-01'
|
||||
date_start: '2010-07-01'
|
||||
name: reference
|
||||
wage: 5000.0
|
||||
wage_type_id: hr_contract.hr_contract_monthly_gross
|
||||
country_id: base.in
|
||||
department_id: hr.dep_it
|
||||
employee_account: account.a_recv
|
||||
gender: male
|
||||
marital: hr.hr_employee_marital_status_single
|
||||
name: Richie
|
||||
pg_joining: '2009-12-01'
|
||||
property_bank_account: account.cash
|
||||
salary_account: account.a_recv
|
||||
vehicle_distance: 0.0
|
||||
-
|
||||
Then I create a new payment advice record
|
||||
-
|
||||
!record {model: hr.payroll.advice, id: hr_payroll_advice_advice0}:
|
||||
account_id: account.cash
|
||||
line_ids:
|
||||
- amount: 5500.0
|
||||
bysal: 5000.0
|
||||
employee_id: 'hr_employee_richie0'
|
||||
flag: C
|
||||
name: Axis Bank
|
||||
name: advice1
|
||||
-
|
||||
In order to confirm a sheet I click on "Confirm Sheet" button
|
||||
-
|
||||
!python {model: hr.payroll.advice}: |
|
||||
self.confirm_sheet(cr, uid, [ref("hr_payroll_advice_advice0")], {"lang": "en_US",
|
||||
"active_model": "ir.ui.menu", "active_ids": [ref("hr_payroll.hr_menu_payment_advice")],
|
||||
"tz": False, "active_id": ref("hr_payroll.hr_menu_payment_advice")})
|
||||
-
|
||||
I check that a state has transferred from draft to confirm
|
||||
-
|
||||
!python {model: hr.payroll.advice}: |
|
||||
from tools.translate import _
|
||||
advice_id=self.browse(cr, uid, ref("hr_payroll_advice_advice0"))
|
||||
assert(advice_id.state == 'confirm'), _('State not changed!')
|
|
@ -0,0 +1,63 @@
|
|||
-
|
||||
I test the 'Payroll Register' in order to check the hr_payroll in OpenERP
|
||||
-
|
||||
I create a new employee “Keith”
|
||||
-
|
||||
!record {model: hr.employee, id: hr_employee_keith0}:
|
||||
address_home_id: base.res_partner_address_3
|
||||
address_id: base.res_partner_address_9
|
||||
birthday: '1984-05-01'
|
||||
children: 0.0
|
||||
contract_ids:
|
||||
- advantages_gross: 0.0
|
||||
advantages_net: 0.0
|
||||
date_end: '2011-07-01'
|
||||
date_start: '2010-07-01'
|
||||
name: reference
|
||||
wage: 5000.0
|
||||
wage_type_id: hr_contract.hr_contract_monthly_gross
|
||||
country_id: base.in
|
||||
department_id: hr.dep_it
|
||||
employee_account: account.a_recv
|
||||
gender: male
|
||||
marital: hr.hr_employee_marital_status_single
|
||||
name: Keith
|
||||
pg_joining: '2009-12-01'
|
||||
property_bank_account: account.cash
|
||||
salary_account: account.a_recv
|
||||
vehicle_distance: 0.0
|
||||
-
|
||||
I create a payroll register record
|
||||
-
|
||||
!record {model: hr.payroll.register, id: hr_payroll_register_payroll0}:
|
||||
bank_journal_id: account.bank_journal
|
||||
date: '2010-07-02'
|
||||
journal_id: account.expenses_journal
|
||||
line_ids:
|
||||
- employee_id: hr_payroll.hr_employee_keith0
|
||||
bank_journal_id: account.bank_journal
|
||||
journal_id: account.expenses_journal
|
||||
name: payroll1
|
||||
-
|
||||
I click on Compute button
|
||||
-
|
||||
!python {model: hr.payroll.register}: |
|
||||
self.compute_sheet(cr, uid, [ref("hr_payroll_register_payroll0")], {"lang": "en_US",
|
||||
"tz": False, "active_model": "ir.ui.menu", "department_id": False, "active_ids":
|
||||
[ref("hr_payroll.hr_menu_payroll_register")], "section_id": False, "active_id":
|
||||
ref("hr_payroll.hr_menu_payroll_register"), })
|
||||
-
|
||||
Then I click on Verify Sheet button
|
||||
-
|
||||
!python {model: hr.payroll.register}: |
|
||||
self.verify_sheet(cr, uid, [ref("hr_payroll_register_payroll0")], {"lang": "en_US",
|
||||
"tz": False, "active_model": "ir.ui.menu", "department_id": False, "active_ids":
|
||||
[ref("hr_payroll.hr_menu_payroll_register")], "section_id": False, "active_id":
|
||||
ref("hr_payroll.hr_menu_payroll_register"), })
|
||||
-
|
||||
I check that a state has transferred from 'Wating for Verification' to 'Wating for HR Verification'state
|
||||
-
|
||||
!python {model: hr.payroll.register}: |
|
||||
from tools.translate import _
|
||||
reg_brw=self.browse(cr, uid, ref("hr_payroll_register_payroll0"))
|
||||
assert(reg_brw.state == 'hr_check'), _('State not changed!')
|
|
@ -0,0 +1,132 @@
|
|||
-
|
||||
I test the 'Payment Advice' in order to check the hr_payroll in OpenERP
|
||||
-
|
||||
I create a new employee “Richard”
|
||||
-
|
||||
!record {model: hr.employee, id: hr_employee_richard0}:
|
||||
address_home_id: base.res_partner_address_2
|
||||
address_id: base.res_partner_address_9
|
||||
birthday: '1984-05-01'
|
||||
children: 0.0
|
||||
contract_ids:
|
||||
- advantages_gross: 0.0
|
||||
advantages_net: 0.0
|
||||
date_end: '2011-07-01'
|
||||
date_start: '2010-07-01'
|
||||
name: reference
|
||||
wage: 5000.0
|
||||
wage_type_id: hr_contract.hr_contract_monthly_gross
|
||||
country_id: base.in
|
||||
department_id: hr.dep_it
|
||||
employee_account: account.a_recv
|
||||
gender: male
|
||||
marital: hr.hr_employee_marital_status_single
|
||||
name: Richard
|
||||
pg_joining: '2009-12-01'
|
||||
property_bank_account: account.cash
|
||||
salary_account: account.a_recv
|
||||
vehicle_distance: 0.0
|
||||
-
|
||||
I create a new payroll structure for software developer
|
||||
-
|
||||
!record {model: hr.payroll.structure, id: hr_payroll_structure_softwaredeveloper0}:
|
||||
code: SD
|
||||
line_ids:
|
||||
- account_id: account.a_expense
|
||||
amount: 0.40000000000000002
|
||||
amount_type: per
|
||||
category_id: hr_payroll.HRA
|
||||
code: HRA
|
||||
company_contrib: 0.0
|
||||
name: House Rant Allowance
|
||||
sequence: 5
|
||||
total: 0.0
|
||||
type: allowance
|
||||
- account_id: account.a_expense
|
||||
amount: 10000.0
|
||||
amount_type: fix
|
||||
category_id: hr_payroll.CA
|
||||
code: CA
|
||||
company_contrib: 0.0
|
||||
name: Convance Allowance
|
||||
sequence: 10
|
||||
total: 0.0
|
||||
type: allowance
|
||||
- account_id: account.a_pay
|
||||
amount: 10000.0
|
||||
amount_type: fix
|
||||
category_id: hr_payroll.PT
|
||||
code: PT
|
||||
company_contrib: 0.0
|
||||
name: Professional Tax
|
||||
sequence: 15
|
||||
total: 0.0
|
||||
type: deduction
|
||||
- account_id: account.a_pay
|
||||
amount: 0.125
|
||||
amount_type: per
|
||||
category_id: hr_payroll.PF
|
||||
code: PF
|
||||
company_contrib: 0.0
|
||||
name: Provident Fund
|
||||
sequence: 20
|
||||
total: 0.0
|
||||
type: deduction
|
||||
name: Software Developer
|
||||
-
|
||||
I create a employee payslip record
|
||||
-
|
||||
!record {model: hr.payslip, id: hr_payslip_0}:
|
||||
bank_journal_id: account.bank_journal
|
||||
employee_id: hr_payroll.hr_employee_richard0
|
||||
journal_id: account.expenses_journal
|
||||
-
|
||||
I click on 'Compute Sheet' button
|
||||
-
|
||||
!workflow {model: hr.payslip, action: compute_sheet, ref: hr_payslip_0}
|
||||
-
|
||||
!python {model: hr.payslip}: |
|
||||
self.compute_sheet(cr, uid, [ref("hr_payslip_0")], {"lang": "en_US", "tz": False,
|
||||
"active_model": "ir.ui.menu", "department_id": False, "active_ids": [ref("hr_payroll.menu_department_tree")],
|
||||
"section_id": False, "active_id": ref("hr_payroll.menu_department_tree"),
|
||||
})
|
||||
-
|
||||
I check that an order which was in the "New Slip" state has transit to "Wating for Verification" state
|
||||
-
|
||||
!python {model: hr.payslip}: |
|
||||
from tools.translate import _
|
||||
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
|
||||
assert(payslip_brw.state == 'draft'), _('State not changed!')
|
||||
-
|
||||
Then I click on Verify Sheet button
|
||||
-
|
||||
!workflow {model: hr.payslip, action: verify_sheet, ref: hr_payslip_0}
|
||||
-
|
||||
I check that an order which was in the "Wating for Verification" state has transit to "Wating for HR Verification" state
|
||||
-
|
||||
!python {model: hr.payslip}: |
|
||||
from tools.translate import _
|
||||
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
|
||||
assert(payslip_brw.state == 'hr_check'), _('State not changed!')
|
||||
-
|
||||
Then I click on Complete HR Checking button
|
||||
-
|
||||
!workflow {model: hr.payslip, action: final_verify_sheet, ref: hr_payslip_0}
|
||||
-
|
||||
I check that an order which was in the "'Wating for HR Verification'" state has transit to "Confirm Sheet" state
|
||||
-
|
||||
!python {model: hr.payslip}: |
|
||||
from tools.translate import _
|
||||
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
|
||||
assert(payslip_brw.state == 'confirm'), _('State not changed!')
|
||||
-
|
||||
Then I click on Pay Salary button
|
||||
-
|
||||
!workflow {model: hr.payslip, action: process_sheet, ref: hr_payslip_0}
|
||||
-
|
||||
I check that an order which was in the "Confirm Sheet" state has transit to "Paid Salary" state
|
||||
-
|
||||
!python {model: hr.payslip}: |
|
||||
from tools.translate import _
|
||||
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
|
||||
assert(payslip_brw.state == 'done'), _('State not changed!')
|
Loading…
Reference in New Issue