Skip to content
Health
67/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Human commit this month
  • Required by5/25
    0 modules depend on it
  • Maturity12/25
    In 2 Odoo series since 16.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
4 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.21 MB
Module directory on disk
Code analysis 0 migration notes 4 models 7 views 0 HTTP endpoints

Description

Este módulo implementa a gestão da FCI (Ficha de Conteúdo de Importação) exigida pelo Convênio ICMS 38/2013 e pelo Ato COTEPE ICMS 61/2012.

Os contribuintes que industrializam mercadorias importadas devem informar à administração tributária do estado de origem, por meio de um arquivo digital, a participação da parcela importada no total da mercadoria resultante (Conteúdo de Importação). Para cada mercadoria do arquivo transmitido a administração tributária gera um número de controle da FCI, que deve ser informado no campo nFCI da NF-e das operações interestaduais com essa mercadoria.

O módulo oferece:

  • o registro da FCI (l10n_br_fiscal.fci.file), com os dados de um arquivo digital, e as suas mercadorias (l10n_br_fiscal.fci), o registro 5020 do leiaute;
  • a geração do arquivo TXT no leiaute do Ato COTEPE ICMS 61/2012, pronto para ser validado e transmitido com o Validador/Transmissor da SEFAZ;
  • o cálculo do Conteúdo de Importação com a regra de arredondamento exigida pelo leiaute;
  • um assistente para ler o arquivo de retorno baixado do sistema web da FCI, que preenche o número de controle da FCI de cada mercadoria;
  • o número de controle da última FCI de cada produto, na aba Fiscal do produto.

Dependencies

Odoo dependencies
OCA/l10n-brazil:
OCA/product-attribute:
odoo/odoo:
- web
- bus
- uom
Python dependencies
erpbrasil-base>=2.4.2, email-validator, num2words, phonenumbers
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 7

XML IDNameModelTypeStatus
fci_file_form l10n_br_fiscal.fci.file.form l10n_br_fiscal.fci.file form New
fci_file_search l10n_br_fiscal.fci.file.search l10n_br_fiscal.fci.file search New
fci_file_tree l10n_br_fiscal.fci.file.tree l10n_br_fiscal.fci.file list New
fci_import_wizard_form l10n_br_fiscal.fci.import.wizard.form l10n_br_fiscal.fci.import.wizard form New
fci_search l10n_br_fiscal.fci.search l10n_br_fiscal.fci search New
fci_tree l10n_br_fiscal.fci.tree l10n_br_fiscal.fci list New
product_template_form l10n_br_fiscal_fci.product.template.form product.template form Inherits l10n_br_fiscal.product_template_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 4

New fields (19)
  • amount_imported Float
    digits='Product Price' help='Amount of the parcel imported from abroad per unit of measure, register 5020 field VALOR_PARCELA_IMPORTADA_EXTERIOR.' required=True string='Imported Amount'
  • amount_interstate Float
    digits='Product Price' help='Total amount of the interstate output of the goods per unit of measure, register 5020 field VALOR_SAIDA_MERCADORIA_INTERESTADUAL.' required=True string='Interstate Output Amount'
  • company_id Many2one → res.company
    comodel_name='res.company' index=True related='fci_file_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='company_id.currency_id' string='Currency'
  • fci_code Char
    copy=False help='FCI control number returned by the tax administration, to be written in the NF-e field nFCI.' index=True readonly=True size=36 string='FCI Control Number'
  • fci_file_id Many2one → l10n_br_fiscal.fci.file
    comodel_name='l10n_br_fiscal.fci.file' index=True ondelete='cascade' required=True string='FCI'
  • gtin Char
    compute='_compute_product_fields' help='Global Trade Item Number, register 5020 field CODIGO_GTIN. This field is optional.' precompute=True readonly=False size=14 store=True string='GTIN'
  • import_content Float
    compute='_compute_import_content' digits=(6, 2) help='Percentage of the import content, register 5020 field CONTEUDO_IMPORTACAO_CI.' store=True string='Import Content (%)'
  • name Char
    compute='_compute_product_fields' help='Register 5020 field NOME_MERCADORIA.' precompute=True readonly=False required=True size=255 store=True string='Description'
  • ncm_code Char
    help='Register 5020 field CODIGO_NCM.' related='ncm_id.code_unmasked' string='NCM Code'
  • ncm_id Many2one → l10n_br_fiscal.ncm
    comodel_name='l10n_br_fiscal.ncm' compute='_compute_product_fields' precompute=True readonly=False store=True string='NCM'
  • product_code Char
    compute='_compute_product_fields' help='Internal code identifying the goods in the establishment, register 5020 field CODIGO_MERCADORIA.' precompute=True readonly=False required=True size=50 store=True
  • product_id Many2one → product.product
    check_company=True comodel_name='product.product' help='Product of the goods. It is not written in the file, it links the FCI control number to the product. It may be empty right after the import of a file generated in another platform, when no product matches the code of the goods.' index=True string='Product'
  • product_tmpl_id Many2one → product.template
    comodel_name='product.template' index=True related='product_id.product_tmpl_id' store=True string='Product Template'
  • sequence Integer
    default=10
  • state Selection
    related='fci_file_id.state' store=True string='Status'
  • uom_code Char
    compute='_compute_uom_code' help="Abbreviation of the unit of measure of the goods, register 5020 field UNIDADE_MERCADORIA. Use '99' for units which are not in the table of the Ato COTEPE ICMS 61/2012." precompute=True readonly=False required=True size=6 store=True string='Unit Code'
  • uom_id Many2one → uom.uom
    comodel_name='uom.uom' compute='_compute_product_fields' precompute=True readonly=False store=True string='Unit of Measure'
  • validation_indicator Selection
    copy=False help='Register 5020 field IN_VALIDACAO_FICHA of the return file.' readonly=True selection=FCI_LINE_VALIDATION
