Hello everybody, basically I want to pre fill Formulario's fields with some 
specific values. Formulario is a class which is related with other class 
called "Paciente". With specific values I mean I want to create a new 
Formulario with the last entered values of a Formulario's record. Supose 
you have this case:

1 - Create a new Paciente
2 - Create a new Formulario and fill some fields
3 - Create other Formulario. Here I am trying to get the already filled 
fields filled. This is what I want to achieve.

That classes are defined as follows:

class Formulario(Workflow, ModelSQL,ModelView):
'Formulario'
_name = 'cefiro.formulario'
_description = __doc__
_rec_name = 'fecha'

paciente = fields.Many2One('cefiro.paciente','Paciente') # Don't understand 
why here is Many2One and the other was One2One
## Here I have more fields but I only put one here in order to simplify:
motivoPaciente1 = fields.Char(u'Motivo según el paciente (1)')

...

Formulario()

And the related class "Paciente" is declared as follows:

class Paciente(Persona,Workflow):
'Paciente'
_name = 'cefiro.paciente'
_description = __doc__

formularioInicial = fields.One2Many('cefiro.formulario', 'paciente', 
'Formulario Inicial') 

I was looking at this 
https://groups.google.com/forum/#!msg/tryton-dev/Kwwp-SHdP0M/tBXT1gKhrOIJ 
and trying to adapt to my situation field by field. I don't know if you can 
get this easier. Any suggestions are welcomed!

Thank you in advance

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/7a14fbb3-ec37-4812-bcd0-d565423b5c5f%40googlegroups.com.

Reply via email to