NFS-e (FocusNFE)

l10n_br_nfse_focus
REPOSITORY
REPOSITORYOCA/l10n-brazil
GIT
GIThttps://github.com/OCA/l10n-brazil.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-brazil/tree/18.0/l10n_br_nfse_focus
VERSION
VERSION 3.2.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), KMEE, Escodoo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), KMEE, Escodoo
COMMITTERS
COMMITTERSRaphaël Valyi, Weblate, OCA-git-bot, oca-ci, CristianoMafraJunior, Cristiano Mafra Junior
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-brazil
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:09
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-brazil:
    - l10n_br_nfse
    - l10n_br_fiscal_edi
    - l10n_br_fiscal
    - l10n_br_base
    - l10n_br_fiscal_certificate
OCA/product-attribute:
    - uom_alias
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - base_address_extended
    - contacts
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES erpbrasil.base
erpbrasil.edoc
erpbrasil.transmissao
email-validator
num2words
phonenumbers
erpbrasil.assinatura
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Esse módulo integra a emissão de Notas Fiscais de Serviços (NFSe) com a
API da FocusNFE permitindo assim, a criação, transmissão, consulta e
cancelamento de documentos fiscais do tipo NFSe.

O módulo suporta dois tipos de emissão:
- **NFSe Municipal:** Emissão de NFSe através da API municipal da FocusNFE
- **NFSe Nacional:** Emissão de NFSe através da API nacional da FocusNFE

Para mais informações, acesse: <https://focusnfe.com.br/>

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
focus_nfse_res_company_form l10n_br_fiscal.res.company.form (in l10n_br_nfse_focus) res.company field Inherits l10n_br_nfse.nfse_res_company_form
Models touched (3)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (4)
  • cancel_document_focus(self)
    Cancel a NFSe document with the Focus NFSe provider. Parameters: None. Returns: The response regarding the cancellation request.
  • create_cancel_event(self, status_json, record)
    Create a cancel event and process it. Parameters: record: The NFSe record that is being canceled. Returns: The created event.
  • fetch_and_verify_pdf_content(self, status_json, record)
    Fetch and verify the PDF content from the provided URL. Parameters: status_json: JSON response containing the URLs for the PDF. record: The NFSe record for which the PDF is being retrieved. Returns: None. Updates the record with the PDF content if valid.
  • make_focus_nfse_pdf(self, content)
    Generate a PDF for a NFSe document using Focus NFSe service. Parameters: - content: The binary content of the PDF to be attached. Returns: None. Creates or updates an 'ir.attachment' record with the PDF content.

New fields (9)
  • focusnfe_homologation_token Char
    string='FocusNFe Homologation Token'
  • focusnfe_nfse_cnae_code_value Selection
    default='codigo_cnae' string='NFSE CNAE Code Value' args: [('codigo_cnae', 'CNAE Code'), ('codigo_tributacao_municipio', 'City Taxation Code')]
  • focusnfe_nfse_force_odoo_danfse Boolean
    default=False help='If checked, the system will always use the Odoo DANFSE instead of the Focus DANFSE.' string='Force Odoo DANFSE'
  • focusnfe_nfse_service_type_value Selection
    default='item_lista_servico' string='NFSE Service Type Value' args: [('item_lista_servico', 'Service Type'), ('codigo_tributacao_municipio', 'City Taxation Code'), ('codigo_tributacao_nacional', 'National Taxation Code')]
  • focusnfe_nfse_type Selection
    default='nfse' help='Select whether to use NFSe (municipal) or NFSe Nacional (national) API' string='FocusNFe NFSe Type' args: [('nfse', 'NFSe'), ('nfse_nacional', 'NFSe Nacional')]
  • focusnfe_nfse_update_authorized_document_status Boolean
    default=False help='If checked, authorized documents will be included in the status check wizard. The system will verify the status of the documents with Focus NFE, and if there are discrepancies with the status in Odoo, it will automatically update the status in the system.' string='Include Authorized Documents in Status Check'
  • focusnfe_production_token Char
    string='FocusNFe Production Token'
  • focusnfe_tax_rate_format Selection
    default='decimal' args: [('decimal', 'Decimal'), ('percentage', 'Percentage')]
  • provedor_nfse Selection
    selection_add=[('focusnfe', 'FocusNFe')]
