2014-04-28 12:21:59 |
Laurent Mignon (Acsone) |
bug |
|
|
added bug |
2014-04-28 12:23:56 |
Laurent Mignon (Acsone) |
summary |
default account_id to false (mp:197755) breaks import of line without account_id |
[7.0] account_statement_base_import: default account_id to false (mp:197755) breaks import of line without account_id |
|
2014-04-28 12:24:22 |
Laurent Mignon (Acsone) |
description |
For performance reasons, the creation of lines in the account_statement_base_import is done by bypassing the ORM . (method _insert_lines defined in account_base_completion.statement.AccountStatementLine). The method _insert_lines must be called with a list of values (as dict) used to build a plain batch SQL insert 'INSERT INTO account_bank_statement_line (%s) VALUES (%s)'
The problem with the mp:197755 is that if no value is provided for the account_id by the parser, the default value is added by the call to "statement_line_obj._add_missing_default_values(cr, uid, values, context)" at line 130 in account_statement_base_import.statement.py. (values = [.... {..., 'account_id':False, ..} ... ] )
As these values are used to build a plain SQL insert (" Insert into .... (..., account_id) values ((...,False )) the method fails with the exception: except_osv:
(u'Statement import error', u'The statement cannot be created: Error: except_osv\nDescription: (u\'ORM bypass error\', \'ERROR: column "account_id" is of type integer but expression is of type boolean\\nLINE 1: ...note, period_id, ref, statement_id, type) VALUES (false, \\\'{"...\\n ^\\nHINT: You will need to rewrite or cast the expression.\\n\')\nTraceback: File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_import/statement.py", line 195, in statement_import\n statement_line_obj._insert_lines(cr, uid, statement_store, context=context)\n File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_completion/statement.py", line 479, in _insert_lines\n sql_err.pgerror)\n') |
For performance reasons, the creation of lines in the account_statement_base_import is done by bypassing the ORM . (method _insert_lines defined in account_base_completion.statement.AccountStatementLine). The method _insert_lines must be called with a list of values (as dict) used to build a plain batch SQL insert 'INSERT INTO account_bank_statement_line (%s) VALUES (%s)'
The problem with the lp:197755 is that if no value is provided for the account_id by the parser, the default value is added by the call to "statement_line_obj._add_missing_default_values(cr, uid, values, context)" at line 130 in account_statement_base_import.statement.py. (values = [.... {..., 'account_id':False, ..} ... ] )
As these values are used to build a plain SQL insert (" Insert into .... (..., account_id) values ((...,False )) the method fails with the exception: except_osv:
(u'Statement import error', u'The statement cannot be created: Error: except_osv\nDescription: (u\'ORM bypass error\', \'ERROR: column "account_id" is of type integer but expression is of type boolean\\nLINE 1: ...note, period_id, ref, statement_id, type) VALUES (false, \\\'{"...\\n ^\\nHINT: You will need to rewrite or cast the expression.\\n\')\nTraceback: File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_import/statement.py", line 195, in statement_import\n statement_line_obj._insert_lines(cr, uid, statement_store, context=context)\n File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_completion/statement.py", line 479, in _insert_lines\n sql_err.pgerror)\n') |
|
2014-04-28 12:24:39 |
Laurent Mignon (Acsone) |
description |
For performance reasons, the creation of lines in the account_statement_base_import is done by bypassing the ORM . (method _insert_lines defined in account_base_completion.statement.AccountStatementLine). The method _insert_lines must be called with a list of values (as dict) used to build a plain batch SQL insert 'INSERT INTO account_bank_statement_line (%s) VALUES (%s)'
The problem with the lp:197755 is that if no value is provided for the account_id by the parser, the default value is added by the call to "statement_line_obj._add_missing_default_values(cr, uid, values, context)" at line 130 in account_statement_base_import.statement.py. (values = [.... {..., 'account_id':False, ..} ... ] )
As these values are used to build a plain SQL insert (" Insert into .... (..., account_id) values ((...,False )) the method fails with the exception: except_osv:
(u'Statement import error', u'The statement cannot be created: Error: except_osv\nDescription: (u\'ORM bypass error\', \'ERROR: column "account_id" is of type integer but expression is of type boolean\\nLINE 1: ...note, period_id, ref, statement_id, type) VALUES (false, \\\'{"...\\n ^\\nHINT: You will need to rewrite or cast the expression.\\n\')\nTraceback: File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_import/statement.py", line 195, in statement_import\n statement_line_obj._insert_lines(cr, uid, statement_store, context=context)\n File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_completion/statement.py", line 479, in _insert_lines\n sql_err.pgerror)\n') |
For performance reasons, the creation of lines in the account_statement_base_import is done by bypassing the ORM . (method _insert_lines defined in account_base_completion.statement.AccountStatementLine). The method _insert_lines must be called with a list of values (as dict) used to build a plain batch SQL insert 'INSERT INTO account_bank_statement_line (%s) VALUES (%s)'
The problem with the mp:197755 is that if no value is provided for the account_id by the parser, the default value is added by the call to "statement_line_obj._add_missing_default_values(cr, uid, values, context)" at line 130 in account_statement_base_import.statement.py. (values = [.... {..., 'account_id':False, ..} ... ] )
As these values are used to build a plain SQL insert (" Insert into .... (..., account_id) values ((...,False )) the method fails with the exception: except_osv:
(u'Statement import error', u'The statement cannot be created: Error: except_osv\nDescription: (u\'ORM bypass error\', \'ERROR: column "account_id" is of type integer but expression is of type boolean\\nLINE 1: ...note, period_id, ref, statement_id, type) VALUES (false, \\\'{"...\\n ^\\nHINT: You will need to rewrite or cast the expression.\\n\')\nTraceback: File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_import/statement.py", line 195, in statement_import\n statement_line_obj._insert_lines(cr, uid, statement_store, context=context)\n File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_completion/statement.py", line 479, in _insert_lines\n sql_err.pgerror)\n') |
|
2014-04-28 12:26:25 |
Laurent Mignon (Acsone) |
description |
For performance reasons, the creation of lines in the account_statement_base_import is done by bypassing the ORM . (method _insert_lines defined in account_base_completion.statement.AccountStatementLine). The method _insert_lines must be called with a list of values (as dict) used to build a plain batch SQL insert 'INSERT INTO account_bank_statement_line (%s) VALUES (%s)'
The problem with the mp:197755 is that if no value is provided for the account_id by the parser, the default value is added by the call to "statement_line_obj._add_missing_default_values(cr, uid, values, context)" at line 130 in account_statement_base_import.statement.py. (values = [.... {..., 'account_id':False, ..} ... ] )
As these values are used to build a plain SQL insert (" Insert into .... (..., account_id) values ((...,False )) the method fails with the exception: except_osv:
(u'Statement import error', u'The statement cannot be created: Error: except_osv\nDescription: (u\'ORM bypass error\', \'ERROR: column "account_id" is of type integer but expression is of type boolean\\nLINE 1: ...note, period_id, ref, statement_id, type) VALUES (false, \\\'{"...\\n ^\\nHINT: You will need to rewrite or cast the expression.\\n\')\nTraceback: File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_import/statement.py", line 195, in statement_import\n statement_line_obj._insert_lines(cr, uid, statement_store, context=context)\n File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_completion/statement.py", line 479, in _insert_lines\n sql_err.pgerror)\n') |
For performance reasons, the creation of lines in the account_statement_base_import is done by bypassing the ORM . (method _insert_lines defined in account_base_completion.statement.AccountStatementLine). The method _insert_lines must be called with a list of values (as dict) used to build a plain batch SQL insert 'INSERT INTO account_bank_statement_line (%s) VALUES (%s)'
The problem with the mp:197755 (https://code.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-70-account-not-mandatory/+merge/197755) is that if no value is provided for the account_id by the parser, the default value is added by the call to "statement_line_obj._add_missing_default_values(cr, uid, values, context)" at line 130 in account_statement_base_import.statement.py. (values = [.... {..., 'account_id':False, ..} ... ] )
As these values are used to build a plain SQL insert (" Insert into .... (..., account_id) values ((...,False )) the method fails with the exception: except_osv:
(u'Statement import error', u'The statement cannot be created: Error: except_osv\nDescription: (u\'ORM bypass error\', \'ERROR: column "account_id" is of type integer but expression is of type boolean\\nLINE 1: ...note, period_id, ref, statement_id, type) VALUES (false, \\\'{"...\\n ^\\nHINT: You will need to rewrite or cast the expression.\\n\')\nTraceback: File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_import/statement.py", line 195, in statement_import\n statement_line_obj._insert_lines(cr, uid, statement_store, context=context)\n File "/home/lmi/projects/openerp/openerp-deldrive-multi-company/addons-banking/account_statement_base_completion/statement.py", line 479, in _insert_lines\n sql_err.pgerror)\n') |
|
2014-04-28 15:02:11 |
Laurent Mignon (Acsone) |
banking-addons: assignee |
|
Laurent Mignon (Acsone) (lmi) |
|
2014-04-28 15:10:16 |
Launchpad Janitor |
branch linked |
|
lp:~acsone-openerp/banking-addons/bank-statement-reconcile-70-bug-1313689-lmi |
|
2014-05-05 13:49:08 |
Joël Grand-Guillaume @ camptocamp |
banking-addons: status |
New |
Confirmed |
|
2014-05-05 13:49:42 |
Joël Grand-Guillaume @ camptocamp |
banking-addons: importance |
Undecided |
High |
|
2014-05-05 13:50:53 |
Guewen Baconnier @ Camptocamp |
banking-addons: status |
Confirmed |
Fix Committed |
|
2014-05-05 14:40:32 |
Launchpad Janitor |
branch linked |
|
lp:banking-addons/bank-statement-reconcile-7.0 |
|
2014-05-05 14:41:30 |
Joël Grand-Guillaume @ camptocamp |
banking-addons: status |
Fix Committed |
Confirmed |
|
2014-05-07 09:05:52 |
Yannick Vaucher @ Camptocamp |
branch linked |
|
lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-fix-1313689 |
|
2014-05-23 09:42:13 |
Yannick Vaucher @ Camptocamp |
banking-addons: status |
Confirmed |
Fix Released |
|