← Back to team overview

openerp-india team mailing list archive

Re: [Bug 1005867] Re: [6.1]journal_id field creates a problem on account_back_statement_line

 

Chetan,

  remove the statement from point_of_sale/point_of_sale.py on class
account_bank_statement_line(line 625) of the journal_id field...you have to
modify the demo data to fit the many2one field of journal_id and start the
server with --update=account to view that the modification made in pos is
messing the journal_id field...


On Thu, Jul 5, 2012 at 1:09 PM, Serpent Consulting Services <
1005867@xxxxxxxxxxxxxxxxxx> wrote:

> Fekete,
>
> There is surely a bug, thanks.
>
> Chetan, if you look at add_payment() closely, the system is passing
> args['journal_id'] = int(data['journal']).
>
> This says the journal_id is supposed to be an integer, which in turn
> many2one.
>
> Hence, you may now double check whether you really face the issue or
> not.
>
> Thanks.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1005867
>
> Title:
>   [6.1]journal_id field creates a problem on account_back_statement_line
>
> Status in OpenERP Addons (modules):
>   Confirmed
>
> Bug description:
>   Hi there,
>
>   i have a problem when starting the server with --update=account, when
>   doing this the server will create a new column journal_id in
>   account_bank_statement_line called journal_id_moved0, and on every
>   update the iteratir will grow...and the type of the field is different
>   from update to update...from integer to char, and back....
>
>   can you give a solution how to get rid of this because is inconvenient
>   and when is doing this i can't post moves from vouchers and pos
>   receipt in journal..
>
>   details of server log:
>
>   ERROR demo openerp.sql_db: bad query: update
> "account_bank_statement_line" set "journal_id"='Numerar' where id = 2
>   Traceback (most recent call last):
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/sql_db.py",
> line 212, in execute
>       res = self._obj.execute(query, params)
>   DataError: invalid input syntax for integer: "Numerar"
>   LINE 1: ...te "account_bank_statement_line" set "journal_id"='Numerar'
> ...
>                                                                ^
>
>   2012-05-29 11:46:37,310 14750 ERROR demo openerp.osv.osv: Uncaught
> exception
>   Traceback (most recent call last):
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py",
> line 121, in wrapper
>       return f(self, dbname, *args, **kwargs)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py",
> line 196, in exec_workflow
>       res = self.exec_workflow_cr(cr, uid, obj, method, *args)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons/audittrail/audittrail.py",
> line 501, in exec_workflow_cr
>       return fct_src(cr, uid, model, method, *args)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py",
> line 189, in exec_workflow_cr
>       return wf_service.trg_validate(uid, obj, args[0], method, cr)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/wkf_service.py",
> line 124, in trg_validate
>       res2 = instance.validate(cr, id, ident, signal)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/instance.py",
> line 48, in validate
>       workitem.process(cr, witem, ident, signal, force_running,
> stack=stack)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py",
> line 61, in process
>       ok = _split_test(cr, workitem, activity['split_mode'], ident,
> signal, stack)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py",
> line 176, in _split_test
>       _join_test(cr, t[0], t[1], ident, stack)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py",
> line 184, in _join_test
>       create(cr,[activity], inst_id, ident, stack)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py",
> line 41, in create
>       process(cr, res, ident, stack=stack)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py",
> line 53, in process
>       result = _execute(cr, workitem, activity, ident, stack)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py",
> line 107, in _execute
>       returned_action = wkf_expr.execute(cr, ident, workitem, activity)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/wkf_expr.py",
> line 68, in execute
>       return _eval_expr(cr, ident, workitem, activity['action'])
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/wkf_expr.py",
> line 58, in _eval_expr
>       ret = eval(line, env, nocopy=True)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/tools/safe_eval.py",
> line 241, in safe_eval
>       return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict,
> locals_dict)
>     File "", line 1, in <module>
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/orm.py",
> line 368, in function_proxy
>       return attr(self._cr, self._uid, [self._id], *args, **kwargs)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons/account_voucher/account_voucher.py",
> line 761, in proforma_voucher
>       self.action_move_line_create(cr, uid, ids, context=context)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons/account_l10n_ro/account_voucher.py",
> line 110, in action_move_line_create
>       move_id = move_pool.create(cr, uid, self.account_move_get(cr, uid,
> voucher.id, context=context), context=context)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons/account_l10n_ro/account_voucher.py",
> line 213, in account_move_get
>       statement_line_obj.create(cr, uid, args, context=context)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/orm.py",
> line 4224, in create
>       self.pool.get(object)._store_set_values(cr, user, ids, fields2,
> context)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/orm.py",
> line 4386, in _store_set_values
>       '"'+f+'"='+self._columns[f]._symbol_set[0] + ' where id = %s',
> (self._columns[f]._symbol_set[1](value), id))
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/sql_db.py",
> line 152, in wrapper
>       return f(self, *args, **kwargs)
>     File
> "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/sql_db.py",
> line 212, in execute
>       res = self._obj.execute(query, params)
>   DataError: invalid input syntax for integer: "Numerar"
>   LINE 1: ...te "account_bank_statement_line" set "journal_id"='Numerar'
> ...
>                                                                ^
>
>   2012-05-29 11:46:37,318 14750 ERROR demo openerp.netsvc: invalid input
> syntax for integer: "Numerar"
>   LINE 1: ...te "account_bank_statement_line" set "journal_id"='Numerar'
> ...
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/1005867/+subscriptions
>


