Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLPeriodInfo.py   Products.BastionLedger(Download)
    def Title(self):
        return "%s - %s" % (self.aq_parent.getId(), self.getId())
 
    def _getObCreate(self, id):
        """
        # by definition, subsidiary ledgers only balance against their control
        # in the ledger ...
        if self.getId() == 'Ledger' and \
                (self.sum('balance') != 0 or self.sum('reporting_balance') != 0):
            icons = icons + ({'path': 'misc_/SiteErrorLog/error.gif',
        """
        try:
            return self.bastionLedger()._getOb(self.getId())
        except:
            pass
        """
        prev = self.prevPeriod()
        return prev and prev._getOb(self.getId()) or None
 
    def nextPeriodInfo(self):
        """
        return the period info for the period after this
        """
        next = self.nextPeriod()
        return next and next._getOb(self.getId()) or None