c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #12888
[Bug 703928] Re: column account_journal_period.company_id doesn't exist
In "account.py":
class account_journal_period(osv.osv):
_columns = {
'name': fields.char('Journal-Period Name', size=64, required=True),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, ondelete="cascade"),
'period_id': fields.many2one('account.period', 'Period', required=True, ondelete="cascade"),
'icon': fields.function(_icon_get, method=True, string='Icon', type='char', size=32),
'active': fields.boolean('Active', required=True, help="If the active field is set to False, it will allow you to hide the journal period without removing it."),
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True,
help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'),
'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
}
column company_id is never created, although 'store' parameter is set as
True
--
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
References