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

Rafael Monnerat rafael at nexedi.com
Fri Jun 6 14:25:21 CEST 2008


This was my work from long time ago, I committed it, but it's not setted 
as default on tasks.

I already saw your files on this list and I planned to merge some parts 
  soon.

Thanks,

Rafael Monnerat

Mikolaj Antoszkiewicz wrote:
> 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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Erp5-dev mailing list
> Erp5-dev at erp5.org
> http://mail.nexedi.com/mailman/listinfo/erp5-dev




More information about the Erp5-dev mailing list