[6.0 RC2] incorrect creation of Accounting Journals is some localizations prevents multiple charts from being installed

Bug #674480 reported by Nicolas Bessi - Camptocamp
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
High
OpenERP R&D Addons Team 3

Bug Description

Hello,

It is not possible to install multiple account chart in V6, you can not relaunch the account chart installer many times.
The error does come from the fact that account journal generation is hardcoded in installer.py of account module.
As the journal code must be unique and a journal generation is hard coded in the wizard it raise a unique code constraint error.

Regards

Nicolas

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Indeed, we need to find a way to allow installing different charts with the same journal codes on different companies

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

BTW this is why the continuous integration server is red at the moment

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

if the code of the journal is already used, set another code like: "SAJ2"
(the user will change after to fit his own requirements)

Changed in openobject-addons:
importance: Medium → High
Revision history for this message
qdp (OpenERP) (qdp) wrote :

don't do what fabien propose at comment 3 but instead change the unique constraint on code, and check on uniqueness of (code, company) instead.

Thanks

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Quentin this is already the case, I think the error is perhaps the fact that some localization have hardcoded the definition of journals in their data instead of letting the wizard do the creation.

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

E.g here are some journals in l10n modules:

l10n_ch/vaudtax_data.xml
62: <record id="account.sales_journal" model="account.journal">
70: <record id="account.refund_sales_journal" model="account.journal">
78: <record id="account.expenses_journal" model="account.journal">
86: <record id="account.bank_journal" model="account.journal">
94: <record model="account.journal" id="account.bilan_journal">

l10n_ch/demo/dta_demo.xml
50: <record model="account.journal" id="account.sales_journal">
61: <field name="journal" model="account.journal" search="[('type','=','cash')]"/>

l10n_in/l10n_in_chart.xml
470: <record id="opening_journal" model="account.journal">

l10n_it/journals.xml
26:<!-- <record id="sales_journal" model="account.journal">
36: <record id="expenses_journal" model="account.journal">
45: <record id="bank_journal" model="account.journal">
58: <record id="cash_journal" model="account.journal">
74: <record id="refund_sales_journal" model="account.journal">
86:<!-- <record id="expenses_journal" model="account.journal">
96: <record id="refund_expenses_journal" model="account.journal">

l10n_ma/l10n_ma_journal.xml
8: <record id="journal_vente" model="account.journal">
24: <record id="journal_achat" model="account.journal">
33: <record id="journal_banque" model="account.journal">
41: <record id="journal_caisse" model="account.journal">
49: <record id="journal_divers" model="account.journal">

summary: - [6.0 RC2] not possible to install multiple account chart
+ [6.0 RC2] incorrect creation of Accounting Journals is some
+ localizations prevents multiple charts from being installed
Revision history for this message
qdp (OpenERP) (qdp) wrote :

well seen!

So all we have to do is simply remove that data. Thanks Nicolas and buildbot, for raising that error ^^

qdp (OpenERP) (qdp)
Changed in openobject-addons:
milestone: none → 6.0-rc2
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
status: In Progress → Fix Released
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello Nicolas Bessi,

We have fixed the problem in lp:~openerp-dev/openobject-addons/trunk-dev-addons3-ara branch, It will be merged soon with Trunk addons.

Revision No: 4538
Revision ID: <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.