Commit bee7348e authored by Kevin Deldycke's avatar Kevin Deldycke

Better properties acquisition on Careers

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3571 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 08f99fc8
No related merge requests found
############################################################################# #############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com> # Jean-Paul Smets-Solanes <jp@nexedi.com>
# Kevin Deldycke <kevin_AT_nexedi_DOT_com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential # programmers who take the whole responsability of assessing all potential
...@@ -28,120 +29,132 @@ ...@@ -28,120 +29,132 @@
class Person: class Person:
""" """
Person properties and categories Person properties and categories
""" """
_properties = ( _properties = (
# Personal properties # Personnal properties
{ 'id' : 'first_name', { 'id' : 'first_name'
'description' : '', , 'description': ''
'type' : 'string', , 'type' : 'string'
'mode' : 'w' }, , 'mode' : 'w'
{ 'id' : 'last_name', },
'description' : '', { 'id' : 'last_name'
'type' : 'string', , 'description': ''
'mode' : 'w' }, , 'type' : 'string'
{ 'id' : 'middle_name', , 'mode' : 'w'
'description' : '', },
'type' : 'string', { 'id' : 'middle_name'
'mode' : 'w' }, , 'description': ''
{ 'id' : 'prefix', , 'type' : 'string'
'description' : '', , 'mode' : 'w'
'type' : 'string', },
'mode' : 'w' }, { 'id' : 'prefix'
{ 'id' : 'suffix', , 'description': ''
'description' : '', , 'type' : 'string'
'type' : 'string', , 'mode' : 'w'
'mode' : 'w' }, },
{ 'id' : 'birthday', { 'id' : 'suffix'
'description' : '', , 'description': ''
'type' : 'date', , 'type' : 'string'
'mode' : 'w' }, , 'mode' : 'w'
{ 'id' : 'social_code', },
'description' : 'The social code of this person', { 'id' : 'birthday'
'type' : 'string', , 'description': ''
'mode' : 'w' }, , 'type' : 'date'
{ 'id' : 'partner_count', , 'mode' : 'w'
'description' : '', },
'type' : 'int', { 'id' : 'social_code'
'mode' : 'w' }, , 'description': 'The social code of this person'
{ 'id' : 'child_count', , 'type' : 'string'
'description' : '', , 'mode' : 'w'
'type' : 'int', },
'mode' : 'w' }, { 'id' : 'partner_count'
, 'description': ''
, 'type' : 'int'
, 'mode' : 'w'
},
{ 'id' : 'child_count'
, 'description': ''
, 'type' : 'int'
, 'mode' : 'w'
},
# Contact fields
{ 'id' : 'address'
, 'storage_id' : 'default_address'
, 'description' : 'The current address of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Address', )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultAddressValue'
, 'acquisition_depends' : None
, 'alt_accessor_id' : ( 'getCareerDefaultAddressValue', )
, 'mode' : 'w'
},
{ 'id' : 'telephone'
, 'storage_id' : 'default_telephone'
, 'description' : 'The current telephone of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Telephone', )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultTelephoneValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'fax'
, 'storage_id' : 'default_fax'
, 'description' : 'The current fax of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Fax', )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultFaxValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'email'
, 'storage_id' : 'default_email'
, 'description' : 'The current email of the person'
, 'type' : 'content'
, 'portal_type' : ( 'Email', )
, 'acquisition_base_category': ( 'subordination', )
, 'acquisition_portal_type' : ( 'Organisation', )
, 'acquisition_copy_value' : 0
, 'acquisition_mask_value' : 1
, 'acquisition_sync_value' : 0
, 'acquisition_accessor_id' : 'getDefaultEmailValue'
, 'acquisition_depends' : None
, 'mode' : 'w'
},
{ 'id' : 'career'
, 'storage_id' : 'default_career'
, 'description' : 'The current career step of a person.'
, 'type' : 'content'
, 'portal_type' : ( 'Career', )
, 'acquired_property_id': ( 'title', 'description'
, 'start_date', 'stop_date'
, 'subordination', 'subordination_title', 'subordination_value'
, 'subordination_uid_list'
, 'grade', 'skill_list', 'role', 'function'
, 'collective_agreement_title', 'salary_coefficient', 'salary_level'
)
, 'mode' : 'w'
},
)
# Compatibility with early releases _categories = ( 'region', 'gender', 'product_line', 'nationality', 'marital_status'
# Virtual Categories
# Contact fields , 'source_region', 'destination_region' # What is the purpose of these two categories ?
{ 'id' : 'address', )
'storage_id' : 'default_address',
'description' : 'The current address of the person',
'type' : 'content',
'portal_type' : ('Address'),
'acquisition_base_category' : ('subordination', ),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultAddressValue',
'acquisition_depends' : None,
'alt_accessor_id' : ('getCareerDefaultAddressValue',),
'mode' : 'w' },
{ 'id' : 'telephone',
'storage_id' : 'default_telephone',
'description' : 'The current telephone of the person',
'type' : 'content',
'portal_type' : ('Telephone'),
'acquisition_base_category' : ('subordination', ),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultTelephoneValue',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'fax',
'storage_id' : 'default_fax',
'description' : 'The current fax of the person',
'type' : 'content',
'portal_type' : ('Fax'),
'acquisition_base_category' : ('subordination', ),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultFaxValue',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'email',
'storage_id' : 'default_email',
'description' : 'The current email of the person',
'type' : 'content',
'portal_type' : ('Email'),
'acquisition_base_category' : ('subordination', ),
'acquisition_portal_type' : ('Organisation',),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 1,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getDefaultEmailValue',
'acquisition_depends' : None,
'mode' : 'w' },
# Subordination properties
{ 'id' : 'career',
'storage_id' : 'default_career',
'description' : 'The current career step of a person.',
'type' : 'content',
'portal_type' : ('Career'),
'acquired_property_id' : ('subordination_title', 'subordination', 'value_uids',
'subordination_uid_list',
'grade', 'skill_list', 'role','function',
),
'mode' : 'w' },
)
_categories = ( 'region', 'gender', 'product_line', 'subordination', 'nationality', 'marital_status',
# Acquired Categories via Career
'grade', 'role',
# Virtual Categories
'source_region', 'destination_region', )
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