TIP: You can type at any time to perform a new search.

Security findings

Repository
OCA/l10n-brazil · module folder · Try on Runboat
Module version
Category
Localisation
Folder size
1.0 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-brazil
Last tracking update
2026-10-03 23:56:48
Authors
Akretion, Odoo Community Association (OCA), KMEE
Maintainers
Akretion, Odoo Community Association (OCA), KMEE
Committers
Raphaël Valyi, Renato Lima, Weblate, Luis Felipe Mileo, mileo, OCA-git-bot, oca-ci, Magno Costa, CristianoMafraJunior, espadas
Odoo dependencies
Python dependencies
brazilfiscalreport>=1.1.0, erpbrasil-base>=2.4.2, erpbrasil.assinatura, erpbrasil.edoc, erpbrasil.transmissao, nfelib>=2.6.0, transitions, email-validator, num2words, phonenumbers
System dependencies
None
Required by
l10n_br_account_nfe, l10n_br_delivery_nfe, l10n_br_ie_search, l10n_br_nfe_dfe
Description
Este módulo permite a emissão de NF-e.

Mais especificamente ele:  
- mapea os campos de NF-e do módulo `l10n_br_nfe_spec` com os campos
  Odoo em especial os campos dos módulos `l10n_br_base` e
  `l10n_br_fiscal`
- usa a logica do módulo `spec_driven_model` para realizar esse
  mapeamento de forma dinâmica, em especial ele usa o sistema de modelos
  com várias camadas, ou `StackedModel`, com os modelos
  `l10n_br_fiscal.document`, `l10n_br_fiscal.document.line` e
  `l10n_br_fiscal.document.related` que tem varios niveis hierarquicos
  de elementos XML que estão sendo denormalizados dentro desses modelos
  Odoo 
- permite a exportação e importação de XML de NF-e
- tem wizards para implementar a comunicação SOAP de NF-e com a SEFAZ
  (Autorização, Cancelamento, Inutilização...)
- implementa a autorização, inutilização e contingência de documentos
  NFC-e

Módulos relacionados:  
- este módulo não depende do módulo `account` do Odoo. A integração com
  o financeiro do módulo `account` é realizada no módulo
  `l10n_br_account_nfe` (tags dup e pag em especial)
- existe também o módulo `l10n_br_delivery_nfe` que faz a integração do
  módulo `l10n_br_nfe` com o módulo `delivery` do Odoo (tags de
  transportadora e de frete em especial)

Code Analysis info_outline

Views touched (21)
XML IDNameModelTypeStatus
danfe_profile_form l10n_br_nfe.danfe.profile.form l10n_br_nfe.danfe.profile form New
danfe_profile_search l10n_br_nfe.danfe.profile.search l10n_br_nfe.danfe.profile search New
danfe_profile_tree l10n_br_nfe.danfe.profile.tree l10n_br_nfe.danfe.profile list New
document_import_wizard_form document_import_wizard.form l10n_br_fiscal.document.import.wizard form Inherits l10n_br_fiscal.document_import_wizard_form
l10n_br_nfe_import_xml_products_tree l10n_br_nfe.import_xml.products.tree l10n_br_nfe.import_xml.products list New
l10n_br_nfe_product_supplierinfo_form_view l10n_br_nfe.product.supplierinfo.form.view product.supplierinfo form Inherits product.product_supplierinfo_form_view
l10n_br_nfe_product_supplierinfo_tree_view l10n_br_nfe.product.supplierinfo.tree.view product.supplierinfo tree Inherits product.product_supplierinfo_tree_view
l10n_br_nfe_recipient_manifestation_event_form l10n_br_nfe_recipient_manifestation_event_form l10n_br_nfe.md_event form New
l10n_br_nfe_recipient_manifestation_event_tree l10n_br_nfe_recipient_manifestation_event_tree l10n_br_nfe.md_event list New
nfe_40_infadic_form nfe.40.infadic.form nfe.40.infadic form New
nfe_40_vol_form nfe.40.vol.form nfe.40.vol form New
nfe_di_form nfe.40.di.form nfe.40.di form New
nfe_di_tree nfe.40.di.tree nfe.40.di list New
nfe_document_edi_form_inherit l10n_br_nfe_edi.document.form.inherit l10n_br_fiscal.document form Inherits l10n_br_fiscal_edi.document_form
nfe_document_form_inherit l10n_br_nfe.document.form.inherit l10n_br_fiscal.document form Inherits l10n_br_fiscal_edi.document_form
nfe_document_line_form l10n_br_nfe.document.line.form l10n_br_fiscal.document.line form Inherits l10n_br_fiscal.document_line_form
nfe_res_company_form nfe.res.company.form res.company form Inherits l10n_br_fiscal.fiscal_res_company_form
nfe_res_config_settings_form nfe.res.config.settings.view.form res.config.settings form Inherits l10n_br_fiscal.l10n_br_fiscal_res_config_settings_form
report_danfe_nfce report_danfe_nfce ir.ui.view qweb New
view_l10n_br_nfe_recipient_manifestation_event_filter l10n_br_nfe_recipient_manifestation_event_select l10n_br_nfe.md_event search New
view_nfe_recipient_manifestation_event_wizard_form nfe_recipient_manifestation_event.wizard.form nfe_recipient_manifestation_event.wizard form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (20)

