Commit de0a3eae authored by Jean-Paul Smets's avatar Jean-Paul Smets

revision for Supply


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@861 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent da0b7e2f
...@@ -30,27 +30,63 @@ ...@@ -30,27 +30,63 @@
class Predicate: class Predicate:
""" """
Predicate properties and categories Predicate properties and categories
Predicate in ERP5 use a simplified form based on identity, range and
set and range operations
Other predicates must be implemented through scripts. Parameters
can be provides to scripts (this reduces duplication of code)
""" """
_properties = ( _properties = (
# Personal properties { 'id' : 'criterion_property',
'description' : 'The properties to test identity on',
'type' : 'tokens',
'default' : (),
'mode' : 'w' },
{ 'id' : 'membership_criterion_base_category',
'storage_id' : 'predicate_property', # Compatibility with legacy implementation
'description' : 'The base categories to test',
'type' : 'tokens',
'default' : (),
'mode' : 'w' },
{ 'id' : 'multimembership_criterion_base_category',
'description' : 'The base categories which allow multiple values and required AND test',
'type' : 'tokens',
'default' : (),
'mode' : 'w' },
{ 'id' : 'membership_criterion_category',
'storage_id' : 'predicate_value', # Compatibility with legacy implementation
'description' : 'The predicate categories',
'type' : 'lines',
'default' : (),
'mode' : 'w' },
{ 'id' : 'test_method_id',
'description' : 'A python method to implement additional tests',
'type' : 'string',
'mode' : 'w' },
{ 'id' : 'parameter_string',
'description' : 'A string defining default values for parameters (python syntax)',
'type' : 'string',
'mode' : 'w' },
# Compatibility with legacy implementation
{ 'id' : 'predicate_property', { 'id' : 'predicate_property',
'description' : 'The properties to use for the predicate', 'description' : 'The properties to use for the predicate',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'r' },
{ 'id' : 'predicate_operator', { 'id' : 'predicate_operator',
'description' : 'The operator to use for the predicate', 'description' : 'The operator to use for the predicate',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'r' },
{ 'id' : 'predicate_value', { 'id' : 'predicate_value',
'description' : 'The value to use for the predicate' \ 'description' : 'The value to use for the predicate' \
'this value can be multiple', 'this value can be multiple',
'type' : 'lines', 'type' : 'lines',
'mode' : 'w' }, 'mode' : 'r' },
{ 'id' : 'predicate_type', { 'id' : 'predicate_type',
'description' : 'The type of the value', 'description' : 'The type of the value',
'type' : 'string', 'type' : 'string',
'mode' : 'w' }, 'mode' : 'r' },
) )
...@@ -77,5 +77,11 @@ class Price: ...@@ -77,5 +77,11 @@ class Price:
'description' : 'Validity of the typical per unit price at which this resource can be supplied', 'description' : 'Validity of the typical per unit price at which this resource can be supplied',
'type' : 'date', 'type' : 'date',
'mode' : 'w' }, 'mode' : 'w' },
# They are incompatible with the multi company model
{ 'id' : 'quantity_range',
'description' : 'A list of quantity values which define acceptable ranges',
'type' : 'float',
'multivalued' : 1,
'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