• Alexandre Boeglin's avatar
    Removed the CreditCard class. Modified the Coordinate class to allow using it · 5204504f
    Alexandre Boeglin authored
    as a portal type information.
    
    The Coordinate class now provides methods that allow to do all the
    "presentation" specific part of a Coordinate in a set of python scripts.
    
    For example, to add a CreditCard portal type information :
    - go to portal_types, choose 'Add ERP5 Type Information', select 'ERP5
      Coordinate' and name your new type 'Credit Card'
    - go to your newly created 'Credit Card' type definition, and add 'CreditCard'
      to its list of Property Sheets.
    - create a new form for your CreditCard : CreditCard_view and add a field
      named my_text to it.
    - create two scripts, which will interact with the 'my_text' field :
      - CreditCard_fromText(text) : used to analyse the text entered by the user,
        and fill in the object's properties accordingly.
      - CreditCard_asText() : used to return a user-readable aggregation of the
        object's properties.
    
    These two python scripts can use regular expressions to analyse the text
    entered by the user, using the object's methods getRegularExpressionFindAll
    and getRegularExpressionGroups for example.
    
    
    git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4051 20353a03-c40f-0410-a6d1-a30d3c3de9de
    5204504f
Coordinate.py 7.69 KB