Commit 5a982ede authored by Jérome Perrin's avatar Jérome Perrin

add "default_career_reference" on Person documents for Employee Number


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21001 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fa34bccb
...@@ -57,5 +57,6 @@ class Career(Path): ...@@ -57,5 +57,6 @@ class Career(Path):
, PropertySheet.Task , PropertySheet.Task
, PropertySheet.Arrow , PropertySheet.Arrow
, PropertySheet.Path , PropertySheet.Path
, PropertySheet.Reference
, PropertySheet.Assignment , PropertySheet.Assignment
) )
...@@ -191,7 +191,8 @@ class Person: ...@@ -191,7 +191,8 @@ class Person:
, 'description' : 'The default career hold some properties of a Person.' , 'description' : 'The default career hold some properties of a Person.'
, 'type' : 'content' , 'type' : 'content'
, 'portal_type' : ( 'Career', ) , 'portal_type' : ( 'Career', )
, 'acquired_property_id': ( 'start_date', 'stop_date', 'title', 'description' , 'acquired_property_id': ( 'start_date', 'stop_date', 'title',
'description', 'reference'
, 'subordination', 'subordination_title', 'subordination_value' , 'subordination', 'subordination_title', 'subordination_value'
, 'subordination_uid_list', 'subordination_uid' , 'subordination_uid_list', 'subordination_uid'
, 'collective_agreement_title', 'salary_coefficient' , 'collective_agreement_title', 'salary_coefficient'
......
...@@ -508,11 +508,13 @@ class TestERP5Base(ERP5TypeTestCase): ...@@ -508,11 +508,13 @@ class TestERP5Base(ERP5TypeTestCase):
person.setCareerSalaryCoefficient(1) person.setCareerSalaryCoefficient(1)
person.setCareerCollectiveAgreementTitle('SYNTEC convention') person.setCareerCollectiveAgreementTitle('SYNTEC convention')
person.setCareerActivity('software') person.setCareerActivity('software')
person.setCareerReference('1234')
self.assertEquals(person.getCareerStopDate() , dummy_date2) self.assertEquals(person.getCareerStopDate() , dummy_date2)
self.assertEquals(person.getCareerStartDate() , dummy_date1) self.assertEquals(person.getCareerStartDate() , dummy_date1)
self.assertEquals(person.getCareerSalaryCoefficient() , 1) self.assertEquals(person.getCareerSalaryCoefficient() , 1)
self.assertEquals(person.getCareerCollectiveAgreementTitle(), 'SYNTEC convention') self.assertEquals(person.getCareerCollectiveAgreementTitle(), 'SYNTEC convention')
self.assertEquals(person.getCareerActivityTitle(), 'Software') self.assertEquals(person.getCareerActivityTitle(), 'Software')
self.assertEquals(person.getCareerReference(), '1234')
# Set & Check function # Set & Check function
function_categories = self.getCategoryList(base_category='function') function_categories = self.getCategoryList(base_category='function')
...@@ -605,6 +607,7 @@ class TestERP5Base(ERP5TypeTestCase): ...@@ -605,6 +607,7 @@ class TestERP5Base(ERP5TypeTestCase):
# Test getter with 'Career' prefix # Test getter with 'Career' prefix
self.assertEquals(person.getCareer() , default_career.getRelativeUrl()) self.assertEquals(person.getCareer() , default_career.getRelativeUrl())
self.assertEquals(person.getCareerTitle() , default_career.getTitle()) self.assertEquals(person.getCareerTitle() , default_career.getTitle())
self.assertEquals(person.getCareerReference(), default_career.getReference())
self.assertEquals(person.getCareerValue() , default_career) self.assertEquals(person.getCareerValue() , default_career)
self.assertEquals(person.getCareerDescription(), default_career.getDescription()) self.assertEquals(person.getCareerDescription(), default_career.getDescription())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment