[IMP] hr_payroll: Improve YML test

bzr revid: psi@tinyerp.co.in-20101221112530-c3el0a4hfone7qwo
This commit is contained in:
psi (Open ERP) 2010-12-21 16:55:30 +05:30
parent 21199236df
commit d9ade7b4f6
4 changed files with 9 additions and 31 deletions

View File

@ -55,9 +55,9 @@
'wizard/hr_payroll_year_salary.xml',
],
'test': [
# 'test/payslip.yml',
# 'test/payment_advice.yml',
# 'test/payroll_register.yml',
'test/payslip.yml',
'test/payment_advice.yml',
'test/payroll_register.yml',
# 'test/hr_payroll_report.yml',
],
'demo_xml': [

View File

@ -19,19 +19,14 @@
type_id: hr_contract.hr_contract_type_emp
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
-
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
@ -56,7 +51,7 @@
-
Print Payroll Advice
-
-
!python {model: hr.payroll.advice}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payroll.advice').create(cr, uid, [ref('hr_payroll_advice_advice0')], {}, {})

View File

@ -18,25 +18,17 @@
type_id: hr_contract.hr_contract_type_emp
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.

View File

@ -29,14 +29,10 @@
type_id: hr_contract.hr_contract_type_emp
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
bank_account_id: res_partner_bank_0
salary_account: account.a_recv
vehicle_distance: 0.0
-
I create a new payroll structure for software developer
@ -44,8 +40,7 @@
!record {model: hr.payroll.structure, id: hr_payroll_structure_softwaredeveloper0}:
code: SD
line_ids:
- account_id: account.a_expense
amount: 0.40000000000000002
- amount: 0.40000000000000002
amount_type: per
category_id: hr_payroll.HRA
code: HRA
@ -54,8 +49,7 @@
sequence: 5
total: 0.0
type: allowance
- account_id: account.a_expense
amount: 10000.0
- amount: 10000.0
amount_type: fix
category_id: hr_payroll.CA
code: CA
@ -64,8 +58,7 @@
sequence: 10
total: 0.0
type: allowance
- account_id: account.a_pay
amount: 10000.0
- amount: 10000.0
amount_type: fix
category_id: hr_payroll.PT
code: PT
@ -74,8 +67,7 @@
sequence: 15
total: 0.0
type: deduction
- account_id: account.a_pay
amount: 0.125
- amount: 0.125
amount_type: per
category_id: hr_payroll.PF
code: PF
@ -89,9 +81,8 @@
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
-