[7.0] Wizard multi charts accounts bug

Bug #1104982 reported by Paul Catinean
76
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP R&D Addons Team 3

Bug Description

Os: Ubuntu 12.04 LTS
Branch: 7.0 (openobject-addons/7.0 + server & web)
Server revno: 4840
Web revno: 3719
Addons revno: 8609

Stack trace:

2013-01-25 11:18:55,670 3926 ERROR Aluart openerp.sql_db: bad query: delete from wizard_multi_charts_accounts where id IN (1)
Traceback (most recent call last):
  File "/opt/openerp/7.0/server/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "bank_account_id" violates not-null constraint
CONTEXT: SQL statement "UPDATE ONLY "public"."account_bank_accounts_wizard" SET "bank_account_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "bank_account_id""

2013-01-25 11:18:55,670 3926 ERROR Aluart openerp.addons.base.ir.ir_cron: Call of self.pool.get('osv_memory.autovacuum').power_on(cr, uid, *()) failed in Job 1
Traceback (most recent call last):
  File "/opt/openerp/7.0/server/openerp/addons/base/ir/ir_cron.py", line 132, in _callback
    method(cr, uid, *args)
  File "/opt/openerp/7.0/server/openerp/addons/base/ir/osv_memory_autovacuum.py", line 31, in power_on
    model._transient_vacuum(cr, uid, force=True)
  File "/opt/openerp/7.0/server/openerp/osv/orm.py", line 5191, in _transient_vacuum
    self._transient_clean_rows_older_than(cr, self._transient_max_hours * 60 * 60)
  File "/opt/openerp/7.0/server/openerp/osv/orm.py", line 5155, in _transient_clean_rows_older_than
    self.unlink(cr, SUPERUSER_ID, ids)
  File "/opt/openerp/7.0/server/openerp/osv/orm.py", line 3976, in unlink
    'where id IN %s', (sub_ids,))
  File "/opt/openerp/7.0/server/openerp/sql_db.py", line 162, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/7.0/server/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "bank_account_id" violates not-null constraint
CONTEXT: SQL statement "UPDATE ONLY "public"."account_bank_accounts_wizard" SET "bank_account_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "bank_account_id""

Stepts to reproduce bug:

1. Create new database
2. Edit company info, set Name,Image,Country to Switzerland, Mobile, Phone, Contact
3. Install MRP

The wizard skips the accounting package step where you select General COA or a country-specific one and it goes traight to accounting options

4. Chose save Plan Comptabile STERCHI

After a short while the cron tries to run and that shows up...

Tags: bank statement
Dorin (dhongu)
no longer affects: ubuntu
Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello,

I have checked your scenario with latest trunk and 7.0 also. But I did not faced any Traceback at my end. would you please check It again with latest and notify us where you have faced the problem.

Thanks and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
summary: - Wizzard multi charts accounts bug
+ Wizard multi charts accounts bug
Revision history for this message
iehoshia_ (jepgez) wrote : Re: Wizard multi charts accounts bug

I try the latest trunk and have the same problem still.

Revision history for this message
iehoshia_ (jepgez) wrote :

2013-01-30 01:54:45,140 2645 ERROR seodb openerp.addons.base.ir.ir_cron: Unexpected exception while processing cron job {'function': u'power_on', 'create_uid': 1, 'args': u'()', 'create_date': '2013-01-28 21:54:33.045812', 'name': u'AutoVacuum osv_memory objects', 'interval_type': u'minutes', 'numbercall': -1, 'write_uid': 1, 'priority': 5, 'model': u'osv_memory.autovacuum', 'doall': False, 'write_date': '2013-01-28 21:54:33.045812', 'active': True, 'user_id': 1, 'interval_number': 30, 'nextcall': '2013-01-30 01:54:38', 'id': 1}
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/base/ir/ir_cron.py", line 221, in _acquire_job
    registry[cls._name]._process_job(job_cr, job, lock_cr)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_cron.py", line 165, in _process_job
    (nextcall.strftime(DEFAULT_SERVER_DATETIME_FORMAT), numbercall, job['id']))
  File "/opt/openerp/server/openerp/sql_db.py", line 162, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/server/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
