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