odoo-addon-l10n-br-nfe-spec


Nameodoo-addon-l10n-br-nfe-spec JSON
Version 16.0.2.0.0 PyPI version JSON
download
home_pagehttps://github.com/OCA/l10n-brazil
Summarynfe spec
upload_time2025-01-15 06:09:19
maintainerNone
docs_urlNone
authorAkretion, Odoo Community Association (OCA)
requires_python>=3.10
licenseLGPL-3
keywords
VCS
bugtrack_url
requirements brazilcep brazilfiscalreport email-validator erpbrasil.assinatura erpbrasil.base erpbrasil.edoc.pdf erpbrasil.edoc erpbrasil.transmissao nfelib nfselib.barueri nfselib.ginfes nfselib.paulistana num2words phonenumbers pyyaml satcomum unidecode workalendar
Travis-CI No Travis.
coveralls test coverage
            ========
nfe spec
========

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:239bab3dd7ba3874d30767eb2b7a139e9a6bba0842b9620b115263d5cb87223b
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
    :target: https://odoo-community.org/page/development-status
    :alt: Mature
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
    :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github
    :target: https://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_nfe_spec
    :alt: OCA/l10n-brazil
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/l10n-brazil-16-0/l10n-brazil-16-0-l10n_br_nfe_spec
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-brazil&target_branch=16.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Este módulo contem a estrutura de dados da Nota Fiscal Electrônica
(NF-e). Um módulo que usa ele é o módulo l10n_br_nfe que permite
transmitir as NF-e's.

Geração
-------

O código dos mixins Odoo desse módulo é 100% gerado a partir dos últimos
esquemas xsd da Fazenda usando xsdata e essa extensão dele:

https://github.com/akretion/xsdata-odoo

Para accessar aos schemas xsd, pode ser mais facil fazer um clone da lib
nfelib e gerar o codigo dentro da pasta:

.. code:: bash

   git clone https://github.com/akretion/nfelib
   cd nfelib
   export XSDATA_SCHEMA=nfe; export XSDATA_VERSION=40; export XSDATA_SKIP="^ICMS.ICMS\d+|^ICMS.ICMSSN\d+"
   xsdata generate nfelib/nfe/schemas/v4_0  --package nfelib.nfe.odoo.v4_0 --output=odoo
   mv nfelib/odoo/nfe/v4_0 <caminho_do_odoo>/l10n_br_nfe_spec/models/v4_0

Prefixo dos campos e versão
---------------------------

Com até uns 800 campos fiscais apenas na NF-e, com uma meia dúzia de
documentos fiscais complexos, com 3000 módulos OCA, existiria um risco
real de conflito com os nomes de campos vindo dos esquemas. Além disso,
temos várias versões da NFe, a 3.1, a 4.0 etc...

Nisso foi decidido que cada campo tem um prefixo composto do nome do
schema e de alguns dígitos da versão do esquema. No caso nfe40\_. A
escolha de 2 dígitos permite que uma atualização menor do esquema use os
mesmos campos (e dados no banco então) e que um simples update Odoo
(--update=...) consiga resolver a migração. Enquanto que para uma
mudança maior como de 3.1 para 4.0, seria assumido de usar novos campos
e novas tabelas (para os objetos não Odoo) e que a lib nfelib iria
trabalhar com os campos da versão maior do documento fiscal considerado.

Casos das tags de ICMS e ICMSSN
-------------------------------

Para facilitar a validação das tags de ICMS e ICMSSN, o esquema contem
tags especificas para cada tipo desses impostos. Porem, Depois no Odoo o
modelo é diferente com uma class apenas. Se a gente injectasse todos
esses mixins de ICMS e ICMSSN na mesma class Odoo a gente teria colisão
de campos, com campos com o mesmo nome e seleções diferentes... Para
evitar esses problemas, filtramos as classes desses tags (usando o
export XSDATA_SKIP antes de chamar xsdata generate). De qualquer forma,
já que o Odoo e o módulo l10n_br_fiscal tem modelos proprios para os
impostos temos que assumir que o mapping das tags de impostos nao pode
ser tão automatizada.

**Table of contents**

.. contents::
   :local:

Installation
============



Configuration
=============



Usage
=====



Known issues / Roadmap
======================



Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-brazil/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_nfe_spec%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Akretion

Contributors
------------

- Raphaël Valyi <raphael.valyi@akretion.com.br>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-rvalyi| image:: https://github.com/rvalyi.png?size=40px
    :target: https://github.com/rvalyi
    :alt: rvalyi

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-rvalyi| 

