Hello, someone know how to add a item to one context of a record of a model 
that have a field Many2One in such a way that it could be read from the records 
that belong to the first record?

I have something like this:

class OrdenDeTrabajo(ModelWorkflow, ModelSQL, ModelView):
    'Ordenes de Trabajo'
    _name = 'taller.ordendetrabajo'
    _description = __doc__
    _order_name="id"
    descriptions = 
fields.One2Many('taller.description','ordendetrabajo','Descripciones', 
states=STATES)
...

class Description(ModelSQL, ModelView):
    'descripciones de una orden'
    _name = 'taller.description'
    _description = __doc__
    #_rec_name="id"
    _order_name="id"

    ordendetrabajo = fields.Many2One('taller.ordendetrabajo','Orden de 
Trabajo',required=True, select=1, states=STATES)

I was try to add the parameter: context = "{'tipo_pintura':'BC'}", first in the 
field descriptions, and them in the field ordendetrabajo, but doesn't work.

Some idea?

Thanks

-- 
Juan Fernando Jaramillo
Gte Tecnología
MIG Internacional
www.miginternacional.com

Attachment: signature.asc
Description: Digital signature

Reply via email to