← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 703928] [NEW] column account_journal_period.company_id doesn't exist

 

Public bug reported:

version 6.0-dev on ubuntu10.10

when I try to approve an invoice in a multicompany installation this
error appears:

[2011-01-17 13:14:22,914][] ERROR:db.cursor:Programming error: column doesn't exist account_journal_period.company_id
LINE 1: ..._journal_period.name,account_journal_period.state,account_jo...
                                                              ^
, in query SELECT account_journal_period.name,account_journal_period.state,account_journal_period.company_id,account_journal_period.journal_id,account_journal_period.period_id,account_journal_period.active,account_journal_period.id FROM "account_journal_period" WHERE account_journal_period.id IN %s ORDER BY period_id

Then it continues with this Traceback:

Traceback (most recent call last):
  File "/home/amosoviedo/openerp6/openobject-server/bin/sql_db.py", line 129, in execute
    res = self._obj.execute(query, params)
InternalError: Transaction aborted, orders will be ignored until the transaction block end

[2011-01-17 13:14:22,917][] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home/amosoviedo/openerp6/openobject-server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/amosoviedo/openerp6/openobject-server/bin/osv/osv.py", line 196, in exec_workflow
    res = self.exec_workflow_cr(cr, uid, obj, method, *args)
  File "/home/amosoviedo/openerp6/openobject-server/bin/osv/osv.py", line 189, in exec_workflow_cr
    return wf_service.trg_validate(uid, obj, args[0], method, cr)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/wkf_service.py", line 80, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/instance.py", line 48, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 61, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 174, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 182, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 41, in create
    process(cr, res, ident, stack=stack)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 53, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 107, in _execute
    wkf_expr.execute(cr, ident, workitem, activity)
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/wkf_expr.py", line 68, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/wkf_expr.py", line 58, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/home/amosoviedo/openerp6/openobject-server/bin/tools/safe_eval.py", line 281, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/home/amosoviedo/openerp6/openobject-server/bin/osv/orm.py", line 181, in <lambda>
    return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
  File "/home/amosoviedo/openerp6/openobject-addons/account/invoice.py", line 921, in action_move_create
    move_id = self.pool.get('account.move').create(cr, uid, move, context=context)
  File "/home/amosoviedo/openerp6/openobject-addons/account/account.py", line 1279, in create
    result = super(account_move, self).create(cr, uid, vals, c)
  File "/home/amosoviedo/openerp6/openobject-server/bin/osv/orm.py", line 3639, in create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
  File "/home/amosoviedo/openerp6/openobject-server/bin/osv/fields.py", line 495, in set
    id_new = obj.create(cr, user, act[2], context=context)
  File "/home/amosoviedo/openerp6/openobject-addons/account/account_move_line.py", line 1231, in create
    self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context)
  File "/home/amosoviedo/openerp6/openobject-addons/account/account_move_line.py", line 1190, in _update_journal_check
    'period_id': period.id
  File "/home/amosoviedo/openerp6/openobject-addons/account/account.py", line 1002, in create
    return super(account_journal_period, self).create(cr, uid, vals, context)
  File "/home/amosoviedo/openerp6/openobject-server/bin/osv/orm.py", line 3648, in create
    self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
  File "/home/amosoviedo/openerp6/openobject-server/bin/osv/orm.py", line 3781, in _store_set_values
    '"'+f+'"='+self._columns[f]._symbol_set[0] + ' where id = %s', (self._columns[f]._symbol_set[1](value), id))
  File "/home/amosoviedo/openerp6/openobject-server/bin/sql_db.py", line 76, in wrapper
    return f(self, *args, **kwargs)
  File "/home/amosoviedo/openerp6/openobject-server/bin/sql_db.py", line 129, in execute
    res = self._obj.execute(query, params)
InternalError:  Transaction aborted, orders will be ignored until the transaction block end

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/703928

Title:
  column account_journal_period.company_id doesn't exist

Status in OpenObject Addons Modules:
  New

