mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_move_base_import: don't break without xlrd, add it to dependencies
This commit is contained in:
committed by
Florian da Costa
parent
0d6d54e3b6
commit
2353fe7034
@@ -18,6 +18,9 @@
|
||||
"views/journal_view.xml",
|
||||
"views/partner_view.xml",
|
||||
],
|
||||
'external_dependencies': {
|
||||
'python' : ['xlrd'],
|
||||
},
|
||||
'installable': True,
|
||||
'license': 'AGPL-3',
|
||||
}
|
||||
|
||||
@@ -5,14 +5,21 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
import datetime
|
||||
import tempfile
|
||||
import xlrd
|
||||
import logging
|
||||
|
||||
from odoo import _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
from .parser import AccountMoveImportParser, UnicodeDictReader
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
import xlrd
|
||||
except (ImportError, IOError) as err:
|
||||
_logger.debug(err)
|
||||
xlrd = False
|
||||
|
||||
|
||||
def float_or_zero(val):
|
||||
""" Conversion function used to manage
|
||||
|
||||
Reference in New Issue
Block a user