Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
4891 Tampilan

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
Buang

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

Jawaban Terbai

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
Buang
Penulis

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

Post Terkait Replies Tampilan Aktivitas
0
Jun 21
2888
4
Mei 24
12686
1
Apr 24
3316
0
Nov 23
2035
1
Sep 23
2123