Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
4699 Vues

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
Ignorer

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

Meilleure réponse

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
Ignorer
Auteur

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

Publications associées Réponses Vues Activité
0
juin 21
2773
4
mai 24
12339
1
avr. 24
3027
0
nov. 23
1854
1
sept. 23
1932