Skip to content

Commit

Permalink
[BOT] post-merge updates
Browse files Browse the repository at this point in the history
  • Loading branch information
OCA-git-bot committed Sep 27, 2023
1 parent 20513bb commit 8c31333
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 44 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ addon | version | maintainers | summary
[l10n_br_fiscal_dfe](l10n_br_fiscal_dfe/) | 14.0.2.1.0 | | Distribuição de documentos fiscais
[l10n_br_hr](l10n_br_hr/) | 14.0.1.2.1 | | Brazilian Localization HR
[l10n_br_ie_search](l10n_br_ie_search/) | 14.0.1.0.2 | | Integração com a API SintegraWS e SEFAZ
[l10n_br_mdfe_spec](l10n_br_mdfe_spec/) | 14.0.1.0.0 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | CT-e spec
[l10n_br_mis_report](l10n_br_mis_report/) | 14.0.1.0.1 | [![mileo](https://github.com/mileo.png?size=30px)](https://github.com/mileo) | Templates de relatórios contábeis brasileiros: Balanço Patrimonial e DRE
[l10n_br_nfe](l10n_br_nfe/) | 14.0.13.3.1 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) [![renatonlima](https://github.com/renatonlima.png?size=30px)](https://github.com/renatonlima) | Brazilian Eletronic Invoice NF-e
[l10n_br_nfe_spec](l10n_br_nfe_spec/) | 14.0.6.0.0 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | nfe spec
Expand Down
114 changes: 114 additions & 0 deletions l10n_br_mdfe_spec/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
=========
mdfe spec
=========

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:038c9a5640e9b9d315bb079de305b68c4afe07ac6dab7876d7aeea004ce1e29d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |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/14.0/l10n_br_mdfe_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-14-0/l10n-brazil-14-0-l10n_br_mdfe_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=14.0
:alt: Try me on Runboat

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

Este módulo contem a estrutura de dados do ​Manifesto Eletrônico de Documentos Fiscais (CT-e).
Este módulo não faz nada sozinho, ele precisaria de um modulo `l10n_br_mdfe` que mapearia esses mixins
nos documentos fiscais Odoo de forma semlhante a forma como o módulo `l10n_br_nfe` faz como o módulo `l10n_br_nfe_spec`.

Este módulo inclui os leiautes persistantes dos modos de transporte do MDF-e:

* modo aéreo
* modo aquaviário
* modo ferroviário
* modo rodoviário



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


O comando usado foi:

export XSDATA_SCHEMA=mdfe; export XSDATA_VERSION=30; export XSDATA_LANG="portuguese"

xsdata generate nfelib/mdfe/schemas/v3_0 --package nfelib.mdfe.odoo.v3_0 --output=odoo

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

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_mdfe_spec%0Aversion:%2014.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/14.0/l10n_br_mdfe_spec>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
81 changes: 38 additions & 43 deletions l10n_br_mdfe_spec/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>nfe spec</title>
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>mdfe spec</title>
<style type="text/css">

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.

See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

Expand Down Expand Up @@ -360,61 +360,56 @@
</style>
</head>
<body>
<div class="document" id="nfe-spec">
<h1 class="title">nfe spec</h1>
<div class="document" id="mdfe-spec">
<h1 class="title">mdfe spec</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:038c9a5640e9b9d315bb079de305b68c4afe07ac6dab7876d7aeea004ce1e29d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_nfe_spec"><img alt="OCA/l10n-brazil" src="https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-brazil-14-0/l10n-brazil-14-0-l10n_br_nfe_spec"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/124/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>Este módulo contem a estrutura de dados da Nota Fiscal Electrônica (NF-e).
Um módulo que usa ele é o módulo <cite>l10n_br_nfe</cite> que permite transmitir as NF-e’s.</p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_mdfe_spec"><img alt="OCA/l10n-brazil" src="https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-brazil-14-0/l10n-brazil-14-0-l10n_br_mdfe_spec"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-brazil&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Este módulo contem a estrutura de dados do ​Manifesto Eletrônico de Documentos Fiscais (CT-e).
Este módulo não faz nada sozinho, ele precisaria de um modulo <cite>l10n_br_mdfe</cite> que mapearia esses mixins
nos documentos fiscais Odoo de forma semlhante a forma como o módulo <cite>l10n_br_nfe</cite> faz como o módulo <cite>l10n_br_nfe_spec</cite>.</p>
<p>Este módulo inclui os leiautes persistantes dos modos de transporte do MDF-e:</p>
<ul class="simple">
<li>modo aéreo</li>
<li>modo aquaviário</li>
<li>modo ferroviário</li>
<li>modo rodoviário</li>
</ul>
<div class="section" id="geracao">
<h1>Geração</h1>
<p>O código dos mixins Odoo desse módulo é 100% gerado a partir dos últimos esquemas XSD da Fazenda usando generateDS e essa extensão dele:</p>
<p><a class="reference external" href="https://github.com/akretion/generateds-odoo">https://github.com/akretion/generateds-odoo</a></p>
<p>Depois de baixar os esquemas na pasta /tmp/generated/schemas/nfe/v4_00 basta fazer o comando:</p>
<pre class="code bash literal-block">
python gends_run_gen_odoo.py -f -l nfe -x 4_00 -e <span class="s1">'^ICMS\d+|^ICMSSN\d+'</span> -d . -v /tmp/generated/schemas/nfe/v4_00/leiauteNFe_v4.00.xsd
</pre>
</div>
<div class="section" id="prefixo-dos-campos-e-versao">
<h1>Prefixo dos campos e versão</h1>
<p>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…</p>
<p>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 <cite>nfe40_</cite>. 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.</p>
<p>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:</p>
<p><a class="reference external" href="https://github.com/akretion/xsdata-odoo">https://github.com/akretion/xsdata-odoo</a></p>
<p>O comando usado foi:</p>
<p>export XSDATA_SCHEMA=mdfe; export XSDATA_VERSION=30; export XSDATA_LANG=”portuguese”</p>
<p>xsdata generate nfelib/mdfe/schemas/v3_0 –package nfelib.mdfe.odoo.v3_0 –output=odoo</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
</div>
<div class="section" id="casos-das-tags-de-icms-e-icmssn">
<h1>Casos das tags de ICMS e ICMSSN</h1>
<p>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 (opção -x no generateds-odoo). De qualquer forma, ja 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.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a></li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#id1">Bug Tracker</a></h2>
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-brazil/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_nfe_spec%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_mdfe_spec%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#id2">Credits</a></h2>
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
</div>
</div>
<div class="section" id="authors">
Expand All @@ -437,8 +432,8 @@ <h1>Maintainers</h1>
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/rvalyi"><img alt="rvalyi" src="https://github.com/rvalyi.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_nfe_spec">OCA/l10n-brazil</a> project on GitHub.</p>
<p><a class="reference external image-reference" href="https://github.com/rvalyi"><img alt="rvalyi" src="https://github.com/rvalyi.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_mdfe_spec">OCA/l10n-brazil</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion setup/_metapackage/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.0.20230927.0
14.0.20230927.1
1 change: 1 addition & 0 deletions setup/_metapackage/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'odoo14-addon-l10n_br_fiscal_dfe',
'odoo14-addon-l10n_br_hr',
'odoo14-addon-l10n_br_ie_search',
'odoo14-addon-l10n_br_mdfe_spec',
'odoo14-addon-l10n_br_mis_report',
'odoo14-addon-l10n_br_nfe',
'odoo14-addon-l10n_br_nfe_spec',
Expand Down

0 comments on commit 8c31333

Please sign in to comment.