2015-01-26 14:32 GMT+01:00 Rafael do Nascimento Júnior <[email protected]>:

> Why this domain does not work?
>
> relation = fields.Many2One('party.relation.all', 'Relation',
> domain=[('from_', '=', 'work_order.party')])
>

You cannot use "dot" notation (i.e. work_order.party) in the value part of
a domain.

You got to either find another way to define your constraint, or add a
Function field which you can use in the domain :

work_order_party = fields.Function(fields.Many2One('party.party',
    ....))

relation = fields.Many2One('party.relation.all', 'Relation',
domain=[('from_', '=', Eval('work_order_party'))],
    depends=['work_order_party'])

Jean Cavallo
*Coopengo*

Reply via email to