New fields (0)

No new fields.

Public methods (1)
  • render_danfe_brazilfiscalreport(self, nfe, nfe_xml)

New fields (0)

No new fields.

Public methods (1)
  • match_or_create_m2o(self, rec_dict, parent_dict, model=None)
    @api.model
    If CEST not found, break hard, don't create it

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • imported_products_ids One2many → l10n_br_nfe.import_xml.products
    comodel_name='l10n_br_nfe.import_xml.products' inverse_name='import_xml_id' string='Imported Products'
  • nat_op Char
    string='Natureza da Operação'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • match_or_create_m2o(self, rec_dict, parent_dict, model=None)
    @api.model
    If IpiGuideline not found, break hard, don't create it

New fields (23)
  • active Boolean
    default=True
  • carrier_receipt Boolean
    help='Print an extra receipt for the carrier to sign when collecting the goods, besides the delivery receipt. It is only printed when the NF-e has a carrier.'
  • company_ids Many2many → res.company
    comodel_name='res.company' compute='_compute_company_ids' help='Companies printing their DANFEs with this profile. Adding a company here replaces its current profile.' inverse='_inverse_company_ids' string='Companies'
  • display_anp Boolean
    help='Print the ANP fuel data (product code, description and state of consumption) in the product description.' string='Display ANP Data'
  • display_anvisa Boolean
    help='Print the ANVISA medicine data (product code and maximum consumer price) in the product description.' string='Display ANVISA Data'
  • display_lot Boolean
    help='Print the traceability data (lot number, quantity, manufacturing and expiration dates) in the product description.' string='Display Lot Data'
  • display_pis_cofins Boolean
    help='Select whether PIS and COFINS should be displayed in DANFE.' string='Display PIS/COFINS'
  • display_product_additional_info Boolean
    default=True help='Print the product additional information (infAdProd) in the product description.'
  • font_size Selection
    default=DANFE_FONT_SIZE_DEFAULT required=True selection=DANFE_FONT_SIZES
  • font_type Selection
    default=DANFE_FONT_TYPE_DEFAULT required=True selection=DANFE_FONT_TYPES
  • footer_stamp_logo Binary
    help='Logo printed at the bottom right corner of each DANFE page.'
  • footer_stamp_text Char
    help='Text printed at the bottom of each DANFE page, to the left of the footer stamp logo.'
  • infcpl_semicolon_newline Boolean
    help='Start a new line at each semicolon (;) of the additional information (infCpl).' string='Break Additional Info on Semicolons'
  • invoice_display Selection
    default=DANFE_INVOICE_DISPLAY_DEFAULT help='Choose to generate a full or incomplete invoice frame in the DANFE.' required=True selection=DANFE_INVOICE_DISPLAY
  • lot_prefix Char
    help='Text printed before the lot data of each product.' string='Lot Data Prefix'
  • margin_bottom Integer
    default=5 help='Bottom margin in mm.'
  • margin_left Integer
    default=5 help='Left margin in mm.'
  • margin_right Integer
    default=5 help='Right margin in mm.'
  • margin_top Integer
    default=5 help='Top margin in mm.'
  • name Char
    required=True translate=True
  • price_precision Integer
    default=4 help='Number of decimal places used to print the unit prices.' string='Unit Price Precision'
  • quantity_precision Integer
    default=4 help='Number of decimal places used to print the quantities.'
  • receipt_position Selection
    default=DANFE_RECEIPT_POSITION_DEFAULT help='Position of the receipt (canhoto) in portrait DANFEs. Landscape DANFEs always print it on the left side.' required=True selection=DANFE_RECEIPT_POSITIONS
Public methods (0)

No public methods.

New fields (23)
  • cfop_xml Char
    string='XML CFOP'
  • icms_percent Char
    string='Alíquota ICMS'
  • icms_value Char
    string='ICMS Value'
  • import_xml_id Many2one → l10n_br_fiscal.document.import.wizard
    comodel_name='l10n_br_fiscal.document.import.wizard'
  • imported_partner_id Many2one
    related='import_xml_id.partner_id'
  • ipi_percent Char
    string='Alíquota IPI'
  • ipi_value Char
    string='IPI Value'
  • ncm_internal Char
    related='product_id.ncm_id.code' string='Internal NCM Code'
  • ncm_xml Char
    string='XML NCM Code'
  • new_cfop_id Many2one → l10n_br_fiscal.cfop
    comodel_name='l10n_br_fiscal.cfop' string='Change CFOP'
  • price_unit_com Float
    string='Comercial Price Unit'
  • price_unit_trib Float
    string='Fiscal Price Unit'
  • product_code Char
    string='XML Product Code'
  • product_id Many2one → product.product
    comodel_name='product.product' string='Product Internal Reference'
  • product_name Char
  • product_supplier_id Many2one → product.supplierinfo
    comodel_name='product.supplierinfo' string='Product Supplier'
  • quantity_com Float
    string='Comercial Quantity'
  • quantity_trib Float
  • total Float
  • uom_com Char
    string='UOM Comercial'
  • uom_conversion_factor Float
    default=1 string='UOM Conversion Factor'
  • uom_internal Many2one → uom.uom
    comodel_name='uom.uom' help='Internal UoM, equivalent to the comercial one in the document'
  • uom_trib Char
    string='UOM Fiscal'
