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
#############################################################################
#
# 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>
# Kevin Deldycke <kevin_AT_nexedi_DOT_com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
......@@ -33,115 +34,127 @@ class Person:
"""
_properties = (
# Personal properties
{ 'id' : 'first_name',
'description' : '',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'last_name',
'description' : '',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'middle_name',
'description' : '',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'prefix',
'description' : '',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'suffix',
'description' : '',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'birthday',
'description' : '',
'type' : 'date',
'mode' : 'w' },
{ 'id' : 'social_code',
'description' : 'The social code of this person',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'partner_count',
'description' : '',
'type' : 'int',
'mode' : 'w' },
{ 'id' : 'child_count',
'description' : '',
'type' : 'int',
'mode' : 'w' },
# Compatibility with early releases
# Personnal properties
{ 'id' : 'first_name'
, 'description': ''
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'last_name'
, 'description': ''
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'middle_name'
, 'description': ''
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'prefix'
, 'description': ''
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'suffix'
, 'description': ''
, 'type' : 'string'
, 'mode' : 'w'
},
{ 'id' : 'birthday'
, 'description': ''
, 'type' : 'date'
, 'mode' : 'w'
},
{ 'id' : 'social_code'
, 'description': 'The social code of this person'
, 'type' : 'string'
, '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' },
# 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' },
{ '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'
},
)
_categories = ( 'region', 'gender', 'product_line', 'subordination', 'nationality', 'marital_status',
# Acquired Categories via Career
'grade', 'role',
_categories = ( 'region', 'gender', 'product_line', 'nationality', 'marital_status'
# Virtual Categories
'source_region', 'destination_region', )
, 'source_region', 'destination_region' # What is the purpose of these two categories ?
)
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