[REM] hr_payroll: removed unused yaml

bzr revid: mtr@mtr-20110609125516-fampkxgnwlsxtxmy
This commit is contained in:
mtr 2011-06-09 18:25:16 +05:30
parent f63c039f42
commit c2b9195d04
4 changed files with 1 additions and 157 deletions

View File

@ -59,8 +59,6 @@ Generic Payroll system.
],
'test': [
# 'test/payslip.yml',
# 'test/payment_advice.yml',
# 'test/payroll_register.yml',
# 'test/hr_payroll_report.yml',
],
'demo_xml': [

View File

@ -1,12 +1,5 @@
-
In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure
-
!python {model: hr.employee}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-salary_structure.'+format), 'wb+').write(data)
-
Print HR Payslip
-
@ -14,28 +7,4 @@
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)
-
Print Employee Salary Statement through wizard
-
!python {model: hr.payslip}: |
import time
ctx={}
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_payroll_employees_detail',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
-
Print Salary Register through wizard
-
!python {model: hr.payslip}: |
import time
ctx={}
ctx.update({'model': 'hr.payslip','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_payroll_year_salary',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)

View File

@ -1,59 +0,0 @@
-
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: !eval "'%s-%s-%s' %(datetime.now().year+1,datetime.now().month,datetime.now().day)"
date_start: !eval time.strftime('%Y-%m-%d')
name: reference
wage: 5000.0
wage_type_id: hr_contract.hr_contract_monthly_gross
type_id: hr_contract.hr_contract_type_emp
country_id: base.in
department_id: hr.dep_it
gender: male
marital: hr.hr_employee_marital_status_single
name: Richie
vehicle_distance: 0.0
-
I create a new payment advice record
-
!record {model: hr.payroll.advice, id: hr_payroll_advice_advice0}:
line_ids:
- amount: 5500.0
bysal: 5000.0
employee_id: 'hr_employee_richie0'
flag: C
name: Axis Bank
name: advice1
-
I confirmed the sheet by 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 is "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!')
-
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')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payroll-advice.'+format), 'wb+').write(data)

View File

@ -1,64 +0,0 @@
-
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: !eval "'%s-%s-%s' %(datetime.now().year+1,datetime.now().month,datetime.now().day)"
date_start: !eval time.strftime('%Y-%m-%d')
name: reference
wage: 5000.0
wage_type_id: hr_contract.hr_contract_monthly_gross
type_id: hr_contract.hr_contract_type_emp
country_id: base.in
department_id: hr.dep_it
gender: male
marital: hr.hr_employee_marital_status_single
name: Keith
vehicle_distance: 0.0
-
I create a payroll register record.
-
!record {model: hr.payroll.register, id: hr_payroll_register_payroll0}:
date: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d')"
line_ids:
- employee_id: hr_payroll.hr_employee_keith0
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!')
-
Print HR Payroll Register
-
!python {model: hr.payroll.register}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.hr.payroll.register.sheet').create(cr, uid, [ref('hr_payroll_register_payroll0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-register_report.'+format), 'wb+').write(data)