← Back to team overview

openerp-india team mailing list archive

[Bug 893482] Re: unique constraint "account_journal_code_company_uniq"

 

I had this same problem upgrading a 6.1 database from revisions in
August 2012, to the revisions from Feb 2013.

I needed to run the following query in PostgreSQL to work around it:

update account_journal set code = 'SSTJ' where code = 'STJ';

Ray.

-- 
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/893482

Title:
  unique constraint "account_journal_code_company_uniq"

Status in OpenERP Addons (modules):
  Fix Released

Bug description:
  Trunk, tested in web client only

  here is the bug i get if i apply the generic chart template
  to test : create a db install sales and set a tax in the generic chart of account and then apply the chart template : 

  [2011-11-22 08:26:43,268][?] WARNING:orm:No such field(s) in model account.journal: currency_id.
  [2011-11-22 08:26:43,270][?] ERROR:db.cursor:bad query: insert into "account_journal" (id,"default_debit_account_id","update_posted","code","user_id","name","analytic_journal_id","view_id","group_invoice_lines","company_id","centralisation","sequence_id","allow_date","entry_posted","type","default_credit_account_id",create_uid,create_date) values (22,63,E'False',E'BNK1',1,E'Cash',NULL,1,E'False',1,E'False',35,E'False',E'False',E'cash',63,1,now())
  Traceback (most recent call last):
    File "/home/aline/source/server/trunk/openerp/sql_db.py", line 215, in execute
      res = self._obj.execute(query, params)
  IntegrityError: duplicate key value violates unique constraint "account_journal_code_company_uniq"

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


References