تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
4886 أدوات العرض

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
يونيو 21
2887
4
مايو 24
12685
1
أبريل 24
3313
0
نوفمبر 23
2034
1
سبتمبر 23
2120