TIP: You can type at any time to perform a new search.
NFS-e (FocusNFE)
l10n_br_nfse_focus · OCA/l10n-brazil
- Repository
- OCA/l10n-brazil · module folder · Try on Runboat
- Module version
- Category
- Uncategorized
- Folder size
- 0.19 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/l10n-brazil
- Last tracking update
- 2026-08-20 17:13:52
- Authors
- Odoo Community Association (OCA), KMEE, Escodoo
- Maintainers
- Odoo Community Association (OCA), KMEE, Escodoo
- Committers
- Raphaël Valyi, Weblate, OCA-git-bot, oca-ci, Ygor Carvalho, CristianoMafraJunior, Cristiano Mafra Junior
- Odoo dependencies
- Python dependencies
- erpbrasil.base, erpbrasil.edoc, erpbrasil.transmissao, email-validator, num2words, phonenumbers, erpbrasil.assinatura
- System dependencies
- None
- Required by
- None
- 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 ID | Name | Model | Type | Status |
|---|---|---|---|---|
focus_nfse_res_company_form |
l10n_br_fiscal.res.company.form (in l10n_br_nfse_focus) | res.company | form | Inherits l10n_br_nfse.nfse_res_company_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
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 (10)
-
focusnfe_homologation_tokenCharstring='FocusNFe Homologation Token' -
focusnfe_nfse_cnae_code_valueSelectiondefault='codigo_cnae'string='NFSE CNAE Code Value' args: [('codigo_cnae', 'CNAE Code'), ('codigo_tributacao_municipio', 'City Taxation Code')] -
focusnfe_nfse_force_odoo_danfseBooleandefault=Falsehelp='If checked, the system will always use the Odoo DANFSE instead of the Focus DANFSE.'string='Force Odoo DANFSE' -
focusnfe_nfse_nacional_send_im_prestadorBooleandefault=Truestring='Send Provider Municipal Registration (NFSe Nacional)' -
focusnfe_nfse_service_type_valueSelectiondefault='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_typeSelectiondefault='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_statusBooleandefault=Falsehelp='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_tokenCharstring='FocusNFe Production Token' -
focusnfe_tax_rate_formatSelectiondefault='decimal' args: [('decimal', 'Decimal'), ('percentage', 'Percentage')] -
provedor_nfseSelectionselection_add=[('focusnfe', 'FocusNFe')]
-
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.
Loading…
Loading…
Loading…
Loading…