Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
3486 Представления

Hey everyone!


Is there any tool or methodology to facilitate the creation of demo data for our modules?

I've been typing up these XML's manually and it's driving me crazy, even with all the help from VSCode & co-pilot, it's just too much work and too time consuming...

Any tricks or tools out there?


Many thanks!

Аватар
Отменить
Лучший ответ

Hi,

You can checkout the odoo populate method and see if it helps:  https://www.odoo.com/documentation/16.0/developer/reference/backend/performance.html?highlight=populate#module-odoo.tools.populate

If it is for testing purpose you can consider importing data from files from the Ui. Also from code side, you can import the data using csv files, you can check that too.



Thanks

Аватар
Отменить
Лучший ответ

Yeah, I know

You could try generation XML from the database records using your own script to capture what you wanna do as demo and that way you could add them manually on the Odoo UI

The same apply to do it from another source like JSON or YAML data, just to get it transformed into your XML Records

Also there are some other resources integrated directly into Odoo to populate the database:

https://www.odoo.com/documentation/16.0/developer/reference/cli.html#reference-cmdline-populate

https://www.odoo.com/documentation/16.0/developer/reference/backend/performance.html#reference-performance-populate-methods

https://www.odoo.com/documentation/14.0/developer/reference/addons/testing.html#reference-testing-populate

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
апр. 16
6332
1
апр. 16
4870
3
окт. 24
13984
0
июл. 22
1497
0
мая 22
1739