mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
protect import of external dependencies
Odoo won't install an addon if the external dependencies are not met. However, the python modules of the addons are imported at startup, and the lack of an external dependency for an external addon will cause a crash, therefore the import needs to be in a try..except block.
This commit is contained in:
committed by
Enric Tobella
parent
e0026cda62
commit
8e0b3e2afa
@@ -22,7 +22,11 @@
|
||||
|
||||
from openerp import models, fields, api
|
||||
from openerp.addons.decimal_precision import decimal_precision as dp
|
||||
from unidecode import unidecode
|
||||
|
||||
try:
|
||||
from unidecode import unidecode
|
||||
except ImportError:
|
||||
unidecode = None
|
||||
|
||||
|
||||
class BankingExportSepa(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user