Skip to Content
Menú
This question has been flagged
2 Respostes
4748 Vistes

I tried to create a form with an empty recordset in a testing Method

f = Form(self.env['my.custom.model'])

When I execute my test I got the following error:

assert isinstance(domain, (list, tuple)), "Domains to normalize must have a 'domain' form: a list or tuple of domain components"
AssertionError: Domains to normalize must have a 'domain' form: a list or tuple of domain components

Any idea why ?

Avatar
Descartar

Creating Odoo Modules: https://goo.gl/cgJZr7

Best Answer

Hi Arnaud,

Please refer to this section to get an idea about creating a module.

https://www.odoo.com/documentation/13.0/howtos/backend.html#build-an-odoo-module

Hope this helps.

Avatar
Descartar
Autor

I created a module with a model class : 'my.custom.model'

I wrote: f = Form(self.env['my.custom.model']) in a Odoo test under the "tests" folder of the module

Related Posts Respostes Vistes Activitat
0
de juny 21
2806
4
de maig 24
12389
1
d’abr. 24
3074
0
de nov. 23
1883
1
de set. 23
1985