TransactionRollbackError: no se pudo serializar el acceso debido a dependencias read/write entre transacciones
DETALLE: Reason code: Canceled on identification as a pivot, during write.
SUGERENCIA: La transacción podría tener éxito si es reintentada.

2013-01-30 01:54:48,407 2645 ERROR seodb openerp.sql_db: bad query: delete from wizard_multi_charts_accounts where id IN (1)
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
IntegrityError: el valor null para la columna «bank_account_id» viola la restricción not null
CONTEXTO: sentencia SQL: «UPDATE ONLY "public"."account_bank_accounts_wizard" SET "bank_account_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "bank_account_id"»

Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/__init__.py", line 768, in emit
    msg = self.format(record)
  File "/usr/lib/python2.6/logging/__init__.py", line 648, in format
    return fmt.format(record)
  File "/opt/openerp/server/openerp/netsvc.py", line 151, in format
    return DBFormatter.format(self, record)
  File "/opt/openerp/server/openerp/netsvc.py", line 145, in format
    return logging.Formatter.format(self, record)
  File "/usr/lib/python2.6/logging/__init__.py", line 448, in format
    s = s + record.exc_text
UnicodeDecodeError: 'ascii' codec can't decode byte

Revision history for this message
Paul Catinean (wiz-keed) wrote :

I still have it as well...

Revision history for this message
Francesco Rabottini (frabottini) wrote :
Download full text (5.4 KiB)

I have the same issue.

2013-01-30 12:22:43,775 6483 ERROR demo001 openerp.sql_db: bad query: delete from wizard_multi_charts_accounts where id IN (1)
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "bank_account_id" violates not-null constraint
CONTEXT: SQL statement "UPDATE ONLY "public"."account_bank_accounts_wizard" SET "bank_account_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "bank_account_id""

2013-01-30 12:22:43,778 6483 ERROR demo001 openerp.addons.base.ir.ir_cron: Call of self.pool.get('osv_memory.autovacuum').power_on(cr, uid, *()) failed in Job 1
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/base/ir/ir_cron.py", line 132, in _callback
    method(cr, uid, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/osv_memory_autovacuum.py", line 31, in power_on
    model._transient_vacuum(cr, uid, force=True)
  File "/opt/openerp/server/openerp/osv/orm.py", line 5191, in _transient_vacuum
    self._transient_clean_rows_older_than(cr, self._transient_max_hours * 60 * 60)
  File "/opt/openerp/server/openerp/osv/orm.py", line 5155, in _transient_clean_rows_older_than
    self.unlink(cr, SUPERUSER_ID, ids)
  File "/opt/openerp/server/openerp/osv/orm.py", line 3976, in unlink
    'where id IN %s', (sub_ids,))
  File "/opt/openerp/server/openerp/sql_db.py", line 162, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/server/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "bank_account_id" violates not-null constraint
CONTEXT: SQL statement "UPDATE ONLY "public"."account_bank_accounts_wizard" SET "bank_account_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "bank_account_id""

2013-01-30 12:53:15,291 6483 ERROR demo001 openerp.sql_db: bad query: delete from wizard_multi_charts_accounts where id IN (1)
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "bank_account_id" violates not-null constraint
CONTEXT: SQL statement "UPDATE ONLY "public"."account_bank_accounts_wizard" SET "bank_account_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "bank_account_id""

