Ejemplo n.º 1
0
 def getReleasesVocab(self):
     """
     Get the releases available to the tracker as a DisplayList.
     """
     items = self.getAvailableReleases()
     vocab = atapi.DisplayList()
     for item in items:
         vocab.add(item, item)
     return vocab
Ejemplo n.º 2
0
 def getIssueWorkflowStates(self):
     """Get a DisplayList of the workflow states available on issues."""
     portal_workflow = getToolByName(self, 'portal_workflow')
     chain = portal_workflow.getChainForPortalType('PoiIssue')
     workflow = getattr(portal_workflow, chain[0])
     states = getattr(workflow, 'states')
     vocab = atapi.DisplayList()
     for id, state in states.items():
         vocab.add(id, state.title)
     return vocab.sortedByValue()
Ejemplo n.º 3
0
#
#  ploneformgen = PloneFormGen object
#
# Return the amount to be payed by the end user as a float number

assert False, "Please complete your script"
"""

MiPagoAdapterSchema = formMailerAdapterSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField('mipago_cpr_code',
                      languageIndependent=True,
                      vocabulary=atapi.DisplayList([
                          ('9050299', _(u'9050299: Notebook 60, modality 1')),
                          ('9052180', _(u'9052180: Notebook 60, modality 2')),
                          ('9050794', _(u'9050794: Notebook 57')),
                      ]),
                      required=True,
                      storage=atapi.AnnotationStorage(),
                      searchable=False,
                      widget=atapi.SelectionWidget(
                          description='',
                          label=_('Enter the CPR code of this payment'),
                          size=7)),
    atapi.StringField(
        'mipago_format',
        languageIndependent=True,
        vocabulary=atapi.DisplayList([
            ('502', _(u'502: Notebook 60, modality 1, short format')),
            ('521', _(u'521: Notebook 60, modality 2, short format')),