Search code examples
pythonodoo

How to load demonstration data after database creation ODOO


i have created the database without checking Load demonstration data. image
Now my code is failing to obtain demo_user on my tests :: As expected

user_demo = self.env.ref('base.user_demo')

ValueError: External ID not found in the system: base.user_demo

Now how can i load demonstration data


Solution

  • Well the answer is in your question, demonstration data is loaded only when a database is created with that "Load demonstration data" option.