24 May
2005
24 May
'05
11:46 a.m.
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.