Commit 5389303f authored by Guillaume Michon's avatar Guillaume Michon

- Added some properties and categories

- Some renaming
- Modified acquisition portal type


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5883 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5ced9db0
...@@ -37,80 +37,77 @@ class Amortisation: ...@@ -37,80 +37,77 @@ class Amortisation:
TODO: TODO:
- rename categories for more genericity (input_acount -> input) - rename categories for more genericity (input_acount -> input)
- rename vat property
""" """
_properties = ( _properties = (
# Common properties
{ 'id' : 'amortisation_start_price', { 'id' : 'amortisation_start_price',
'description' : 'The value to use to calculate the accounting amortisation movements (net of tax)', 'description' : 'The value to use to calculate the accounting amortisation movements (net of tax)',
'type' : 'float', 'type' : 'float',
'acquisition_base_category' : ('parent',), 'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1, 'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getAmortisationStartPrice', 'acquisition_accessor_id' : 'getAmortisationStartPrice',
'acquisition_portal_type' : Expression('python:[]'),
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'extra_cost_price',
'description' : 'The extra costs to immobilise with the main price (net of tax)',
'type' : 'float',
'acquisition_base_category' : ('parent',),
'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getExtraCostPrice',
'acquisition_portal_type' : Expression('python:[]'),
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'disposal_price', { 'id' : 'disposal_price',
'description' : 'The estimated price at the end of the lifetime (net of tax)', 'description' : 'The estimated price at the end of the lifetime (net of tax)',
'type' : 'float', 'type' : 'float',
'acquisition_base_category' : ('parent',), 'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1, 'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getDisposalPrice', 'acquisition_accessor_id' : 'getDisposalPrice',
'acquisition_portal_type' : Expression('python:[]'),
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'durability', { 'id' : 'durability',
'description' : 'The remaining durability of the item', 'description' : 'The remaining durability of the item',
'type' : 'float', 'type' : 'float',
'acquisition_base_category' : ('parent',), 'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1, 'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getDurability', 'acquisition_accessor_id' : 'getDurability',
'acquisition_portal_type' : Expression('python:[]'),
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'amortisation_duration', { 'id' : 'amortisation_duration',
'description' : 'The remaining amortisation duration in months', 'description' : 'The remaining amortisation duration in months',
'type' : 'int', 'type' : 'int',
'acquisition_base_category' : ('parent',), 'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1, 'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getAmortisationDuration', 'acquisition_accessor_id' : 'getAmortisationDuration',
'acquisition_portal_type' : Expression('python:[]'),
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'immobilisation', { 'id' : 'immobilisation_vat',
'description' : 'The item is immobilised after the movement',
'type' : 'boolean',
'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getImmobilisation',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'vat', # XXX Naming problem according to JPS
'description' : 'The VAT at the beginning of the immobilisation period', 'description' : 'The VAT at the beginning of the immobilisation period',
'type' : 'float', 'type' : 'float',
'acquisition_base_category' : ('parent',), 'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1, 'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getVat', 'acquisition_accessor_id' : 'getImmobilisationVat',
'acquisition_portal_type' : Expression('python:[]'),
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'amortisation_method', { 'id' : 'amortisation_method',
'description' : 'The amortisation method used for this particular immobilisation period', 'description' : 'The amortisation method used for this particular immobilisation period',
'type' : 'string', 'type' : 'string',
'acquisition_base_category' : ('parent',), 'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1, 'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getAmortisationMethod', 'acquisition_accessor_id' : 'getAmortisationMethod',
'acquisition_portal_type' : Expression('python:[]'),
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
...@@ -119,14 +116,14 @@ class Amortisation: ...@@ -119,14 +116,14 @@ class Amortisation:
'description' : 'The fiscal coefficient to use in degressive amortisation', 'description' : 'The fiscal coefficient to use in degressive amortisation',
'type' : 'float', 'type' : 'float',
'acquisition_base_category' : ('parent',), 'acquisition_base_category' : ('parent',),
'acquisition_portal_type' : Expression('python: portal.getPortalItemTypeList()'),
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_mask_value' : 1, 'acquisition_mask_value' : 1,
'acquisition_accessor_id' : 'getDegressiveCoefficient', 'acquisition_accessor_id' : 'getDegressiveCoefficient',
'acquisition_portal_type' : Expression('python:[]'),
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
) )
_categories = ('input_account', 'output_account', 'immobilisation_account', _categories = ('input_account', 'output_account', 'immobilisation_account', 'amortisation_account',
'amortisation_account', 'depreciation_account', 'depreciation_account', 'extra_cost_account', 'monthly_amortisation_account',
'vat_account', 'amortisation_type') # XXX Some rename required 'immobilisation_vat_account') # XXX Some rename required
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