El 18/07/17 a les 09:45, [email protected] ha escrit:
Hi,


When setting up a new db from proteus, is it mandatory to call the wizards (ie, 
to simulate the actions done from the client) or is it possible/recommended to 
bypass it and populate directly the db?
Below the two ways I tried.

Seems that the company doesn’t become the default company for the next script 
lines with the second method.
With the wizard way, where can I find the form parameters to be filled ?
For creating the company you can have a look at the test tools of company module:

http://hg.tryton.org/modules/company/file/5b8a0005ebf9/tests/tools.py#l11

Once the data is created, you can mark the create company wizard as done. This data is stored in the ir.config.wizard.item table. We use the following code to mark all wizard items as done:

ConfigWizardItem = Model.get('ir.module.config_wizard.item') items = [] for item in ConfigWizardItem.find([('state', '!=', 'done')]): item.state = 'done' items.append(item)
    ConfigWizardItem.save(items)

Hope it helps.

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/f13a80df-a26b-e237-9ed2-893e7cc24601%40koolpi.com.

Reply via email to