Public methods (1)
  • get_focusnfe_token(self)
    Retrieve the appropriate FocusNFe API token based on the current NFSe environment setting. Decide between the production and homologation (test) environment tokens by examining the 'nfse_environment' field of the record. Precondition: - Call this method on a single record only. The method uses ensure_one to enforce this rule. Returns: - str: The FocusNFe token. Return the production token if 'nfse_environment' is set to "1"; otherwise, return the homologation token. Raises: - ValueError: If the method is called on a recordset containing more than one record.
REPOSITORY
REPOSITORYOCA/l10n-brazil
GIT
GIThttps://github.com/OCA/l10n-brazil.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-brazil/tree/17.0/l10n_br_nfse_focus
VERSION
VERSION 2.3.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), KMEE, Escodoo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), KMEE, Escodoo
COMMITTERS
COMMITTERSRaphaël Valyi, Weblate, OCA-git-bot, oca-ci, CristianoMafraJunior, Cristiano Mafra Junior
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-brazil
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:03
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-brazil:
    - l10n_br_nfse
    - l10n_br_fiscal_edi
    - l10n_br_fiscal
    - l10n_br_base
    - l10n_br_fiscal_certificate
OCA/product-attribute:
    - uom_alias
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - base_address_extended
    - contacts
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES erpbrasil.base
erpbrasil.edoc
erpbrasil.transmissao
email-validator
num2words
phonenumbers
erpbrasil.assinatura
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Esse módulo integra a emissão de Notas Fiscais de Serviços (NFSe) com a
API da FocusNFE permitindo assim, a criação, transmissão, consulta e
cancelamento de documentos fiscais do tipo NFSe.

O módulo suporta dois tipos de emissão:
- **NFSe Municipal:** Emissão de NFSe através da API municipal da FocusNFE
- **NFSe Nacional:** Emissão de NFSe através da API nacional da FocusNFE

Para mais informações, acesse: <https://focusnfe.com.br/>

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
focus_nfse_res_company_form l10n_br_fiscal.res.company.form (in l10n_br_nfse_focus) res.company field Inherits l10n_br_nfse.nfse_res_company_form
Models touched (3)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (4)
  • cancel_document_focus(self)
    Cancel a NFSe document with the Focus NFSe provider. Parameters: None. Returns: The response regarding the cancellation request.
  • create_cancel_event(self, status_json, record)
    Create a cancel event and process it. Parameters: record: The NFSe record that is being canceled. Returns: The created event.
  • fetch_and_verify_pdf_content(self, status_json, record)
    Fetch and verify the PDF content from the provided URL. Parameters: status_json: JSON response containing the URLs for the PDF. record: The NFSe record for which the PDF is being retrieved. Returns: None. Updates the record with the PDF content if valid.
  • make_focus_nfse_pdf(self, content)
    Generate a PDF for a NFSe document using Focus NFSe service. Parameters: - content: The binary content of the PDF to be attached. Returns: None. Creates or updates an 'ir.attachment' record with the PDF content.

New fields (9)
  • focusnfe_homologation_token Char
    string='FocusNFe Homologation Token'
  • focusnfe_nfse_cnae_code_value Selection
    default='codigo_cnae' string='NFSE CNAE Code Value' args: [('codigo_cnae', 'CNAE Code'), ('codigo_tributacao_municipio', 'City Taxation Code')]
  • focusnfe_nfse_force_odoo_danfse Boolean
    default=False help='If checked, the system will always use the Odoo DANFSE instead of the Focus DANFSE.' string='Force Odoo DANFSE'
  • focusnfe_nfse_service_type_value Selection
    default='item_lista_servico' string='NFSE Service Type Value' args: [('item_lista_servico', 'Service Type'), ('codigo_tributacao_municipio', 'City Taxation Code'), ('codigo_tributacao_nacional', 'National Taxation Code')]
  • focusnfe_nfse_type Selection
    default='nfse' help='Select whether to use NFSe (municipal) or NFSe Nacional (national) API' string='FocusNFe NFSe Type' args: [('nfse', 'NFSe'), ('nfse_nacional', 'NFSe Nacional')]
  • focusnfe_nfse_update_authorized_document_status Boolean
    default=False help='If checked, authorized documents will be included in the status check wizard. The system will verify the status of the documents with Focus NFE, and if there are discrepancies with the status in Odoo, it will automatically update the status in the system.' string='Include Authorized Documents in Status Check'
  • focusnfe_production_token Char
    string='FocusNFe Production Token'
  • focusnfe_tax_rate_format Selection
    default='decimal' args: [('decimal', 'Decimal'), ('percentage', 'Percentage')]
  • provedor_nfse Selection
    selection_add=[('focusnfe', 'FocusNFe')]
Public methods (1)
  • get_focusnfe_token(self)
    Retrieve the appropriate FocusNFe API token based on the current NFSe environment setting. Decide between the production and homologation (test) environment tokens by examining the 'nfse_environment' field of the record. Precondition: - Call this method on a single record only. The method uses ensure_one to enforce this rule. Returns: - str: The FocusNFe token. Return the production token if 'nfse_environment' is set to "1"; otherwise, return the homologation token. Raises: - ValueError: If the method is called on a recordset containing more than one record.
REPOSITORY
REPOSITORYOCA/l10n-brazil
GIT
GIThttps://github.com/OCA/l10n-brazil.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_nfse_focus
VERSION
VERSION 2.3.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), KMEE, Escodoo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), KMEE, Escodoo
COMMITTERS
COMMITTERSRaphaël Valyi, Weblate, OCA-git-bot, oca-ci, Marcel Savegnago, Antonio Neto, Wesley Oliveira, CristianoMafraJunior, Cristiano Mafra Junior
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-brazil
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:11:56
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-brazil:
    - l10n_br_nfse
    - l10n_br_fiscal_edi
    - l10n_br_fiscal
    - l10n_br_base
    - l10n_br_fiscal_certificate
OCA/product-attribute:
    - uom_alias
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - base_address_extended
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES erpbrasil.base
erpbrasil.edoc
erpbrasil.transmissao
email-validator
num2words
phonenumbers
erpbrasil.assinatura
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Esse módulo integra a emissão de Notas Fiscais de Serviços (NFSe) com a
API da FocusNFE permitindo assim, a criação, transmissão, consulta e
cancelamento de documentos fiscais do tipo NFSe.

O módulo suporta dois tipos de emissão:
- **NFSe Municipal:** Emissão de NFSe através da API municipal da FocusNFE
- **NFSe Nacional:** Emissão de NFSe através da API nacional da FocusNFE

Para mais informações, acesse: <https://focusnfe.com.br/>

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
focus_nfse_res_company_form l10n_br_fiscal.res.company.form (in l10n_br_nfse_focus) res.company field Inherits l10n_br_nfse.nfse_res_company_form
Models touched (3)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (4)
  • cancel_document_focus(self)
    Cancel a NFSe document with the Focus NFSe provider. Parameters: None. Returns: The response regarding the cancellation request.
  • create_cancel_event(self, status_json, record)
    Create a cancel event and process it. Parameters: record: The NFSe record that is being canceled. Returns: The created event.
  • fetch_and_verify_pdf_content(self, status_json, record)
    Fetch and verify the PDF content from the provided URL. Parameters: status_json: JSON response containing the URLs for the PDF. record: The NFSe record for which the PDF is being retrieved. Returns: None. Updates the record with the PDF content if valid.
  • make_focus_nfse_pdf(self, content)
    Generate a PDF for a NFSe document using Focus NFSe service. Parameters: - content: The binary content of the PDF to be attached. Returns: None. Creates or updates an 'ir.attachment' record with the PDF content.

New fields (9)
  • focusnfe_homologation_token Char
    string='FocusNFe Homologation Token'
  • focusnfe_nfse_cnae_code_value Selection
    default='codigo_cnae' string='NFSE CNAE Code Value' args: [('codigo_cnae', 'CNAE Code'), ('codigo_tributacao_municipio', 'City Taxation Code')]
  • focusnfe_nfse_force_odoo_danfse Boolean
    default=False help='If checked, the system will always use the Odoo DANFSE instead of the Focus DANFSE.' string='Force Odoo DANFSE'
  • focusnfe_nfse_service_type_value Selection
    default='item_lista_servico' string='NFSE Service Type Value' args: [('item_lista_servico', 'Service Type'), ('codigo_tributacao_municipio', 'City Taxation Code'), ('codigo_tributacao_nacional', 'National Taxation Code')]
  • focusnfe_nfse_type Selection
    default='nfse' help='Select whether to use NFSe (municipal) or NFSe Nacional (national) API' string='FocusNFe NFSe Type' args: [('nfse', 'NFSe'), ('nfse_nacional', 'NFSe Nacional')]
  • focusnfe_nfse_update_authorized_document_status Boolean
    default=False help='If checked, authorized documents will be included in the status check wizard. The system will verify the status of the documents with Focus NFE, and if there are discrepancies with the status in Odoo, it will automatically update the status in the system.' string='Include Authorized Documents in Status Check'
  • focusnfe_production_token Char
    string='FocusNFe Production Token'
  • focusnfe_tax_rate_format Selection
    default='decimal' args: [('decimal', 'Decimal'), ('percentage', 'Percentage')]
  • provedor_nfse Selection
    selection_add=[('focusnfe', 'FocusNFe')]
