how to redefine "source section" setter<br><br>my function "setSoureSection" is not calling when i change the source section value<br>i can call this function directly from the URL<br><br>pl see the attached file for complete code<br>
#############################################################<br><br> def setSourceSection(self, value=None):<br> """<br> """<br> self.source_section = value<br> self.calBalanceAvalibleInBudget()<br>
return<br><br> def calBalanceAvalibleInBudget(self):<br> """ Budget Balance<br> """<br> catalog = getToolByName(self, 'portal_catalog')<br><br> uid1 = self.getSourceSectionUid()<br>
result = catalog(uid=uid1)<br> if not len(result):<br> self.setBalanceAvalibleInBudget(0)<br> return 0<br> obj = result[0].getObject()<br> #obj.calBalanceAmount()<br>
val = obj.getBalanceAmount()<br> if not val:<br> self.setBalanceAvalibleInBudget(0)<br> return 0<br> out = int(val)<br> self.setBalanceAvalibleInBudget(out)<br> return out<br>
<br><br><br><br>