From d9ade7b4f60e989f1113a524b3899ee205b5a55b Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Tue, 21 Dec 2010 16:55:30 +0530 Subject: [PATCH] [IMP] hr_payroll: Improve YML test bzr revid: psi@tinyerp.co.in-20101221112530-c3el0a4hfone7qwo --- addons/hr_payroll/__openerp__.py | 6 +++--- addons/hr_payroll/test/payment_advice.yml | 7 +------ addons/hr_payroll/test/payroll_register.yml | 8 -------- addons/hr_payroll/test/payslip.yml | 19 +++++-------------- 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/addons/hr_payroll/__openerp__.py b/addons/hr_payroll/__openerp__.py index 0725e34f0f9..b305e6bf92b 100644 --- a/addons/hr_payroll/__openerp__.py +++ b/addons/hr_payroll/__openerp__.py @@ -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': [ diff --git a/addons/hr_payroll/test/payment_advice.yml b/addons/hr_payroll/test/payment_advice.yml index 2d9fb8465c5..c10ada27c56 100644 --- a/addons/hr_payroll/test/payment_advice.yml +++ b/addons/hr_payroll/test/payment_advice.yml @@ -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')], {}, {}) diff --git a/addons/hr_payroll/test/payroll_register.yml b/addons/hr_payroll/test/payroll_register.yml index 7327688d22a..8bc346a34e1 100644 --- a/addons/hr_payroll/test/payroll_register.yml +++ b/addons/hr_payroll/test/payroll_register.yml @@ -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. diff --git a/addons/hr_payroll/test/payslip.yml b/addons/hr_payroll/test/payslip.yml index ca204a62241..aa739d2c9a1 100644 --- a/addons/hr_payroll/test/payslip.yml +++ b/addons/hr_payroll/test/payslip.yml @@ -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 -