[Zope] External Methods nightmare
Farrell, Troy
troy.farrell@wcg.com
Tue, 10 Apr 2001 12:15:05 -0500
Your dtml method is not able to acquire the sql method. To help with =
this,
we need to see the folder object structure. The problem isn't inside =
the
external method.
Troy
-----Original Message-----
From: Felipe Alvarez Harnecker [mailto:felipe@qlsoft.cl]
Sent: Monday, April 09, 2001 1:33 PM
To: Farrell, Troy
Cc: zope@zope.org
Subject: RE: [Zope] External Methods nightmare
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_cliente;
&dtml-apellido_materno_cliente; <b>Dir: </b> &dtml-direccion_cliente;
<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 =
resource.
Error Type: NameError
Error Value: encabezadoDesreferenciado_sql
Cheers.