Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Issues when running tests
by
Isabelle RICHARD
Hi Francesco,
Regards,
You are talking about master data, but the product with the reference product.product_product_9 is a demo data.
It's only present in your database if you enabled the Demo Data option, when you created your database.
Data is defined in: https://github.com/odoo/odoo/blob/14.0/addons/product/data/product_demo.xml
Which is referred as a demo file in manifest: https://github.com/odoo/odoo/blob/14.0/addons/product/__manifest__.py#L48
Did you enable this?
Regards,
--
Isabelle RICHARD
Le mar. 26 mars 2024 à 20:57, Francesco Ballerini <notifications@odoo-community.org> a écrit :
Hello,I am trying to run tests in my Odoo instance by adding --test enable but I'm having some issues. I am not used to run tests so I'm probably just missing something.When I try to run tests for module sale_product_multi_add by launching command:python3 odoo-bin -c odoo.conf -d dbname -u sale_product_multi_add --test-enabletests immediately fails because `self.env.ref()` cannot read external ids for master-datas. You can see the complete log in attached .txtI have also tried to run the same command for module sale_product_brand_exception which also checks for master-data and I got the same error.It seems like an issue with the environment, but addons path is defined in odoo.conf and working well outside of tests. I have also tried to pass --addons-path parameter in the CLI command but the result didn't changed.I hope I have provided enough informations, if not, let me know.Do you have any suggestions?Thanks,Fra B._______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe