Skip to content

Commit

Permalink
[REF] read A1 through sudo()
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi committed Jul 5, 2023
1 parent 512cfbf commit 44a073f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,12 +727,12 @@ def _serialize(self, edocs):
return edocs

def _processador(self):
if not self.company_id.certificate_nfe_id:
if not self.company_id.sudo().certificate_nfe_id:
raise UserError(_("Certificado não encontrado"))

certificado = cert.Certificado(
arquivo=self.company_id.certificate_nfe_id.file,
senha=self.company_id.certificate_nfe_id.password,
arquivo=self.company_id.sudo().certificate_nfe_id.file,
senha=self.company_id.sudo().certificate_nfe_id.password,
)
session = Session()
session.verify = False
Expand Down
6 changes: 3 additions & 3 deletions l10n_br_nfe/models/invalidate_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ class InvalidateNumber(models.Model):
_inherit = "l10n_br_fiscal.invalidate.number"

def _processador(self):
if not self.company_id.certificate_nfe_id:
if not self.company_id.sudo().certificate_nfe_id:
raise UserError(_("Certificado não encontrado"))

certificado = cert.Certificado(
arquivo=self.company_id.certificate_nfe_id.file,
senha=self.company_id.certificate_nfe_id.password,
arquivo=self.company_id.sudo().certificate_nfe_id.file,
senha=self.company_id.sudo().certificate_nfe_id.password,
)
session = Session()
session.verify = False
Expand Down

0 comments on commit 44a073f

Please sign in to comment.