Skip to content

Commit

Permalink
[REF] l10n_br_pos_cfe: Inform python external dependencies make unnec…
Browse files Browse the repository at this point in the history
…essary use TRY to import a library.
  • Loading branch information
mbcosta committed Oct 25, 2023
1 parent 6c356c9 commit f530dce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 4 additions & 1 deletion l10n_br_pos_cfe/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"l10n_br_pos",
],
"external_dependencies": {
"python": ["satcomum"],
"python": [
"satcomum",
"erpbrasil.base>=2.3.0",
],
},
"data": [
# Views
Expand Down
10 changes: 2 additions & 8 deletions l10n_br_pos_cfe/models/pos_order.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# © 2016 KMEE INFORMATICA LTDA (https://kmee.com.br)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import logging

from satcomum.ersat import ChaveCFeSAT

from odoo import api, models

from odoo.addons.l10n_br_fiscal.constants.fiscal import MODELO_FISCAL_CFE

_logger = logging.getLogger(__name__)

try:
from satcomum.ersat import ChaveCFeSAT
except ImportError:
_logger.error("Biblioteca satcomum não instalada")


class PosOrder(models.Model):
_inherit = "pos.order"
Expand Down

0 comments on commit f530dce

Please sign in to comment.