跳至内容
菜单
此问题已终结
2 回复
4882 查看

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 ?

形象
丢弃

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

最佳答案

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.

形象
丢弃
编写者

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

相关帖文 回复 查看 活动
0
6月 21
2884
4
5月 24
12660
1
4月 24
3285
0
11月 23
2032
1
9月 23
2117