[Erp5-dev] [Erp5-report] r21367 - /erp5/trunk/products/ERP5/PropertySheet/

Mikolaj Antoszkiewicz mikolaj at erp5.pl
Fri Jun 6 13:21:40 CEST 2008


Hello,
Why the messages for the constraints have been left out? The standard 
error messages are big nad ugly :). Why not set here more user friendly 
ones?

> +class TaskConstraint:
> +    """
> +       Constraintsts For Task
> +    """
> +        
> +    _constraints = (
> +      {   'id'            : 'title_existence',
> +          'description'   : 'Title must be defined',
> +          'type'          : 'StringAttributeMatch',
> +          'title'         :  '^[^ ]',
> +      },
> +      { 'id'            : 'source',
> +        'description'   : 'Source must be defined',
> +        'type'          : 'CategoryMembershipArity',
> +        'min_arity'     : '1',
> +        'max_arity'     : '1',
> +        'portal_type'   : ('Person', 'Organisation', 'Category'),
> +        'base_category' : ('source',)
> +      },
In the RelationStringField for source and destination there's used a 
method getPortalNodeTypeList which returns only 'Person'.
Should there be three portal types (as above) listed explicitely in 
Portal Types attribute, or rather the method needs fixing?

> +      { 'id'            : 'destination',
> +        'description'   : 'Destination must be defined',
> +        'type'          : 'CategoryMembershipArity',
> +        'min_arity'     : '1',
> +        'max_arity'     : '1',
> +        'portal_type'   : ('Person', 'Organisation', 'Category'),
> +        'base_category' : ('destination',)
> +      },
> +      {   'id'            : 'start_date_existence',
> +          'description'   : 'Property start_date must be defined',
> +          'type'          : 'PropertyExistence',
> +          'start_date'    : None,
> +      },
> +      {   'id'            : 'stop_date_existence',
> +          'description'   : 'Property stop date must be defined',
> +          'type'          : 'PropertyExistence',
> +          'stop_date'    : None,
> +      },
> +
> +      { 'id'            : 'lines',
> +        'description'   : 'Lines must be defined',
> +        'type'          : 'ContentExistence',
> +        'portal_type'   : ('Task Line', 'Task Report Line' ),
> +      },
> +    )
> +  
> 
Mikolaj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3229 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080606/0527289c/attachment.bin>


More information about the Erp5-dev mailing list