This module is part of the `OCA/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_nfe_spec>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OCA/l10n-brazil",
    "name": "odoo-addon-l10n-br-nfe-spec",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Akretion, Odoo Community Association (OCA)",
    "author_email": "support@odoo-community.org",
    "download_url": null,
    "platform": null,
    "description": "========\nnfe spec\n========\n\n.. \n   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n   !! This file is generated by oca-gen-addon-readme !!\n   !! changes will be overwritten.                   !!\n   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n   !! source digest: sha256:239bab3dd7ba3874d30767eb2b7a139e9a6bba0842b9620b115263d5cb87223b\n   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png\n    :target: https://odoo-community.org/page/development-status\n    :alt: Mature\n.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png\n    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html\n    :alt: License: LGPL-3\n.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github\n    :target: https://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_nfe_spec\n    :alt: OCA/l10n-brazil\n.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png\n    :target: https://translation.odoo-community.org/projects/l10n-brazil-16-0/l10n-brazil-16-0-l10n_br_nfe_spec\n    :alt: Translate me on Weblate\n.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png\n    :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-brazil&target_branch=16.0\n    :alt: Try me on Runboat\n\n|badge1| |badge2| |badge3| |badge4| |badge5|\n\nEste m\u00f3dulo contem a estrutura de dados da Nota Fiscal Electr\u00f4nica\n(NF-e). Um m\u00f3dulo que usa ele \u00e9 o m\u00f3dulo l10n_br_nfe que permite\ntransmitir as NF-e's.\n\nGera\u00e7\u00e3o\n-------\n\nO c\u00f3digo dos mixins Odoo desse m\u00f3dulo \u00e9 100% gerado a partir dos \u00faltimos\nesquemas xsd da Fazenda usando xsdata e essa extens\u00e3o dele:\n\nhttps://github.com/akretion/xsdata-odoo\n\nPara accessar aos schemas xsd, pode ser mais facil fazer um clone da lib\nnfelib e gerar o codigo dentro da pasta:\n\n.. code:: bash\n\n   git clone https://github.com/akretion/nfelib\n   cd nfelib\n   export XSDATA_SCHEMA=nfe; export XSDATA_VERSION=40; export XSDATA_SKIP=\"^ICMS.ICMS\\d+|^ICMS.ICMSSN\\d+\"\n   xsdata generate nfelib/nfe/schemas/v4_0  --package nfelib.nfe.odoo.v4_0 --output=odoo\n   mv nfelib/odoo/nfe/v4_0 <caminho_do_odoo>/l10n_br_nfe_spec/models/v4_0\n\nPrefixo dos campos e vers\u00e3o\n---------------------------\n\nCom at\u00e9 uns 800 campos fiscais apenas na NF-e, com uma meia d\u00fazia de\ndocumentos fiscais complexos, com 3000 m\u00f3dulos OCA, existiria um risco\nreal de conflito com os nomes de campos vindo dos esquemas. Al\u00e9m disso,\ntemos v\u00e1rias vers\u00f5es da NFe, a 3.1, a 4.0 etc...\n\nNisso foi decidido que cada campo tem um prefixo composto do nome do\nschema e de alguns d\u00edgitos da vers\u00e3o do esquema. No caso nfe40\\_. A\nescolha de 2 d\u00edgitos permite que uma atualiza\u00e7\u00e3o menor do esquema use os\nmesmos campos (e dados no banco ent\u00e3o) e que um simples update Odoo\n(--update=...) consiga resolver a migra\u00e7\u00e3o. Enquanto que para uma\nmudan\u00e7a maior como de 3.1 para 4.0, seria assumido de usar novos campos\ne novas tabelas (para os objetos n\u00e3o Odoo) e que a lib nfelib iria\ntrabalhar com os campos da vers\u00e3o maior do documento fiscal considerado.\n\nCasos das tags de ICMS e ICMSSN\n-------------------------------\n\nPara facilitar a valida\u00e7\u00e3o das tags de ICMS e ICMSSN, o esquema contem\ntags especificas para cada tipo desses impostos. Porem, Depois no Odoo o\nmodelo \u00e9 diferente com uma class apenas. Se a gente injectasse todos\nesses mixins de ICMS e ICMSSN na mesma class Odoo a gente teria colis\u00e3o\nde campos, com campos com o mesmo nome e sele\u00e7\u00f5es diferentes... Para\nevitar esses problemas, filtramos as classes desses tags (usando o\nexport XSDATA_SKIP antes de chamar xsdata generate). De qualquer forma,\nj\u00e1 que o Odoo e o m\u00f3dulo l10n_br_fiscal tem modelos proprios para os\nimpostos temos que assumir que o mapping das tags de impostos nao pode\nser t\u00e3o automatizada.\n\n**Table of contents**\n\n.. contents::\n   :local:\n\nInstallation\n============\n\n\n\nConfiguration\n=============\n\n\n\nUsage\n=====\n\n\n\nKnown issues / Roadmap\n======================\n\n\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-brazil/issues>`_.\nIn case of trouble, please check there if your issue has already been reported.\nIf you spotted it first, help us to smash it by providing a detailed and welcomed\n`feedback <https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_nfe_spec%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.\n\nDo not contact contributors directly about support or help with technical issues.\n\nCredits\n=======\n\nAuthors\n-------\n\n* Akretion\n\nContributors\n------------\n\n- Rapha\u00ebl Valyi <raphael.valyi@akretion.com.br>\n\nMaintainers\n-----------\n\nThis module is maintained by the OCA.\n\n.. image:: https://odoo-community.org/logo.png\n   :alt: Odoo Community Association\n   :target: https://odoo-community.org\n\nOCA, or the Odoo Community Association, is a nonprofit organization whose\nmission is to support the collaborative development of Odoo features and\npromote its widespread use.\n\n.. |maintainer-rvalyi| image:: https://github.com/rvalyi.png?size=40px\n    :target: https://github.com/rvalyi\n    :alt: rvalyi\n\nCurrent `maintainer <https://odoo-community.org/page/maintainer-role>`__:\n\n|maintainer-rvalyi| \n\nThis module is part of the `OCA/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_nfe_spec>`_ project on GitHub.\n\nYou are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.\n",
    "bugtrack_url": null,
    "license": "LGPL-3",
    "summary": "nfe spec",
    "version": "16.0.2.0.0",
    "project_urls": {
        "Homepage": "https://github.com/OCA/l10n-brazil"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "408cb8daad6990a2544b474ad37b618831fc4f4c3cae17bb7c6dada924798fae",
                "md5": "1689672861ad4d1840d2beaee2aa8e88",
                "sha256": "06b8abe701f95d9de6a48b941ecb5ed81a2b5934321f8cba2ea3f7beaa0c7fe0"
            },
            "downloads": -1,
            "filename": "odoo_addon_l10n_br_nfe_spec-16.0.2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1689672861ad4d1840d2beaee2aa8e88",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 126093,
            "upload_time": "2025-01-15T06:09:19",
            "upload_time_iso_8601": "2025-01-15T06:09:19.451768Z",
            "url": "https://files.pythonhosted.org/packages/40/8c/b8daad6990a2544b474ad37b618831fc4f4c3cae17bb7c6dada924798fae/odoo_addon_l10n_br_nfe_spec-16.0.2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-15 06:09:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OCA",
    "github_project": "l10n-brazil",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "brazilcep",
            "specs": []
        },
        {
            "name": "brazilfiscalreport",
            "specs": []
        },
        {
            "name": "email-validator",
            "specs": []
        },
        {
            "name": "erpbrasil.assinatura",
            "specs": [
                [
                    ">=",
                    "1.7.0"
                ]
            ]
        },
        {
            "name": "erpbrasil.base",
            "specs": [
                [
                    ">=",
                    "2.3.0"
                ]
            ]
        },
        {
            "name": "erpbrasil.edoc.pdf",
            "specs": []
        },
        {
            "name": "erpbrasil.edoc",
            "specs": [
                [
                    ">=",
                    "2.5.2"
                ]
            ]
        },
        {
            "name": "erpbrasil.transmissao",
            "specs": [
                [
                    ">=",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "nfelib",
            "specs": [
                [
                    "<=",
                    "2.0.7"
                ]
            ]
        },
        {
            "name": "nfselib.barueri",
            "specs": []
        },
        {
            "name": "nfselib.ginfes",
            "specs": []
        },
        {
            "name": "nfselib.paulistana",
            "specs": []
        },
        {
            "name": "num2words",
            "specs": []
        },
        {
            "name": "phonenumbers",
            "specs": []
        },
        {
            "name": "pyyaml",
            "specs": []
        },
        {
            "name": "satcomum",
            "specs": []
        },
        {
            "name": "unidecode",
            "specs": []
        },
        {
            "name": "workalendar",
            "specs": []
        }
    ],
    "lcname": "odoo-addon-l10n-br-nfe-spec"
}
        
Elapsed time: 0.53397s