Hy folks,
I'm trying to configure all my charts through XML. I found this post http://help.openerp.com/question/507/is-it-possible-to-set-database-default-configuration-values/ that explain how to deal with wizard into xml. That was damned helpful.
So I tried this : 1 - Load my chart account :
record model="account.installer" id="at_account_init" > < field name="company_id" ref="base.main_company" / > < field name="charts" >l10n_fr< /field> < field name="date_start" >01/10/2013< /field> < field name="date_stop">30/09/2014< /field> < field name="period">month< /field> < /record> < function model="account.installer" name="execute" eval="[[ref('at_account_init')]]" / >
This part works fine.
2 - Then configure my accounting chart for my company through the wizard
< record model="wizard.multi.charts.accounts" id="at_multi_chart_init"> < field name="company_id" ref="base.main_company" /> < field name="chart_template_id" ref="l10n_fr.l10n_fr_pcg_chart_template" /> < field name="currency_id" ref="base.EUR" /> < field name="sale_tax" ref="l10n_fr.tva_normale" /> < field name="purchase_tax" ref="l10n_fr.tva_acq_normale" /> < field name="code_digits" eval="9" / > < /record> < function model="wizard.multi.charts.accounts" name="execute" eval="[[ref('at_multi_chart_init')]]" / >
This one failed with the following error :
IntegrityError: duplicate key value violates unique constraint "account_tax_name_company_uniq" DÃTAIL : Key (name, company_id)=(TVA déductible (achat) 20,0%, 1) already exists
I precise that when I do this through the web interface, it doesn't causes any problem.
I'm suspecting a bug https://bugs.launchpad.net/openobject-addons/+bug/871680 that is a duplicate of this one : https://bugs.launchpad.net/openobject-addons/+bug/876310