[Zope] External Methods nightmare
Felipe Alvarez Harnecker
felipe.alvarez@qlsoft.cl
Mon, 9 Apr 2001 14:32:33 -0400 (CLT)
Farrell, Troy writes:
> Please be more specific.
OK. You asked for it :-)
Method A
---------
( this is prueba_dtml )
<dtml-var "ordenVisitaImpresion_py(objeto=3D60)">
Method B
--------
( this is ordenVisitaImpresion_py )
def ordenVisitaImpresion(self,objeto):
"""A simple external method."""
encabezado=3Dself.encabezadoImpresion_dtml(objeto=3Dobjeto)
return encabezado
Method C
---------
( this is encabezadoImpresion_dtml )
<h1>Orden de Visita</h1>
<dtml-in "encabezadoDesreferenciado_sql(objeto=3Dobjeto)">
<b>Fecha: </b> <dtml-var fecha_emision> <b>&dtml-tipo_operacion;</b> =
<b>Folio:</b> &dtml-objeto;
<br>
<b>Al Se=F1or: </b> &dtml-nombre_cliente; &dtml-apellido_paterno_client=
e; &dtml-apellido_materno_cliente; <b>Dir: </b> &dtml-direccion_client=
e;
<br>
<b>RUT: </b> &dtml-rut_cliente; <b>FONO: </b> &dtml-telefono; <b>FAX: =
</b>&dtml-fax;
=20
</dtml-in>
<hr>
Method D
---------
( this is encabezadoDesreferenciado_sql )
select
numero AS objeto,
tipo_operacion,
corredor,
t2.nombre AS nombre_corredor,
ejecutivo,
t3.nombre AS nombre_ejecutivo,
t3.apellido_paterno AS apellido_paterno_ejecutivo,
t3.apellido_materno AS apellido_materno_ejecutivo,
t3.email AS email_corredor,
t4.nombre AS nombre_cliente,
t4.rut || '-' || t4.digito_rut AS rut_cliente,
t4.apellido_paterno AS apellido_paterno_cliente,
t4.apellido_materno AS apellido_materno_cliente,
t4.direccion AS direccion_cliente,
t4.telefono[1] AS telefono,=20
t4.fax[1] AS fax,
t4.email AS email_cliente,
fecha_emision
from
orden_visita t1,
corredor t2,
ejecutivo t3,
cliente t4
where
t1.corredor =3D t2.rut AND
t1.ejecutivo =3D t3.rut AND
t1.cliente =3D t4.rut AND
numero =3D &dtml-objeto;
---------------------
So calling=20
prueba_dtml=20
gives=20
Zope Error
Zope has encountered an error while publishing this reso=
urce.=20
Error Type: NameError
Error Value: encabezadoDesreferenciado_sql
Cheers.
--=20
______________________________________________________
Felipe Alvarez Harnecker. QlSoftware.
=09=09
Tels. 665.99.41 - 09.874.60.17
e-mail: felipe.alvarez@qlsoft.cl
http://qlsoft.cl/
http://ql.cl/
______________________________________________________