Commit d3234d25 authored by Vincent Pelletier's avatar Vincent Pelletier

Improve coding style.

Improve docstrings.
Add descriptions to properties that misses them.
Add warnings on properties that should not be used.
Remove financial_year_stop_date from Organisation, because accounting period replaces it.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6869 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cb019bef
...@@ -28,12 +28,15 @@ ...@@ -28,12 +28,15 @@
class Account: class Account:
""" """
Organisation properties and categories Account properties and categories
""" """
_properties = ( _properties = (
{ 'id' : 'is_credit_account', { 'id' : 'is_credit_account', # XXX: this property should be
'description' : 'Some account are', # named diferently : an account can
# be naturally debitor, creditor,
# or none of those
'description' : 'Some accounts are',
'type' : 'boolean', 'type' : 'boolean',
'mode' : 'w' , 'mode' : 'w' ,
'default' : 0 }, 'default' : 0 },
......
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
class AccountingPreference: class AccountingPreference:
""" """
User Preferences for erp5_accounting User Preferences for erp5_accounting.
Contains all preferences (see portal_preferences) relative to accounting.
""" """
_properties = ( _properties = (
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
class Alarm: class Alarm:
""" """
Properties which allow to define a generic Alarm. Properties which allow to define a generic Alarm.
An alarm can be used to trigger an action periodically.
""" """
_properties = ( _properties = (
......
...@@ -35,7 +35,6 @@ class Amortisation: ...@@ -35,7 +35,6 @@ class Amortisation:
These properties are applied to an Immobilisation Movement or to an Item These properties are applied to an Immobilisation Movement or to an Item
TODO: TODO:
- rename categories for more genericity (input_acount -> input) - rename categories for more genericity (input_acount -> input)
""" """
......
...@@ -29,11 +29,16 @@ ...@@ -29,11 +29,16 @@
class AppliedRule: class AppliedRule:
""" """
AppliedRule AppliedRule
An AppliedRule makes the link between simulation movements it contains
and the rule that generated them.
""" """
_properties = ( _properties = (
{ 'id' : 'last_expand_simulation_state', { 'id' : 'last_expand_simulation_state',
'description' : '', 'description' : 'Contains the id of the simulation state when the '\
'object was last expanded (in order to avoid '\
'recalculation)',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
) )
......
...@@ -28,7 +28,10 @@ ...@@ -28,7 +28,10 @@
class BusinessTemplate: class BusinessTemplate:
""" """
Organisation properties and categories Business templates properties and categories
A business template contains all zope objects needed to add a given
functionnality to ERP5, like accounting or pdf rendering.
""" """
_properties = ( _properties = (
......
...@@ -34,10 +34,10 @@ class DefaultSupply: ...@@ -34,10 +34,10 @@ class DefaultSupply:
_properties = ( _properties = (
{ 'id' : 'supply_line', { 'id' : 'supply_line',
'storage_id' : 'default_supply_line', 'storage_id' : 'default_supply_line',
'description' : '', 'description' : '',
'type' : 'content', 'type' : 'content',
'portal_type' : 'Supply Line', 'portal_type' : 'Supply Line',
'acquired_property_id' : ('base_price','id','priced_quantity','price_currency', 'acquired_property_id' : ('base_price','id','priced_quantity','price_currency',
'source','destination','quantity_step','priced_quantity', 'source','destination','quantity_step','priced_quantity',
'start_date','stop_date','start_date_range_max', 'start_date','stop_date','start_date_range_max',
......
...@@ -33,15 +33,15 @@ class GeographicAddress: ...@@ -33,15 +33,15 @@ class GeographicAddress:
_properties = ( _properties = (
{ 'id' : 'street_address', { 'id' : 'street_address',
'description' : '', 'description' : 'Street address.',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'city', { 'id' : 'city',
'description' : '', 'description' : 'City name.',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'zip_code', { 'id' : 'zip_code',
'description' : '', 'description' : 'Zip code.',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
) )
......
...@@ -34,32 +34,32 @@ class MailMessage: ...@@ -34,32 +34,32 @@ class MailMessage:
_properties = ( _properties = (
{ 'id' : 'subject', { 'id' : 'subject',
'description' : '', 'description' : 'Mail subject, extracted from header.',
'type' : 'string', 'type' : 'string',
'default' : '', 'default' : '',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'date', { 'id' : 'date',
'description' : '', 'description' : 'Mail send date, extracted from header.',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'to', { 'id' : 'to',
'description' : '', 'description' : 'Destination email address, extracted from header.',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'reply_to', { 'id' : 'reply_to',
'description' : '', 'description' : 'Reply to email address, extracted from header.',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'sender', { 'id' : 'sender',
'description' : '', 'description' : 'Sender email address, extracted from header.',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'body', { 'id' : 'body',
'description' : '', 'description' : 'Mail body.',
'type' : 'text', 'type' : 'text',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'header', { 'id' : 'header',
'description' : '', 'description' : 'Mail header as received.',
'type' : 'text', 'type' : 'text',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'other_info', { 'id' : 'other_info',
......
...@@ -102,7 +102,7 @@ class Organisation: ...@@ -102,7 +102,7 @@ class Organisation:
# Acquisition # Acquisition
{ 'id' : 'address', { 'id' : 'address',
'storage_id' : 'default_address', 'storage_id' : 'default_address',
'description' : 'The organisations this persons works for', 'description' : 'The default address of this organisations',
'type' : 'content', 'type' : 'content',
'portal_type' : ('Address'), 'portal_type' : ('Address'),
'acquisition_base_category' : ('region', ), 'acquisition_base_category' : ('region', ),
...@@ -141,7 +141,7 @@ class Organisation: ...@@ -141,7 +141,7 @@ class Organisation:
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'fax', { 'id' : 'fax',
'storage_id' : 'default_fax', 'storage_id' : 'default_fax',
'description' : 'The organisations this persons works for', 'description' : 'The defaut fax phone number for this organisation',
'type' : 'content', 'type' : 'content',
'portal_type' : ('Fax'), 'portal_type' : ('Fax'),
'acquisition_base_category' : ('region', ), 'acquisition_base_category' : ('region', ),
...@@ -154,7 +154,7 @@ class Organisation: ...@@ -154,7 +154,7 @@ class Organisation:
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'email', { 'id' : 'email',
'storage_id' : 'default_email', 'storage_id' : 'default_email',
'description' : 'The organisations this persons works for', 'description' : 'The default email address for this organisation',
'type' : 'content', 'type' : 'content',
'portal_type' : ('Email'), 'portal_type' : ('Email'),
'acquisition_base_category' : ('region', ), 'acquisition_base_category' : ('region', ),
...@@ -165,15 +165,10 @@ class Organisation: ...@@ -165,15 +165,10 @@ class Organisation:
'acquisition_accessor_id' : 'getDefaultEmailValue', 'acquisition_accessor_id' : 'getDefaultEmailValue',
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
# Amortisation
{ 'id' : 'financial_year_stop_date',
'description' : 'The date which ends the organisation financial year',
'type' : 'date',
'mode' : 'w' },
) )
_categories = ( 'role', 'group', 'activity', 'skill', 'market_segment', 'region', _categories = ( 'role', 'group', 'activity', 'skill', 'market_segment', 'region',
'social_form', 'function', 'source', 'destination', 'source_section', 'social_form', 'function', 'source', 'destination', 'source_section',
'destination_section', 'price_currency', 'economical_class', 'site', 'destination_section', 'price_currency', 'economical_class', 'site',
# Virtual Categories # Virtual Categories
'source_region', 'destination_region', ) 'source_region', 'destination_region', )
\ No newline at end of file
...@@ -32,15 +32,15 @@ class PaySheet: ...@@ -32,15 +32,15 @@ class PaySheet:
""" """
_properties = ( _properties = (
{ 'id' : 'gross_salary', { 'id' : 'gross_salary', #XXX data duplication
'description' : '', 'description' : '',
'type' : 'float', 'type' : 'float',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'work_duration', { 'id' : 'work_duration',
'description' : '', 'description' : 'Duration of work.',
'type' : 'date', 'type' : 'date',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'advantage', { 'id' : 'advantage', #XXX data duplication
'description' : '', 'description' : '',
'type' : 'float', 'type' : 'float',
'mode' : 'w' }, 'mode' : 'w' },
......
...@@ -36,24 +36,24 @@ class Person: ...@@ -36,24 +36,24 @@ class Person:
_properties = ( _properties = (
# Personnal properties # Personnal properties
{ 'id' : 'password' { 'id' : 'password'
, 'description': '' , 'description': 'Cleartext password.'
, 'type' : 'string' , 'type' : 'string'
, 'write_permission' : 'Set own password' , 'write_permission' : 'Set own password'
, 'read_permission' : 'Manage users' , 'read_permission' : 'Manage users'
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'first_name' { 'id' : 'first_name'
, 'description': '' , 'description': 'First name.'
, 'type' : 'string' , 'type' : 'string'
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'last_name' { 'id' : 'last_name'
, 'description': '' , 'description': 'Last name.'
, 'type' : 'string' , 'type' : 'string'
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'middle_name' { 'id' : 'middle_name'
, 'description': '' , 'description': 'Middle name.'
, 'type' : 'string' , 'type' : 'string'
, 'mode' : 'w' , 'mode' : 'w'
}, },
...@@ -63,17 +63,17 @@ class Person: ...@@ -63,17 +63,17 @@ class Person:
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'prefix' { 'id' : 'prefix'
, 'description': '' , 'description': 'Name prefix.'
, 'type' : 'string' , 'type' : 'string'
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'suffix' { 'id' : 'suffix'
, 'description': '' , 'description': 'Name suffix.'
, 'type' : 'string' , 'type' : 'string'
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'birthday' { 'id' : 'birthday'
, 'description': '' , 'description': 'Date of birth.'
, 'type' : 'date' , 'type' : 'date'
, 'mode' : 'w' , 'mode' : 'w'
}, },
...@@ -83,12 +83,12 @@ class Person: ...@@ -83,12 +83,12 @@ class Person:
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'partner_count' { 'id' : 'partner_count'
, 'description': '' , 'description': 'Number of familial partners.'
, 'type' : 'int' , 'type' : 'int'
, 'mode' : 'w' , 'mode' : 'w'
}, },
{ 'id' : 'child_count' { 'id' : 'child_count'
, 'description': '' , 'description': 'Number of childs.'
, 'type' : 'int' , 'type' : 'int'
, 'mode' : 'w' , 'mode' : 'w'
}, },
......
...@@ -29,23 +29,25 @@ ...@@ -29,23 +29,25 @@
class Telephone: class Telephone:
""" """
Properties for Telephone Objects Properties for Telephone Objects
Can be used for Fax numbers aswell.
""" """
_properties = ( _properties = (
{ 'id' : 'telephone_country', { 'id' : 'telephone_country',
'description' : '', 'description' : 'Country indicative number',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'telephone_area', { 'id' : 'telephone_area',
'description' : '', 'description' : 'Area indicative number',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'telephone_number', { 'id' : 'telephone_number',
'description' : '', 'description' : 'Telephone number minus indicatives',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'telephone_extension', { 'id' : 'telephone_extension',
'description' : '', 'description' : 'Telephone number extension',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'w' },
) )
......
...@@ -33,7 +33,7 @@ class Url: ...@@ -33,7 +33,7 @@ class Url:
_properties = ( _properties = (
{ 'id' : 'url_string', { 'id' : 'url_string',
'description' : 'demo of url creation stuff within 15 minutes', 'description' : 'url value',
'type' : 'string', 'type' : 'string',
'mode' : 'w' 'mode' : 'w'
}, },
......
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