Public methods (0)

No public methods.

New fields (11)
  • access_key Char
    required=True
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True string='Company'
  • document_number Char
  • document_type Selection
    default=MD.NFE required=True selection=MD.DOC_TYPE
  • environment Selection
    related='company_id.nfe_environment'
  • event_type Selection
    default=MD.MANIF_CIENTE index=True required=True selection=MD.MANIFEST_TYPE string='Manifestation Type'
  • protocol Char
  • protocol_date Datetime
    string='Registration Date'
  • response_xml Text
    string='Response XML'
  • serie Char
  • state Selection
    default='draft' selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (3)
  • action_confirm(self)
  • action_send_event(self, operation, valid_codes, new_state)
  • validate_event_response(self, result, valid_codes)
    @api.model

New fields (7)
  • nfe40_CNPJ Char
    related='partner_acquirer_id.nfe40_CNPJ'
  • nfe40_UFDesemb Char
    related='state_clearance_id.code' string='Customs Clearance Code'
  • nfe40_UFTerceiro Char
    related='partner_acquirer_id.state_id.code'
  • nfe40_tpIntermedio Selection
    selection=TPINTERMEDIO_DI
  • nfe40_tpViaTransp Selection
    selection=TPVIATRANSP_DI
  • partner_acquirer_id Many2one → res.partner
    comodel_name='res.partner' string='Partner Acquirer'
  • state_clearance_id Many2one → res.country.state
    comodel_name='res.country.state' domain=[('country_id.code', '=', 'BR')] string='State Customs Clearance'
Public methods (0)

No public methods.

New fields (2)
  • access_key Char
    required=True size=44
  • event_type Selection
    default='ciente' required=True selection=[('ciente', 'Ciente da Operação'), ('confirmado', 'Confirmada operação'), ('desconhecido', 'Desconhecimento'), ('nao_realizado', 'Não realizado')]
Public methods (2)
  • action_create_nfe_md_event(self)
  • default_get(self, fields_list)

New fields (0)

No new fields.

Public methods (2)
  • default_get(self, default_fields)
    @api.model
    The nfe.40.prod mixin (prod XML tag) cannot be injected in the product.product object because the tag includes attributes from the Odoo fiscal document line and because we may have an Nfe with lines decsriptions instead of full blown products. So a part of the mapping is done in the fiscal document line: from Odoo -> XML by using related fields/_compute from XML -> Odoo by overriding the product default_get method
  • match_or_create_m2o(self, rec_dict, parent_dict, model=None)

New fields (2)
  • partner_uom_factor Float
    default=1 string='Partner UOM Factor'
  • partner_uom_id Many2one → uom.uom
    comodel_name='uom.uom' string='Partner Unit of Measure'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • match_or_create_m2o(self, rec_dict, parent_dict, model=None)
    @api.model
    If city not found, break hard, don't create it

New fields (9)
  • nfce_danfe_layout Selection
    readonly=False related='company_id.nfce_danfe_layout' string='NFCe Layout'
  • nfe_authorize_accountant_download_xml Boolean
    readonly=False related='company_id.nfe_authorize_accountant_download_xml' string='Include Accountant Partner data in persons authorized to download NFe XML'
  • nfe_authorize_technical_download_xml Boolean
    readonly=False related='company_id.nfe_authorize_technical_download_xml' string='Include Technical Support Partner data in persons authorized to download NFe XML'
  • nfe_danfe_layout Selection
    readonly=False related='company_id.nfe_danfe_layout' string='NFe Layout'
  • nfe_enable_sync_transmission Boolean
    readonly=False related='company_id.nfe_enable_sync_transmission'
  • nfe_environment Selection
    readonly=False related='company_id.nfe_environment' string='NFe Environment'
  • nfe_transmission Selection
    readonly=False related='company_id.nfe_transmission' string='NFe Transmission'
  • nfe_version Selection
    readonly=False related='company_id.nfe_version' string='NF-e Version'
  • nfe_version_name Char
    config_parameter='l10n_br_nfe.version.name' string='NFe Proc Version'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • match_or_create_m2o(self, rec_dict, parent_dict, model=None)
    @api.model
    If country not found, break hard, don't create it

New fields (0)

No new fields.

Public methods (1)
  • match_or_create_m2o(self, rec_dict, parent_dict, model=None)
    @api.model
    If state not found, break hard, don't create it

New fields (0)

No new fields.

Public methods (1)
  • match_or_create_m2o(self, rec_dict, parent_dict, model=None)
    @api.model
    If uom not found, break hard, don't create it

Loading…

Loading…

Loading…

Loading…

Loading…