Am Mon, 28 Nov 2011 22:52:03 +0100 schrieb Cédric Krier <[email protected]>: > On 28/11/11 21:25 +0100, Udo Spallek wrote: > > on the migration to 2.2 I have a problem with reverse domains. > > In my 1.8 code I could use a structure like this. But this no longer > > works in Tryton 2.2 (see ###): > > > > class Test(ModelSQL, ModelView): > > _name = 'test.test' > > > > contact_person = fields.Many2One('party.party', 'Contact > > Person', required=True, domain=[ > > ('party_type', '=', 'person'), > > > > ### The following clause does no longer work in 2.2 > > ### When I create a new party from within field contact_person, > > ### the field organization_members is filled with the correct > > ### party from the context [1] but I can not save the record. > > ### In the client, the field stays colored red like an > > ### unsatisfied required. > > > > ('organization_members', 'in', [Eval('party'),]), > > ], context={ > > 'organization_members': Eval('party'), > > }, states={ > > 'readonly': Not(Equal(Eval('state'), 'draft')), > > }, depends=['party', 'state']) > > For me, the issue is the implementation of the operator in in > domain_invertion. It works correctly with many2one fields but not with > xxx2many. > Here is a patch: http://codereview.tryton.org/186004
The patch works. Thank you.
signature.asc
Description: PGP signature
