** Branch linked: lp:~openerp-dev/openobject-addons/trunk-bug-967176-ara

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/967176

Title:
  l10n_ch: initial setup fails when default language is french

Status in OpenERP Addons (modules):
  In Progress

Bug description:
  This one is probably for c2c people, hi guys!

  Steps to reproduce:
    * Install a fresh OpenERP 6.1 server from 
lp:~c2c/openobject-server/6.1-c2c-official and 
lp:~c2c/openobject-addons/6.1-c2c-official
    * Create a new database and select "French (CH)" as default language
    * Install the "account_accountant" module from the welcome screen
    * Set "Plan comptable" to "Suisse - Comptabilité"
    * Next, next -> Crash!

  The web interface shows an error message:

    OpenERP Warning

    Violation de contrainte

    Le code du journal doit être unique dans chaque société !

  The log file contains:

  2012-03-28 14:04:14,212 25949 INFO ? openerp.osv.orm: Computing parent left 
and right for table account_account...
  2012-03-28 14:04:16,493 25949 ERROR ? openerp.sql_db: bad query: insert into 
"account_journal" 
(id,"default_debit_account_id","update_posted","code","user_id","name","analytic_journal_id","default_credit_account_id","group_invoice_lines","company_id","centralisation","sequence_id","allow_date","entry_posted","type","view_id",create_uid,create_date)
 values (25,NULL,E'False',E'OD',1,E'Journal des opérations 
diverses',NULL,NULL,E'False',1,E'False',35,E'False',E'False',E'general',3,1,(now()
 at time zone 'UTC'))
  Traceback (most recent call last):
    File "/srv/openerp/server/openerp/sql_db.py", line 212, in execute
      res = self._obj.execute(query, params)
  IntegrityError: duplicate key value violates unique constraint 
"account_journal_code_company_uniq"

  Traceback (most recent call last):
    File "/usr/lib/python2.6/logging/__init__.py", line 799, in emit
      stream.write(fs % msg.encode("UTF-8"))
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 124: 
ordinal not in range(128)

  It looks like there are two different issues here:

    1. Journal with code 'OD' is inserted multiple time during module 
installation/setup
    2. OpenERP's logging infrastructure doesn't properly handle a (badly?) 
encoded error message

  I'm primarily interested in issue #1 in this bug report.

  This is the state of the account_journal table before this query
  failed, so why is this module trying to create the journals multiple
  time?

  test2=# select code, company_id, name from account_journal; code | company_id 
|        name         
  ------+------------+---------------------
   EXPF |          1 | Journal de frais
   BCHF |          1 | Banque CHF
   BEUR |          1 | Banque EUR
   CAI  |          1 | Caisse
   OD   |          1 | Opérations Diverses
   JO   |          1 | Journal d'ouverture
  (6 rows)

  Interestingly, this issue *does not* appear when I select english as
  the default language for the new database.

  Thanks for your help!

  openerp:/srv/openerp/server# bzr version-info
  revision-id: [email protected]  
                                                                 
  date: 2012-03-15 10:31:32 +0100
  build-date: 2012-03-28 16:28:21 +0200
  revno: 4065
  branch-nick: 6.1-c2c-official
  openerp:/srv/openerp/server# cd ..
  openerp:/srv/openerp# cd addons/
  openerp:/srv/openerp/addons# bzr version-info
  revision-id: [email protected]  
                                                                 
  date: 2012-03-19 08:30:41 +0100
  build-date: 2012-03-28 16:28:29 +0200
  revno: 6597
  branch-nick: 6.1-c2c-official
  openerp:/srv/openerp/addons#

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/967176/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~openerp-india
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-india
More help   : https://help.launchpad.net/ListHelp

Reply via email to