Am Dienstag, den 24.05.2005, 04:09 -0700 schrieb prabuddha ray:
> sorry,
>         i missed the xplanaition.
> i think this'll explain...
> <div tal:define= penalty   
> python:context.getPenalty(group_code=gcode,item_code=icode);
>  penaltylen python:test(len(penalty)==0)>
> 
> so not:penaltylen ensures that unit_cost is present for this row.
> 
> anyway i think this worked finally :
>  <td>
>   <span tal:condition="not:penaltylen">
>   <span tal:define="unit_cost python:penalty[0].unit_cost;
>     global sum python:sum+unit_cost" tal:content="unit_cost"/>
>  </span>
> 
> <td><b tal:content="sum"></b></td></tr>

Why dont you write this as plain python code?
Python Scripts are made for that.



_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to