Public methods (0)

No public methods.

New fields (25)
  • city_id Many2one → res.city
    comodel_name='res.city' related='company_id.city_id' string='City'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='company_id.currency_id' string='Currency'
  • date Datetime
    default=fields.Datetime.now help='Date used to build the file name, as required by the layout.' required=True string='Creation Date'
  • date_reception Char
    copy=False help='Register 0000 field DT_RECEPCAO_ARQUIVO of the return file.' readonly=True string='Reception Date'
  • date_validation Char
    copy=False help='Register 0000 field DT_VALIDACAO_ARQUIVO of the return file.' readonly=True string='Validation Date'
  • fci_count Integer
    compute='_compute_line_count' string='Goods Count'
  • fci_ids One2many → l10n_br_fiscal.fci
    comodel_name='l10n_br_fiscal.fci' copy=True inverse_name='fci_file_id' string='Goods'
  • file Binary
    attachment=True copy=False readonly=True string='FCI File'
  • filename Char
    copy=False readonly=True string='File Name'
  • hash_code Char
    copy=False help='Register 0000 field HASH_CODE of the return file.' readonly=True
  • l10n_br_ie_code Char
    related='company_id.l10n_br_ie_code' string='State Tax Number'
  • layout_version Char
    default=FCI_LAYOUT_VERSION help='Layout version of the file, register 0000 field VERSAO_LEIAUTE.' readonly=True required=True
  • legal_name Char
    related='company_id.legal_name'
  • name Char
    compute='_compute_name' index=True store=True
  • protocol_number Char
    copy=False help='Protocol number returned by the TED after the transmission of the file. It is used to query the FCI control numbers on the web.' string='Reception Protocol' tracking=True
  • return_file Binary
    attachment=True copy=False readonly=True
  • return_filename Char
    copy=False readonly=True string='Return File Name'
  • state Selection
    copy=False default='draft' readonly=True required=True selection=FCI_STATE string='Status' tracking=True
  • state_id Many2one → res.country.state
    comodel_name='res.country.state' related='company_id.state_id' string='State'
  • street_name Char
    related='company_id.street_name'
  • street_number Char
    related='company_id.street_number'
  • validation_indicator Char
    copy=False help='Register 0000 field IN_VALIDACAO_ARQUIVO of the return file.' readonly=True
  • vat Char
    related='company_id.vat' string='CNPJ'
  • zip Char
    related='company_id.zip'
Public methods (6)
  • action_back_to_draft(self)
  • action_generate_file(self)
  • action_import_return_file(self)
    Open the wizard which reads the file returned by the SEFAZ.
  • action_set_transmitted(self)
  • copy(self, default=None)
  • unlink(self)

New fields (5)
  • fci_file_id Many2one → l10n_br_fiscal.fci.file
    comodel_name='l10n_br_fiscal.fci.file' help='FCI updated by the return file. Leave it empty to create a new FCI from the imported file.' ondelete='cascade' string='FCI'
  • file Binary
    help='FCI file in the layout of the Ato COTEPE ICMS 61/2012, either a file to be transmitted or a file returned by the SEFAZ. The ZIP file downloaded from the FCI web system is also accepted.' required=True
  • filename Char
    string='File Name'
  • result Text
    readonly=True
  • state Selection
    default='init' readonly=True selection=[('init', 'init'), ('done', 'done')]
Public methods (4)
  • action_import(self)
  • action_import_file(self, filename, file_data)
    @api.model
    Import a file uploaded from the FCI list view.
  • action_open_fci_file(self)
  • default_get(self, fields_list)
    @api.model

New fields (3)
  • fci_code Char
    compute='_compute_fci_code' help='Last FCI control number generated for this product in the current company. It must be written in the NF-e field nFCI of the interstate operations with this product.' string='FCI Control Number'
  • fci_count Integer
    compute='_compute_fci_code' string='FCI Count'
  • fci_ids One2many → l10n_br_fiscal.fci
    comodel_name='l10n_br_fiscal.fci' inverse_name='product_tmpl_id' readonly=True string='FCI'
Public methods (1)
  • action_view_fci(self)

Loading…