thank you so much for your detail explaination. i'm sorry, my fault for 
indentation, because to make it simple and straight to the point,  i take 
the code from the conditional, then remove the indentation (tab).
it works well now.

e.g. 
if request.args(-3) == 'invoice_header' and request.args(-2) == 
'invoice_detail.invoice_no':
invoice_links=[dict(header=T('Action'), 
body=lambda row: DIV(A(I(_class='icon-print'), _title=T("Print invoice"), 
_target="_blank", _class="button", 
_href=URL("print", "print_invoice", args=[row.invoice_no])), 
  A(I(_class='icon-envelope'), _title=T("Mail invoice"), 
_target="_blank", _class="button", 
_href="mailto:%s?subject=%s&body=http://%s/%s/print/print_invoice/%s"; 
% (", ".join(mail for mail in row.invoice_no.buyer.email), 'invoice 
deluxurywatch', 
request.env.http_host, request.application, row.invoice_no))
 )
)
   ]
else:
invoice_links=[dict(header=T('Action'), 
body=lambda row: DIV(A(I(_class='icon-print'), _title=T("Print invoice"), 
   _target="_blank", _class="button", 
   _href=URL("print", "print_invoice", args=[row.id])), 
 A(I(_class='icon-envelope'), _title=T("Mail invoice"), 
   _target="_blank", _class="button", 
   _href="mailto:%s?subject=%s&body=http://%s/%s/print/print_invoice/%s"; 
   % (", ".join(mail for mail in row.buyer.email), 'invoice deluxurywatch', 
   request.env.http_host, request.application, row.id))
)
)
   ]

thanks and best regards,
stifan
>
>  

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to