[Erp5-report] r15830 - /erp5/trunk/products/ERP5/Document/Ticket.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Aug 27 14:52:39 CEST 2007


Author: jp
Date: Mon Aug 27 14:52:38 2007
New Revision: 15830

URL: http://svn.erp5.org?rev=15830&view=rev
Log:
New class inheritance.

Modified:
    erp5/trunk/products/ERP5/Document/Ticket.py

Modified: erp5/trunk/products/ERP5/Document/Ticket.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Ticket.py?rev=15830&r1=15829&r2=15830&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Ticket.py (original)
+++ erp5/trunk/products/ERP5/Document/Ticket.py Mon Aug 27 14:52:38 2007
@@ -30,12 +30,22 @@
 
 from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
 from Products.ERP5.Document.Movement import Movement
+from Products.ERP5.Document.Project import Project
 
-class Ticket(Movement):
+class Ticket(Movement, Project):
     """
     A Ticket allows to track a sales process involving
     multilple Person and Organisations. It is a placeholder for
     documents, events, etc.
+
+    Tickets behave both a movements and as projects:
+
+    - as movements because they relate to an amount
+      of resource exchanged between multiple parties
+
+    - as a project because it acts as a reporting
+      node for other movements (ex. accounting,
+      task reports)
     """
 
     meta_type = 'ERP5 Ticket'
@@ -57,14 +67,15 @@
                       , PropertySheet.Arrow
                       , PropertySheet.Price
                       , PropertySheet.Movement
+                      , PropertySheet.Amount
+                      , PropertySheet.Ticket
                       )
 
-    security.declareProtected(Permissions.AccessContentsInformation, 
-                              'isAccountable')
+    security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable')
     def isAccountable(self):
       """
         Returns 1 if this needs to be accounted
         Only account movements which are not associated to a delivery
         Whenever delivery is there, delivery has priority
       """
-      return 1
+      return 1




More information about the Erp5-report mailing list