summaryrefslogtreecommitdiff
path: root/addons/base_import/static/csv/database_import_test.sql
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2016-03-22 17:06:53 +0100
committerDenis Ledoux <dle@odoo.com>2016-03-22 17:12:01 +0100
commit9e624671d2fea68d6693a1276cad8ce716389320 (patch)
tree2d375c0a82c4fa8525bc31f2304267993875a5f4 /addons/base_import/static/csv/database_import_test.sql
parente94be1856c0a156000ba226d547ba6c18bd1caea (diff)
[FIX] account: bank statement lines order on write
When adding new lines to an existing statement, the order of the lines was not kept, due to the re-sequencing operation done in the override of `write` in `account.bank.statement`: ``` for statement in self.browse(cr, uid, ids, context): for idx, line in enumerate(statement.line_ids): account_bank_statement_line_obj.write(cr, uid, [line.id], {'sequence': idx + 1}, context=context) ``` as the lines order was based on `statement_id desc, sequence`, which is the same for all lines added, (except if the order is forced in the web client, using the handle widget) and, therefore, the order of the lines returned by `statement.line_ids` was not determinist. Adding the `id` to the lines order (as it's done in `sale.order`, for instance), solves the issue, as the lines will then be fetched in the order they were created. opw-667541
Diffstat (limited to 'addons/base_import/static/csv/database_import_test.sql')
0 files changed, 0 insertions, 0 deletions