The problem is solved. Apparently, the key was that in the feature class created from event layer the projection has to be defined before executing the command gp.Project_management.
As a sum up of the thread, I would stress that exporting models to py does need editing and revision after the automatic code generation. For instance, you have to specify to overwrite in the gp object, and so on.
So the 'export to script' action in model builder it is a good tool, but it does not guarantee that if the model works the generated script will work straightforward.
Thanks to those who responded.
See below the right code:
# G_A_H2.py
# Created on: jue may 23 2013 09:30:15
# (generated by ArcGIS/ModelBuilder)
# ---------------------------------------------------------------------------
# Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
gp.OverwriteOutput = 1
# Load required toolboxes...
gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
# Local variables...
G_A_H_event = "HERE GOES THE EVENT TABLE"
sde_sde_GIS_AH = "ORIGINAL TABLE WITH XY DATA"
G_A_H_Prjdefine = "FEAT CLASS GENERATED FROM EVENT TABLE"
G_A_H_Project = "FEAT CLASS PROJECTED"
Aprovechamientos_Hidroelectricos = "FINAL RESULT"
G_A_H_Prjdefine2 = "INTERMEDIATE STEP, FOR PROJECT DEFINITION"
# Process: Make XY Event Layer...
gp.MakeXYEventLayer_management(sde_sde_GIS_AH, "CE_UTM_X", "CE_UTM_Y", G_A_H_event, "")
# Process: Copy Features...
gp.CopyFeatures_management(G_A_H_event, G_A_H_Prjdefine, "", "0", "0", "0")
# Process: Define Projection...
gp.DefineProjection_management(G_A_H_Prjdefine, "PROJCS['ED_1950_UTM_Zone_29N',GEOGCS['GCS_European_1950',DATUM['D_European_1950',SPHEROID['International_1924',6378388.0,297.0]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-9.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
# Process: Project...
gp.Project_management(G_A_H_Prjdefine2, G_A_H_Project, "PROJCS['ETRS_1989_UTM_Zone_29N',GEOGCS['GCS_ETRS_1989',DATUM['D_ETRS_1989',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-9.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]", "ED_1950_To_ETRS_1989_12_NTv2_Spain_v2", "PROJCS['ED_1950_UTM_Zone_29N',GEOGCS['GCS_European_1950',DATUM['D_European_1950',SPHEROID['International_1924',6378388.0,297.0]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-9.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
# Process: Copy Features (2)...
gp.CopyFeatures_management(G_A_H_Project, Aprovechamientos_Hidroelectricos, "DEFAULTS", "0", "0", "0")