-- 
Fekete Mihai
Software Developer
www.erpsystems.ro

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

Title:
  [6.1]journal_id field creates a problem on account_back_statement_line

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  Hi there,

  i have a problem when starting the server with --update=account, when
  doing this the server will create a new column journal_id in
  account_bank_statement_line called journal_id_moved0, and on every
  update the iteratir will grow...and the type of the field is different
  from update to update...from integer to char, and back....

  can you give a solution how to get rid of this because is inconvenient
  and when is doing this i can't post moves from vouchers and pos
  receipt in journal..

  details of server log:

  ERROR demo openerp.sql_db: bad query: update "account_bank_statement_line" set "journal_id"='Numerar' where id = 2
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/sql_db.py", line 212, in execute
      res = self._obj.execute(query, params)
  DataError: invalid input syntax for integer: "Numerar"
  LINE 1: ...te "account_bank_statement_line" set "journal_id"='Numerar' ...
                                                               ^

  2012-05-29 11:46:37,310 14750 ERROR demo openerp.osv.osv: Uncaught exception
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py", line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py", line 196, in exec_workflow
      res = self.exec_workflow_cr(cr, uid, obj, method, *args)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons/audittrail/audittrail.py", line 501, in exec_workflow_cr
      return fct_src(cr, uid, model, method, *args)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/osv.py", line 189, in exec_workflow_cr
      return wf_service.trg_validate(uid, obj, args[0], method, cr)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/wkf_service.py", line 124, in trg_validate
      res2 = instance.validate(cr, id, ident, signal)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/instance.py", line 48, in validate
      workitem.process(cr, witem, ident, signal, force_running, stack=stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py", line 61, in process
      ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py", line 176, in _split_test
      _join_test(cr, t[0], t[1], ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py", line 184, in _join_test
      create(cr,[activity], inst_id, ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py", line 41, in create
      process(cr, res, ident, stack=stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py", line 53, in process
      result = _execute(cr, workitem, activity, ident, stack)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/workitem.py", line 107, in _execute
      returned_action = wkf_expr.execute(cr, ident, workitem, activity)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/wkf_expr.py", line 68, in execute
      return _eval_expr(cr, ident, workitem, activity['action'])
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/workflow/wkf_expr.py", line 58, in _eval_expr
      ret = eval(line, env, nocopy=True)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/tools/safe_eval.py", line 241, in safe_eval
      return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
    File "", line 1, in <module>
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/orm.py", line 368, in function_proxy
      return attr(self._cr, self._uid, [self._id], *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons/account_voucher/account_voucher.py", line 761, in proforma_voucher
      self.action_move_line_create(cr, uid, ids, context=context)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons/account_l10n_ro/account_voucher.py", line 110, in action_move_line_create
      move_id = move_pool.create(cr, uid, self.account_move_get(cr, uid, voucher.id, context=context), context=context)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/addons/account_l10n_ro/account_voucher.py", line 213, in account_move_get
      statement_line_obj.create(cr, uid, args, context=context)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/orm.py", line 4224, in create
      self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/osv/orm.py", line 4386, in _store_set_values
      '"'+f+'"='+self._columns[f]._symbol_set[0] + ' where id = %s', (self._columns[f]._symbol_set[1](value), id))
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/sql_db.py", line 152, in wrapper
      return f(self, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/openerp-6.1-py2.7.egg/openerp/sql_db.py", line 212, in execute
      res = self._obj.execute(query, params)
  DataError: invalid input syntax for integer: "Numerar"
  LINE 1: ...te "account_bank_statement_line" set "journal_id"='Numerar' ...
                                                               ^

  2012-05-29 11:46:37,318 14750 ERROR demo openerp.netsvc: invalid input syntax for integer: "Numerar"
  LINE 1: ...te "account_bank_statement_line" set "journal_id"='Numerar' ...

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


References