Public methods (1)
  • get_focusnfe_token(self)
    Retrieve the appropriate FocusNFe API token based on the current NFSe environment setting. Decide between the production and homologation (test) environment tokens by examining the 'nfse_environment' field of the record. Precondition: - Call this method on a single record only. The method uses ensure_one to enforce this rule. Returns: - str: The FocusNFe token. Return the production token if 'nfse_environment' is set to "1"; otherwise, return the homologation token. Raises: - ValueError: If the method is called on a recordset containing more than one record.
REPOSITORY
REPOSITORYOCA/l10n-brazil
GIT
GIThttps://github.com/OCA/l10n-brazil.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-brazil/tree/15.0/l10n_br_nfse_focus
VERSION
VERSION 1.3.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), KMEE, Escodoo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), KMEE, Escodoo
COMMITTERS
COMMITTERSRaphaël Valyi, OCA-git-bot, oca-ci, CristianoMafraJunior
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-brazil
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:31
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-brazil:
    - l10n_br_nfse
    - l10n_br_fiscal_edi
    - l10n_br_fiscal
    - l10n_br_base
    - l10n_br_fiscal_certificate
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - base_address_city
    - base_address_extended
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES erpbrasil.base
erpbrasil.edoc>=2.5.2
erpbrasil.transmissao>=1.1.0
email-validator
num2words
phonenumbers
erpbrasil.assinatura
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
focus_nfse_res_company_form l10n_br_fiscal.res.company.form (in l10n_br_nfse_focus) res.company field Inherits l10n_br_nfse.nfse_res_company_form
Models touched (3)

New fields (0)

No new fields.

Public methods (3)
  • cancel_focus_nfse_document(self, ref, cancel_reason, company, environment)
    @api.model
    Cancel an electronic fiscal document. Args: ref (str): The document reference. cancel_reason (str): The reason for cancellation. company (recordset): The company record. Returns: requests.Response: The response from the NFSe service.
  • process_focus_nfse_document(self, edoc, ref, company, environment)
    @api.model
    Process the electronic fiscal document. Args: edoc (tuple): The electronic document data. ref (str): The document reference. company (recordset): The company record. Returns: requests.Response: The response from the NFSe service.
  • query_focus_nfse_by_rps(self, ref, complete, company, environment)
    @api.model
    Query NFSe by RPS. Args: ref (str): The RPS reference. complete (bool): Whether to return complete information. company (recordset): The company record. Returns: requests.Response: The response from the NFSe service.

New fields (0)

No new fields.

Public methods (2)
  • cancel_document_focus(self)
    Cancel a NFSe document with the Focus NFSe provider. Parameters: None. Returns: The response regarding the cancellation request.
  • make_focus_nfse_pdf(self, content)
    Generate a PDF for a NFSe document using Focus NFSe service. Parameters: - content: The binary content of the PDF to be attached. Returns: None. Creates or updates an 'ir.attachment' record with the PDF content.

New fields (6)
  • focusnfe_homologation_token Char
    string='FocusNFe Homologation Token'
  • focusnfe_nfse_cnae_code_value Selection
    default='codigo_cnae' string='NFSE CNAE Code Value' args: [('codigo_cnae', 'CNAE Code'), ('codigo_tributacao_municipio', 'City Taxation Code')]
  • focusnfe_nfse_service_type_value Selection
    default='item_lista_servico' string='NFSE Service Type Value' args: [('item_lista_servico', 'Service Type'), ('codigo_tributacao_municipio', 'City Taxation Code')]
  • focusnfe_production_token Char
    string='FocusNFe Production Token'
  • focusnfe_tax_rate_format Selection
    default='decimal' args: [('decimal', 'Decimal'), ('percentage', 'Percentage')]
  • provedor_nfse Selection
    selection_add=[('focusnfe', 'FocusNFe')]
Public methods (1)
  • get_focusnfe_token(self)
    Retrieve the appropriate FocusNFe API token based on the current NFSe environment setting. Decide between the production and homologation (test) environment tokens by examining the 'nfse_environment' field of the record. Precondition: - Call this method on a single record only. The method uses ensure_one to enforce this rule. Returns: - str: The FocusNFe token. Return the production token if 'nfse_environment' is set to "1"; otherwise, return the homologation token. Raises: - ValueError: If the method is called on a recordset containing more than one record.
