Skip to Content
Menu
This question has been flagged
1 Reply
3795 Views

Hi,

I have an XML file through which I intend to load testing data. I have included it in  'demo' in the __manifest__.py file but the data does not get loaded into the database when I run tests.

If I include it in 'data' in __manifest__.py the data gets loaded but as I understand it should be included in 'demo' so that data is only available during test execution.

My query

product = self.env['product.product'].search([('default_code', '=', 'TEST0002')])

My command

./odoo-bin -c /etc/odoo-server.conf -d <db_name> -i <module_name>  --test-enable --stop-after-init --log-level=test

Avatar
Discard
Best Answer

Hello Huzaifa Qamer,

You are creating the demo data so it will only affect at the time of module installation. Once the app is installed it has no effect on demo data.

Thanks..

For More Information Contact us :- https://kanakinfosystems.com/odoo-development-services

Avatar
Discard
Related Posts Replies Views Activity
1
Jan 23
2434
0
Oct 22
835
0
Aug 22
3
2
Mar 22
11156
0
Dec 21
51