banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #00880
[Bug 1197470] Re: problem with certain bank statement updates prior to confirmation
[Expired for Banking Addons because there has been no activity for 60
days.]
** Changed in: banking-addons
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Banking
Addons Core Editors, which is subscribed to Banking Addons.
https://bugs.launchpad.net/bugs/1197470
Title:
problem with certain bank statement updates prior to confirmation
Status in OpenERP Banking Addons:
Expired
Bug description:
An "in progress", that is a bank statement that was reopened for
corrections, is generating the following when trying to confirm a bank
statement line:
=======================
2013-07-03 16:06:04,106 19546 ERROR ? openerp.sql_db: Programming error: operator does not exist: integer = boolean
LINE 1: ..._move_rel WHERE statement_line_id = 3803 and move_id = false
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
, in query SELECT 1 FROM account_bank_statement_line_move_rel WHERE statement_line_id = %s and move_id = %s
2013-07-03 16:06:04,107 19546 ERROR ? openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
File "/home/openerp/openerp/server/6.1/openerp/osv/osv.py", line 129, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/openerp/openerp/server/6.1/openerp/osv/osv.py", line 195, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/openerp/openerp/server/6.1/openerp/osv/osv.py", line 183, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/openerp/openerp/banking-addons/account_banking/banking_import_transaction.py", line 1900, in confirm
cr, uid, st_line.id, company_currency_id, st_line_number, context)
File "/home/openerp/openerp/banking-addons/account_banking/account_banking.py", line 480, in create_move_from_st_line
'move_ids': [(4, v.move_id.id, False)]
File "/home/openerp/openerp/server/6.1/openerp/osv/orm.py", line 3955, in write
result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
File "/home/openerp/openerp/server/6.1/openerp/osv/fields.py", line 769, in set
cr.execute('SELECT 1 FROM '+rel+' WHERE '+id1+' = %s and '+id2+' = %s', (id, act[1]))
File "/home/openerp/openerp/server/6.1/openerp/sql_db.py", line 152, in wrapper
return f(self, *args, **kwargs)
File "/home/openerp/openerp/server/6.1/openerp/sql_db.py", line 212, in execute
res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: ..._move_rel WHERE statement_line_id = 3803 and move_id = false
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
2013-07-03 16:06:04,109 19546 ERROR ? openerp.netsvc: operator does not exist: integer = boolean
LINE 1: ..._move_rel WHERE statement_line_id = 3803 and move_id = false
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
===========================================
As aptly put, the suspect line is in account_banking around line 479, that is the account_bank_statement_line_obj.write statement towards the end of the following block:
======================================================================
# Start account voucher
# Post the voucher and update links between statement and moves
if st_line.voucher_id:
voucher_pool = self.pool.get('account.voucher')
wf_service = netsvc.LocalService("workflow")
voucher_pool.write(
cr, uid, [st_line.voucher_id.id], {
'number': st_line_number,
'date': st_line.date,
'period_id': period_id, # AB
}, context=context)
if st_line.voucher_id.state == 'cancel':
voucher_pool.action_cancel_draft(
cr, uid, [st_line.voucher_id.id], context=context)
wf_service.trg_validate(
uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
v = voucher_pool.browse(
cr, uid, st_line.voucher_id.id, context=context)
account_bank_statement_line_obj.write(cr, uid, [st_line_id], {
'move_ids': [(4, v.move_id.id, False)]
})
account_move_line_obj.write(
cr, uid, [x.id for x in v.move_ids],
{'statement_id': st_line.statement_id.id}, context=context)
# End of account_voucher
st_line.refresh()
========================================================
Should
account_bank_statement_line_obj.write(cr, uid, [st_line_id], {
'move_ids': [(4, v.move_id.id, False)]
})
be
account_bank_statement_line_obj.write(cr, uid, [st_line_id], {
'move_ids': [(4, v.move_id.id, 0)]
})
?
To manage notifications about this bug go to:
https://bugs.launchpad.net/banking-addons/+bug/1197470/+subscriptions