Bug description:
  version 6.0-dev on ubuntu10.10

  when I try to approve an invoice in a multicompany installation this
  error appears:

  [2011-01-17 13:14:22,914][] ERROR:db.cursor:Programming error: column doesn't exist account_journal_period.company_id
  LINE 1: ..._journal_period.name,account_journal_period.state,account_jo...
                                                                ^
  , in query SELECT account_journal_period.name,account_journal_period.state,account_journal_period.company_id,account_journal_period.journal_id,account_journal_period.period_id,account_journal_period.active,account_journal_period.id FROM "account_journal_period" WHERE account_journal_period.id IN %s ORDER BY period_id

  Then it continues with this Traceback:

  Traceback (most recent call last):
    File "/home/amosoviedo/openerp6/openobject-server/bin/sql_db.py", line 129, in execute
      res = self._obj.execute(query, params)
  InternalError: Transaction aborted, orders will be ignored until the transaction block end

  [2011-01-17 13:14:22,917][] ERROR:web-services:Uncaught exception
  Traceback (most recent call last):
    File "/home/amosoviedo/openerp6/openobject-server/bin/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/amosoviedo/openerp6/openobject-server/bin/osv/osv.py", line 196, in exec_workflow
      res = self.exec_workflow_cr(cr, uid, obj, method, *args)
    File "/home/amosoviedo/openerp6/openobject-server/bin/osv/osv.py", line 189, in exec_workflow_cr
      return wf_service.trg_validate(uid, obj, args[0], method, cr)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/wkf_service.py", line 80, in trg_validate
      res2 = instance.validate(cr, id, ident, signal)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/instance.py", line 48, in validate
      workitem.process(cr, witem, ident, signal, force_running, stack=stack)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 61, in process
      ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 174, in _split_test
      _join_test(cr, t[0], t[1], ident, stack)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 182, in _join_test
      create(cr,[activity], inst_id, ident, stack)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 41, in create
      process(cr, res, ident, stack=stack)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 53, in process
      result = _execute(cr, workitem, activity, ident, stack)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/workitem.py", line 107, in _execute
      wkf_expr.execute(cr, ident, workitem, activity)
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/wkf_expr.py", line 68, in execute
      return _eval_expr(cr, ident, workitem, activity['action'])
    File "/home/amosoviedo/openerp6/openobject-server/bin/workflow/wkf_expr.py", line 58, in _eval_expr
      ret = eval(line, env, nocopy=True)
    File "/home/amosoviedo/openerp6/openobject-server/bin/tools/safe_eval.py", line 281, in safe_eval
      return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
    File "", line 1, in <module>
    File "/home/amosoviedo/openerp6/openobject-server/bin/osv/orm.py", line 181, in <lambda>
      return lambda *args, **argv: attr(self._cr, self._uid, [self._id], *args, **argv)
    File "/home/amosoviedo/openerp6/openobject-addons/account/invoice.py", line 921, in action_move_create
      move_id = self.pool.get('account.move').create(cr, uid, move, context=context)
    File "/home/amosoviedo/openerp6/openobject-addons/account/account.py", line 1279, in create
      result = super(account_move, self).create(cr, uid, vals, c)
    File "/home/amosoviedo/openerp6/openobject-server/bin/osv/orm.py", line 3639, in create
      result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
    File "/home/amosoviedo/openerp6/openobject-server/bin/osv/fields.py", line 495, in set
      id_new = obj.create(cr, user, act[2], context=context)
    File "/home/amosoviedo/openerp6/openobject-addons/account/account_move_line.py", line 1231, in create
      self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context)
    File "/home/amosoviedo/openerp6/openobject-addons/account/account_move_line.py", line 1190, in _update_journal_check
      'period_id': period.id
    File "/home/amosoviedo/openerp6/openobject-addons/account/account.py", line 1002, in create
      return super(account_journal_period, self).create(cr, uid, vals, context)
    File "/home/amosoviedo/openerp6/openobject-server/bin/osv/orm.py", line 3648, in create
      self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
    File "/home/amosoviedo/openerp6/openobject-server/bin/osv/orm.py", line 3781, in _store_set_values
      '"'+f+'"='+self._columns[f]._symbol_set[0] + ' where id = %s', (self._columns[f]._symbol_set[1](value), id))
    File "/home/amosoviedo/openerp6/openobject-server/bin/sql_db.py", line 76, in wrapper
      return f(self, *args, **kwargs)
    File "/home/amosoviedo/openerp6/openobject-server/bin/sql_db.py", line 129, in execute
      res = self._obj.execute(query, params)
  InternalError:  Transaction aborted, orders will be ignored until the transaction block end





Follow ups

References