Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
8599 มุมมอง

How do i load demo data in an Odoo module? I have created an XML file with demo data. Given the file name in manifest.py file as value of 'demo' key. but it is not loading the data. when i give it for 'data' key, it is loading. Is there anything to do for loading the data?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,
To load demo data, when creating the db, the "Demo data" boolean has to be ticked, if not, demo data's wont be loaded in the db.

* Create a new db with Demo data ticked
* Now try installing your app and see





Thanks

อวตาร
ละทิ้ง
ผู้เขียน

Thank you for the help

ผู้เขียน

What if I created data.xml after creating a module? Can I add it without creating a new db?

just you need to upgrade the module in this case

คำตอบที่ดีที่สุด

If you create db via command line like using an ide for example, make sure when before creating database the option : --without-demo=False.

And  if you create db via interface just follow the Niyas Raphy guilde

อวตาร
ละทิ้ง
ผู้เขียน

Thank you for the help

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 25
934
2
มี.ค. 22
12580
2
ม.ค. 18
8613
2
เม.ย. 15
12580
1
มี.ค. 15
9183