콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4439 화면

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

아바타
취소
작성자 베스트 답변

I set a noupdate="1" attribute for the data node in the xml and it works like a charm.

Importing twice through XML is not a correct way of working

아바타
취소
관련 게시물 답글 화면 활동
1
3월 25
1199
0
11월 24
1431
0
6월 24
1490
1
6월 24
1981
0
10월 23
2047