label_msgid = "label_summary", rows = 15, i18n_domain = "plone", allow_file_upload = zconf.ATDocument.allow_document_upload), ), StringField( name='invoiceNumber', widget=StringWidget( label='Invoice number', description='The invoice number this hour is billed on.', i18n_domain='extropy', ), ), )) + BudgetSchema.copy() class ExtropyHours(BaseContent): """Hours track worked time. Each hour object represents a chunk of worked time.""" schema = ExtropyHoursSchema security = ClassSecurityInfo() security.declarePrivate('getExtropyParent') def getExtropyParent(self, metatype=None): """Gets the containg parent, if it is an ExtropyBase object. """ project_types = ['ExtropyProject', 'Contract'] for o in self.aq_chain: if o is not self:
), ), StringField( name='projectStatus', widget=StringWidget( label='Project Status', description='The current projetct status.', label_msgid='label_project_status', description_msgid='help_project_status', i18n_domain='extropy', size='60', ), ), )) + TimeSchema.copy() + BudgetSchema.copy() class ExtropyProject(ExtropyTracking, ExtropyBase, OrderedBaseFolder): """An Extropy Project contains all the information needed to manage a project.""" implements(IExtropyTracking, IExtropyBase) schema = ExtropyProjectSchema security = ClassSecurityInfo() _at_rename_after_creation = True security.declareProtected('View','getPhases') def getPhases(self): """Gets the list of phases.""" return self.objectValues(['ExtropyPhase'])
from AccessControl import ClassSecurityInfo from Products.Archetypes.public import * from Products.CMFCore import permissions from Products.CMFCore.utils import getToolByName from Products.Extropy.config import * from Products.Extropy.interfaces import IExtropyBase from Products.Extropy.interfaces import IExtropyTracking from Products.Extropy.content.ExtropyBase import ExtropyBase from Products.Extropy.content.ExtropyBase import TimeSchema,ExtropyBaseSchema, BudgetSchema from Products.Extropy.content.ExtropyTracking import ExtropyTracking ExtropyPhaseSchema = ExtropyBaseSchema.copy() + TimeSchema.copy() + BudgetSchema.copy() class ExtropyPhase(ExtropyTracking, ExtropyBase, BaseFolder): """A Package is a unit of work that contains a number of tasks. Aka. milestone in other systems.""" implements(IExtropyTracking, IExtropyBase) schema = ExtropyPhaseSchema _at_rename_after_creation = True security = ClassSecurityInfo() def getParticipants(self): """Gets the participants. """ parent = self.getExtropyParent()