REPOSITORY
REPOSITORYOCA/l10n-brazil
GIT
GIThttps://github.com/OCA/l10n-brazil.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_nfse_focus
VERSION
VERSION 2.1.3
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), KMEE, Escodoo
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), KMEE, Escodoo
COMMITTERS
COMMITTERSRaphaël Valyi, Weblate, OCA-git-bot, oca-ci, Marcel Savegnago, Antônio Neto, Wesley Oliveira, Kaynnan Lemes, CristianoMafraJunior, kaynnan
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-brazil
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:54
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-brazil:
    - l10n_br_nfse
    - l10n_br_fiscal_edi
    - l10n_br_fiscal
    - l10n_br_base
    - l10n_br_fiscal_certificate
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - base_address_city
    - base_address_extended
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES erpbrasil.base
erpbrasil.edoc
erpbrasil.transmissao
email-validator
num2words
phonenumbers
erpbrasil.assinatura
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
focus_nfse_res_company_form l10n_br_fiscal.res.company.form (in l10n_br_nfse_focus) res.company field Inherits l10n_br_nfse.nfse_res_company_form
Models touched (3)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (4)
  • cancel_document_focus(self)
    Cancel a NFSe document with the Focus NFSe provider. Parameters: None. Returns: The response regarding the cancellation request.
  • create_cancel_event(self, status_json, record)
    Create a cancel event and process it. Parameters: record: The NFSe record that is being canceled. Returns: The created event.
  • fetch_and_verify_pdf_content(self, status_json, record)
    Fetch and verify the PDF content from the provided URL. Parameters: status_json: JSON response containing the URLs for the PDF. record: The NFSe record for which the PDF is being retrieved. Returns: None. Updates the record with the PDF content if valid.
  • make_focus_nfse_pdf(self, content)
    Generate a PDF for a NFSe document using Focus NFSe service. Parameters: - content: The binary content of the PDF to be attached. Returns: None. Creates or updates an 'ir.attachment' record with the PDF content.

New fields (9)
  • focusnfe_homologation_token Char
    string='FocusNFe Homologation Token'
  • focusnfe_nfse_cnae_code_value Selection
    default='codigo_cnae' string='NFSE CNAE Code Value' args: [('codigo_cnae', 'CNAE Code'), ('codigo_tributacao_municipio', 'City Taxation Code')]
  • focusnfe_nfse_force_odoo_danfse Boolean
    default=False help='If checked, the system will always use the Odoo DANFSE instead of the Focus DANFSE.' string='Force Odoo DANFSE'
  • focusnfe_nfse_service_type_value Selection
    default='item_lista_servico' string='NFSE Service Type Value' args: [('item_lista_servico', 'Service Type'), ('codigo_tributacao_municipio', 'City Taxation Code'), ('codigo_tributacao_nacional', 'National Taxation Code')]
  • focusnfe_nfse_type Selection
    default='nfse' help='Select whether to use NFSe (municipal) or NFSe Nacional (national) API' string='FocusNFe NFSe Type' args: [('nfse', 'NFSe'), ('nfse_nacional', 'NFSe Nacional')]
  • focusnfe_nfse_update_authorized_document_status Boolean
    default=False help='If checked, authorized documents will be included in the status check wizard. The system will verify the status of the documents with Focus NFE, and if there are discrepancies with the status in Odoo, it will automatically update the status in the system.' string='Include Authorized Documents in Status Check'
  • focusnfe_production_token Char
    string='FocusNFe Production Token'
  • focusnfe_tax_rate_format Selection
    default='decimal' args: [('decimal', 'Decimal'), ('percentage', 'Percentage')]
  • provedor_nfse Selection
    selection_add=[('focusnfe', 'FocusNFe')]
Public methods (1)
  • get_focusnfe_token(self)
    Retrieve the appropriate FocusNFe API token based on the current NFSe environment setting. Decide between the production and homologation (test) environment tokens by examining the 'nfse_environment' field of the record. Precondition: - Call this method on a single record only. The method uses ensure_one to enforce this rule. Returns: - str: The FocusNFe token. Return the production token if 'nfse_environment' is set to "1"; otherwise, return the homologation token. Raises: - ValueError: If the method is called on a recordset containing more than one record.