Hello

I'm not sure if the definition in model fields is wrong or tests tool
doesn't support this domain.

== model ==

    shops = fields.Many2Many('sale.shop-res.user', 'user', 'shop', 'Shops')
    shop = fields.Many2One('sale.shop', 'Shop',
            domain=[('id', 'in', Eval('shops', []))]
    )

== test file ==

I add depend def:

    def test0006depends(self):
        '''
        Test depends.
        '''
        test_depends()

== Error ==

I get this error:

======================================================================
FAIL: test0006depends (__main__.SaleShopTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_sale_shop.py", line 36, in test0006depends
    test_depends()
  File "/home/resteve/src/trytond/trytond/tests/test_tryton.py", line
209, in test_depends
    list(encoder.fields - depends), mname, fname))
AssertionError: Missing depends ['shops'] in "res.user"."shop"
----------------------------------------------------------------------

If I delete the domain in shop field, depends test return ok.

-- 
tryton-dev@googlegroups.com mailing list

Reply via email to