From 5a982ede592990d4df09901351d007a8dadb381a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 16 May 2008 15:18:51 +0000
Subject: [PATCH] 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
---
 product/ERP5/Document/Career.py      | 1 +
 product/ERP5/PropertySheet/Person.py | 3 ++-
 product/ERP5/tests/testERP5Base.py   | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/Document/Career.py b/product/ERP5/Document/Career.py
index 279ad3a057..0d711eea21 100644
--- a/product/ERP5/Document/Career.py
+++ b/product/ERP5/Document/Career.py
@@ -57,5 +57,6 @@ class Career(Path):
                       , PropertySheet.Task
                       , PropertySheet.Arrow
                       , PropertySheet.Path
+                      , PropertySheet.Reference
                       , PropertySheet.Assignment
                       )
diff --git a/product/ERP5/PropertySheet/Person.py b/product/ERP5/PropertySheet/Person.py
index 960045aee5..2ea3506b02 100644
--- a/product/ERP5/PropertySheet/Person.py
+++ b/product/ERP5/PropertySheet/Person.py
@@ -191,7 +191,8 @@ class Person:
     , 'description'         : 'The default career hold some properties of a Person.'
     , 'type'                : 'content'
     , '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_uid_list', 'subordination_uid'
                               , 'collective_agreement_title', 'salary_coefficient'
diff --git a/product/ERP5/tests/testERP5Base.py b/product/ERP5/tests/testERP5Base.py
index 496879bbb7..44a75f7708 100644
--- a/product/ERP5/tests/testERP5Base.py
+++ b/product/ERP5/tests/testERP5Base.py
@@ -508,11 +508,13 @@ class TestERP5Base(ERP5TypeTestCase):
     person.setCareerSalaryCoefficient(1)
     person.setCareerCollectiveAgreementTitle('SYNTEC convention')
     person.setCareerActivity('software')
+    person.setCareerReference('1234')
     self.assertEquals(person.getCareerStopDate()                , dummy_date2)
     self.assertEquals(person.getCareerStartDate()               , dummy_date1)
     self.assertEquals(person.getCareerSalaryCoefficient()       , 1)
     self.assertEquals(person.getCareerCollectiveAgreementTitle(), 'SYNTEC convention')
     self.assertEquals(person.getCareerActivityTitle(), 'Software')
+    self.assertEquals(person.getCareerReference(), '1234')
 
     # Set & Check function
     function_categories = self.getCategoryList(base_category='function')
@@ -605,6 +607,7 @@ class TestERP5Base(ERP5TypeTestCase):
     # Test getter with 'Career' prefix
     self.assertEquals(person.getCareer()           , default_career.getRelativeUrl())
     self.assertEquals(person.getCareerTitle()      , default_career.getTitle())
+    self.assertEquals(person.getCareerReference(), default_career.getReference())
     self.assertEquals(person.getCareerValue()      , default_career)
     self.assertEquals(person.getCareerDescription(), default_career.getDescription())
 
-- 
2.30.9