Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4742 Lượt xem

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 ?

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 21
2797
4
thg 5 24
12377
1
thg 4 24
3065
0
thg 11 23
1875
1
thg 9 23
1974