From 048fa15da93c0b1ff8ecc7a3af69dc4f94890f60 Mon Sep 17 00:00:00 2001
From: Kevin Deldycke <kevin@nexedi.com>
Date: Fri, 12 Aug 2005 18:11:02 +0000
Subject: [PATCH] Make getSubordination(), getGrade(), getRole() and so on
 working on Person through default career acquisition.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3581 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/PropertySheet/Person.py | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/product/ERP5/PropertySheet/Person.py b/product/ERP5/PropertySheet/Person.py
index ff6117d98b..a33c7e2616 100755
--- a/product/ERP5/PropertySheet/Person.py
+++ b/product/ERP5/PropertySheet/Person.py
@@ -138,13 +138,14 @@ class Person:
     , 'acquisition_depends'      : None
     , 'mode'                     : 'w'
     },
-    { 'id'                  : 'career'
+    # Using an empty id generate automaticality getSubordination() and setSubordination()
+    #   methods on Person. These methods allow us to save subordination on the default career.
+    { 'id'                  : ''
     , 'storage_id'          : 'default_career'
-    , 'description'         : 'The current career step of a person.'
+    , 'description'         : 'The default career hold some important properties of a Person.'
     , 'type'                : 'content'
     , 'portal_type'         : ( 'Career', )
-    , 'acquired_property_id': ( 'title', 'description'
-                              , 'start_date', 'stop_date'
+    , 'acquired_property_id': ( 'start_date', 'stop_date'
                               , 'subordination', 'subordination_title', 'subordination_value'
                               , 'subordination_uid_list'
                               , 'collective_agreement_title', 'salary_coefficient'
@@ -152,6 +153,17 @@ class Person:
                               , 'salary_level', 'salary_level_title'
                               , 'grade', 'grade_title'
                               , 'role', 'role_title'
+                              )
+    , 'mode'                : 'w'
+    },
+    # The properties in here are hold on the default career,
+    #   but are not those that are blended with Person (contrary those above).
+    { 'id'                  : 'career'
+    , 'storage_id'          : 'default_career'
+    , 'description'         : 'Properties of the default career.'
+    , 'type'                : 'content'
+    , 'portal_type'         : ( 'Career', )
+    , 'acquired_property_id': ( 'title', 'description'
                               , 'function', 'function_title'
                               )
     , 'mode'                : 'w'
-- 
2.30.9