Inserting data with python3 script

Hey guys,

Is there a way for me to insert data in database through trytond with a python3 script?

The problem is that, the Angolan plan of accounts is really big and it’s really painful and time consuming to insert all the plan every time I have a new database to setup.

Are you guys have any ideas on this?

Thank you :wink: :smiley:

You can use proteus. There are many examples in test scenarios [1]

[1] modules/account: 226faf0e924a tests/

You should consider creating a module that include the chart of accounts as template records and use the create account chart from template wizard to update/delete it.

This is the standard way of managing a chart of accounts. Have a look at account_fr, account_be, account_es for examples of such modules.

1 Like

Of course you should focus your efforts in create template accounts in a module if you haven’t it yet.
My previous coment was oriented to execute from proteus the create account chart from template wizard described by @pokoli.

Thank you so much @sergyo for pointing that out for me. I heard about proteus but could not get the full purpose of it, mainly because I did not need it. I will definitely use it to automate some of my workflow ;).

But for this little problem that I’m facing, I will follow the standard way of doing it, recommended by @pokoli. I’ve already taken a look at account_fr, account_be, account_es modules and I will start implementing account_ao module ASAP.

You guys are doing an amazing job with Tryton. This is THE system.

Thank you so much for all

Once you have something that is complete and working on latests trunk feel free to open an issue to propose the inclusion of the chart as standard module.

1 Like

Ok. I will work on it and then I will submit it. Is there a need to reference the Angolan chart to an official webpage?

Yes, it’s a good practice to reference the official docs used to build the module.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.