2013-01-30 12:53:15,294 6483 ERROR demo001 openerp.addons.base.ir.ir_cron: Call of self.pool.get('osv_memory.autovacuum').power_on(cr, uid, *()) failed in Job 1
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/base/ir/ir_cron.py", line 132, in _callback
    method(cr, uid, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/osv_memory_autovacuum.py", line 31, in power_on
    model._transient_vacuum(cr, uid, force=True)
  File "/opt/openerp/server/openerp/osv/orm.py", line 5191, in _transient_vacuum
    self._transient_clean_rows_older_than(cr, self._transient_max_hours * 60 * 60)
  File "/opt/openerp/server/openerp/osv/orm.py", line 5155, in _transient_clean_rows_older_than
    self.unlink(cr, SUPERUSER_ID, ids)
  File "/opt/openerp/server/openerp/osv/orm.py", line 3976, in unli...

Read more...

Revision history for this message
Ray Carnes (rcarnes) wrote :

This happens for me too.

Install OpenERP 7.0 - install a few modules (including Accounting and set a Chart of Accounts - mine was USA) - I don't even have to enter any data - just wait for the vacuum to start and you will see the message.

Ray.

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Folks,

Yes, I have faced the same traceback when update with base. That's why I am confirm this Issue with medium Importance.

Thanks

Changed in openobject-addons:
status: Incomplete → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
summary: - Wizard multi charts accounts bug
+ [7.0] Wizard multi charts accounts bug
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

This happens when the 'osv_memory.autovacuum' cron is running.

     cron.object.execute('openerp_magento7', 1, '*', u'osv_memory.autovacuum', u'power_on')

It tries to delete the records in the table 'wizard_multi_charts_accounts' but they are referenced by a FK from 'account_bank_accounts_wizard'.

    \d account_bank_accounts_wizard
    [...]
    "account_bank_accounts_wizard_bank_account_id_fkey" FOREIGN KEY (bank_account_id) REFERENCES wizard_multi_charts_accounts(id) ON DELETE SET NULL

   => account_bank_accounts_wizard.bank_account_id should be set to null, but this field is required ('NOT NULL').

Revision history for this message
Felix Schubert (input-fescon) wrote :

agree to Guewen Baconnier - seems to be a 'osv_memory.autovacuum' error. I'm running the nightly build from last night and got the following traceback:

2013-02-24 11:38:47,088 9699 ERROR fescon2013 openerp.sql_db: bad query: delete from portal_wizard where id IN (1, 2, 3, 4, 5)
Traceback (most recent call last):
  File "/srv/openerp7/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "wizard_id" violates not-null constraint
CONTEXT: SQL statement "UPDATE ONLY "public"."portal_wizard_user" SET "wizard_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "wizard_id""

2013-02-24 11:38:47,089 9699 ERROR fescon2013 openerp.addons.base.ir.ir_cron: Call of self.pool.get('osv_memory.autovacuum').power_on(cr, uid, *()) failed in Job 1
Traceback (most recent call last):
  File "/srv/openerp7/openerp/addons/base/ir/ir_cron.py", line 132, in _callback
    method(cr, uid, *args)
  File "/srv/openerp7/openerp/addons/base/ir/osv_memory_autovacuum.py", line 31, in power_on
    model._transient_vacuum(cr, uid, force=True)
  File "/srv/openerp7/openerp/osv/orm.py", line 5189, in _transient_vacuum
    self._transient_clean_rows_older_than(cr, self._transient_max_hours * 60 * 60)
  File "/srv/openerp7/openerp/osv/orm.py", line 5153, in _transient_clean_rows_older_than
    self.unlink(cr, SUPERUSER_ID, ids)
  File "/srv/openerp7/openerp/osv/orm.py", line 3974, in unlink
    'where id IN %s', (sub_ids,))
  File "/srv/openerp7/openerp/sql_db.py", line 162, in wrapper
    return f(self, *args, **kwargs)
  File "/srv/openerp7/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "wizard_id" violates not-null constraint
CONTEXT: SQL statement "UPDATE ONLY "public"."portal_wizard_user" SET "wizard_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "wizard_id""

Revision history for this message
Houssine (houssine-bakkali) wrote :

Hi,

I'm affected by this bug either.

Any update about this?

Thanks!
Houssine

Revision history for this message
Briehan Lombaard (briehan-lombaard) wrote :

The problem can be solved by setting ondelete='cascade' on the appropriate field as per the attached patch. The patch should the fix the issue for the portal_wizard_user error. As far as I can see the account_bank_accounts_wizard error has already been fixed in the latest nightly build.

Amit Parik (amit-parik)
tags: added: bank statement
Revision history for this message
Ricardo Opencloud - Portugal (opencloud) wrote :

So, how can we resolve this bug? I have my log file full of this errors...

thx

Revision history for this message
Landis (larnold) wrote :

I am getting similar error (related to wizard_id or portal_wizard_user). I cannot find a "null" portal_wizard_user" and don't know how to find "wizard_id". Current context is related to

openerp_magento_connector, but again, I don't thinkt that relates.

Please see Screen Shot Attached for Full TRACEBACK

Revision history for this message
Landis (larnold) wrote :

Screen Clip is now attached:

need to type to get it out of my SSH Shell. Can't seem to copy.

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.