Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
4697 Представления

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

Related Posts Ответы Просмотры Активность
0
июн. 21
2772
4
мая 24
12337
1
апр. 24
3024
0
нояб. 23
1852
1
сент. 23
1928