Commit d8b193b1 authored by Guillaume Michon's avatar Guillaume Michon

Amortisation system generisation


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2883 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ffe2fa9f
This diff is collapsed.
This diff is collapsed.
......@@ -42,14 +42,35 @@ class Amortisation:
"""
_properties = (
{ 'id' : 'amortisation_beginning_price',
# Common properties
{ 'id' : 'amortisation_start_price',
'description' : 'The value to use to calculate the accounting amortisation movements (net of tax)',
'type' : 'float',
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getAmortisationBeginningPrice',
'acquisition_accessor_id' : 'getAmortisationStartPrice',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'disposal_price',
'description' : 'The estimated price at the end of the lifetime (net of tax)',
'type' : 'float',
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getDisposalPrice',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'durability',
'description' : 'The remaining durability of the item',
'type' : 'float',
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getDurability',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'amortisation_duration',
......@@ -72,27 +93,38 @@ class Amortisation:
'acquisition_accessor_id' : 'getImmobilisation',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'fiscal_coefficient',
'description' : 'The fiscal coefficient to use in degressive amortisation',
{ 'id' : 'vat', # XXX Naming problem according to JPS
'description' : 'The VAT at the beginning of the immobilisation period',
'type' : 'float',
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getFiscalCoefficient',
'acquisition_accessor_id' : 'getVat',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'vat', # XXX Naming problem according to JPS
'description' : 'The VAT at the beginning of the immobilisation period',
'type' : 'float',
{ 'id' : 'amortisation_method',
'description' : 'The amortisation method used for this particular immobilisation period',
'type' : 'string',
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getVat',
'acquisition_accessor_id' : 'getAmortisationMethod',
'acquisition_depends' : None,
'mode' : 'w' },
# Properties specific to each amortisation method
{ 'id' : 'degressive_coefficient',
'description' : 'The fiscal coefficient to use in degressive amortisation',
'type' : 'float',
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getDegressiveCoefficient',
'acquisition_depends' : None,
'mode' : 'w' },
)
_categories = ('input_account', 'output_account', 'immobilisation_account',
......
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