Skip to content

Commit

Permalink
Merge PR #2753 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by rvalyi
  • Loading branch information
OCA-git-bot committed Oct 27, 2023
2 parents 7556d74 + 784cda6 commit 16caef0
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion l10n_br_fiscal/models/document_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def _save_event_2disk(self, arquivo, file_name):
if not os.path.exists(save_dir):
os.makedirs(save_dir)
f = open(file_path, "w")
except IOError as e:
except OSError as e:
raise UserError(
_("Erro!"),
_(
Expand Down
1 change: 0 additions & 1 deletion l10n_br_fiscal/models/subsequent_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# License AGPL-3 or later (http://www.gnu.org/licenses/agpl)
#

from __future__ import division, print_function, unicode_literals

from odoo import api, fields, models

Expand Down
2 changes: 0 additions & 2 deletions l10n_br_fiscal/models/subsequent_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html


from __future__ import division, print_function, unicode_literals

from odoo import fields, models

from ..constants.fiscal import SITUACAO_EDOC
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_fiscal/wizards/document_import_wizard_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from odoo import fields, models

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


class DocumentImportWizardMixin(models.TransientModel):
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_fiscal_dfe/tests/test_dfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
response_rejeicao = """<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><nfeDistDFeInteresseResponse xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeDistribuicaoDFe"><nfeDistDFeInteresseResult><retDistDFeInt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.01"><tpAmb>2</tpAmb><verAplic>1.4.0</verAplic><cStat>589</cStat><xMotivo>Rejeicao: Numero do NSU informado superior ao maior NSU da base de dados doAmbiente Nacional</xMotivo><dhResp>2022-04-04T11:54:49-03:00</dhResp><ultNSU>000000000000000</ultNSU><maxNSU>000000000000000</maxNSU></retDistDFeInt></nfeDistDFeInteresseResult></nfeDistDFeInteresseResponse></soap:Body></soap:Envelope>"""


class FakeRetorno(object):
class FakeRetorno:
def __init__(self, text, status_code=200):
self.text = text
self.content = text.encode("utf-8")
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_ie_search/tests/test_sefaz.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from odoo.tools.misc import format_date


class FakeRetorno(object):
class FakeRetorno:
__slots__ = "text", "ok"


Expand Down
2 changes: 1 addition & 1 deletion l10n_br_ie_search/tests/test_sintegra.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
_logger = logging.getLogger(__name__)


class FakeRetorno(object):
class FakeRetorno:
__slots__ = "text", "status_code"

def json(self):
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe/tests/test_nfce.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
response_contingency = """<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><nfeResultMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeAutorizacao4"><retEnviNFe xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00"><tpAmb>2</tpAmb><verAplic>4.0.0</verAplic><cStat>108</cStat><xMotivo>Rejeição: Duplicidade de NF-e</xMotivo><cUF>33</cUF><dhRecbto>2023-08-08T10:30:00-03:00</dhRecbto><infRec><nRec>123456789012345</nRec><tMed>1</tMed></infRec></retEnviNFe></nfeResultMsg></soap:Body></soap:Envelope>"""


class FakeRetorno(object):
class FakeRetorno:
def __init__(self, text):
self.text = text
self.content = text.encode("utf-8")
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe/tests/test_nfe_mde.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
response_operacao_nao_realizada = """<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><nfeResultMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeRecepcaoEvento4"><retEnvEvento xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.00"><idLote /><tpAmb>2</tpAmb><verAplic>SVRS202305251555</verAplic><cStat>135</cStat><retEvento versao="1.00"><infEvento><tpAmb>2</tpAmb><verAplic>SVRS202305251555</verAplic><cStat>135</cStat><xMotivo>Teste Operação não Realizada.</xMotivo><chNFe>31201010588201000105550010038421171838422178</chNFe><tpEvento>210240</tpEvento><xEvento>Operacao nao Realizada registrada</xEvento><nSeqEvento>1</nSeqEvento><CNPJDest>81583054000129</CNPJDest><dhRegEvento>2023-07-10T10:00:00-03:00</dhRegEvento></infEvento></retEvento></retEnvEvento></nfeResultMsg></soap:Body></soap:Envelope>"""


class FakeRetorno(object):
class FakeRetorno:
def __init__(self, text, status_code=200):
self.text = text
self.content = text.encode("utf-8")
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe/tests/test_nfe_webservices.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def is_libreoffice_command_available():
return False


class FakeRetorno(object):
class FakeRetorno:
def __init__(self, text):
self.text = text
self.content = text.encode("utf-8")
Expand Down

0 comments on commit 16caef0

Please sign in to comment.