account_bank_statement_import_save_file: Migrated to 10.0

This commit is contained in:
Mourad Elhadj Mimoune
2017-03-24 12:12:12 +01:00
committed by Alexis de Lattre
parent b62222afbb
commit e07b0ac366
11 changed files with 102 additions and 217 deletions

View File

@@ -1,24 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2015 Therp BV <http://therp.nl>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import SUPERUSER_ID
# © 2015 Therp BV (<http://therp.nl>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
def _post_init_hook(cr, pool):
@@ -89,7 +71,6 @@ def _post_init_hook_migrate_account_banking_imported_file(cr, pool):
(tuple(attachment_ids),)
)
for attachment_id, content in cr.fetchall():
pool['ir.attachment'].write(
cr, SUPERUSER_ID,
pool['ir.attachment'].sudo().write(
[attachment_id],
{'datas': str(content)})