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 Jan 15, 2025
1 parent 0ad4572 commit bbfac1c
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 34 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ addon | version | maintainers | summary
--- | --- | --- | ---
[l10n_br_account](l10n_br_account/) | 15.0.2.10.2 | [![renatonlima](https://github.com/renatonlima.png?size=30px)](https://github.com/renatonlima) [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | Invoicing and accounting entries for Brazil
[l10n_br_account_due_list](l10n_br_account_due_list/) | 15.0.1.1.0 | | Brazilian Account Due List
[l10n_br_account_nfe](l10n_br_account_nfe/) | 15.0.1.1.0 | [![antoniospneto](https://github.com/antoniospneto.png?size=30px)](https://github.com/antoniospneto) [![felipemotter](https://github.com/felipemotter.png?size=30px)](https://github.com/felipemotter) [![mbcosta](https://github.com/mbcosta.png?size=30px)](https://github.com/mbcosta) | Integration between l10n_br_account and l10n_br_nfe
[l10n_br_account_nfe](l10n_br_account_nfe/) | 15.0.2.0.0 | [![antoniospneto](https://github.com/antoniospneto.png?size=30px)](https://github.com/antoniospneto) [![felipemotter](https://github.com/felipemotter.png?size=30px)](https://github.com/felipemotter) [![mbcosta](https://github.com/mbcosta.png?size=30px)](https://github.com/mbcosta) | Integration between l10n_br_account and l10n_br_nfe
[l10n_br_account_payment_order](l10n_br_account_payment_order/) | 15.0.1.1.1 | [![mbcosta](https://github.com/mbcosta.png?size=30px)](https://github.com/mbcosta) | Brazilian Payment Order
[l10n_br_account_withholding](l10n_br_account_withholding/) | 15.0.1.1.0 | [![marcelsavegnago](https://github.com/marcelsavegnago.png?size=30px)](https://github.com/marcelsavegnago) [![renatonlima](https://github.com/renatonlima.png?size=30px)](https://github.com/renatonlima) | Brazilian Withholding Invoice Generator
[l10n_br_base](l10n_br_base/) | 15.0.1.0.2 | [![renatonlima](https://github.com/renatonlima.png?size=30px)](https://github.com/renatonlima) [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | Customization of base module for implementations in Brazil.
Expand All @@ -42,8 +42,8 @@ addon | version | maintainers | summary
[l10n_br_hr](l10n_br_hr/) | 15.0.1.0.1 | | Brazilian Localization HR
[l10n_br_ie_search](l10n_br_ie_search/) | 15.0.1.1.0 | | Integração com a API SintegraWS e SEFAZ
[l10n_br_mis_report](l10n_br_mis_report/) | 15.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/) | 15.0.2.3.0 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) [![renatonlima](https://github.com/renatonlima.png?size=30px)](https://github.com/renatonlima) | Eletronic Invoicing for Brazil / NF-e
[l10n_br_nfe_spec](l10n_br_nfe_spec/) | 15.0.1.1.0 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | nfe spec
[l10n_br_nfe](l10n_br_nfe/) | 15.0.3.0.0 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) [![renatonlima](https://github.com/renatonlima.png?size=30px)](https://github.com/renatonlima) | Eletronic Invoicing for Brazil / NF-e
[l10n_br_nfe_spec](l10n_br_nfe_spec/) | 15.0.2.0.0 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | nfe spec
[l10n_br_nfse](l10n_br_nfse/) | 15.0.2.0.0 | [![mileo](https://github.com/mileo.png?size=30px)](https://github.com/mileo) [![luismalta](https://github.com/luismalta.png?size=30px)](https://github.com/luismalta) [![marcelsavegnago](https://github.com/marcelsavegnago.png?size=30px)](https://github.com/marcelsavegnago) | Root electronic invoice for service / NFS-e module
[l10n_br_nfse_focus](l10n_br_nfse_focus/) | 15.0.1.1.1 | [![AndreMarcos](https://github.com/AndreMarcos.png?size=30px)](https://github.com/AndreMarcos) [![mileo](https://github.com/mileo.png?size=30px)](https://github.com/mileo) [![ygcarvalh](https://github.com/ygcarvalh.png?size=30px)](https://github.com/ygcarvalh) [![marcelsavegnago](https://github.com/marcelsavegnago.png?size=30px)](https://github.com/marcelsavegnago) | NFS-e (FocusNFE)
[l10n_br_purchase](l10n_br_purchase/) | 15.0.1.3.0 | [![renatonlima](https://github.com/renatonlima.png?size=30px)](https://github.com/renatonlima) [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | Brazilian Localization Purchase
Expand All @@ -52,7 +52,7 @@ addon | version | maintainers | summary
[l10n_br_setup_tests](l10n_br_setup_tests/) | 15.0.1.0.0 | [![antoniospneto](https://github.com/antoniospneto.png?size=30px)](https://github.com/antoniospneto) | Modules for Odoo's Brazil-focused usability with integration tests.
[l10n_br_stock](l10n_br_stock/) | 15.0.1.0.1 | | Brazilian Localization Warehouse
[l10n_br_zip](l10n_br_zip/) | 15.0.1.2.0 | [![renatonlima](https://github.com/renatonlima.png?size=30px)](https://github.com/renatonlima) | Brazilian Localisation ZIP Codes
[spec_driven_model](spec_driven_model/) | 15.0.1.3.1 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | Tools for specifications driven mixins (from xsd for instance)
[spec_driven_model](spec_driven_model/) | 15.0.2.0.0 | [![rvalyi](https://github.com/rvalyi.png?size=30px)](https://github.com/rvalyi) | XML binding for Odoo: XML to Odoo models and models to XML.

[//]: # (end addons)

Expand Down
2 changes: 1 addition & 1 deletion l10n_br_account_nfe/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Account NFe/NFC-e Integration
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6115a8ac3eecbb17aa929592c2a45fc6f461c6ebfc2531cfe413f26782a0db3e
!! source digest: sha256:1289c004a36f4245c86667b59e5b13163052482f107466a1b1fc1b0d56822efe
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_account_nfe/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "Engenere," "Akretion," "Odoo Community Association (OCA)",
"maintainers": ["antoniospneto", "felipemotter", "mbcosta"],
"website": "https://github.com/OCA/l10n-brazil",
"version": "15.0.1.1.0",
"version": "15.0.2.0.0",
"development_status": "Beta",
"depends": [
"l10n_br_nfe",
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_account_nfe/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Account NFe/NFC-e Integration</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6115a8ac3eecbb17aa929592c2a45fc6f461c6ebfc2531cfe413f26782a0db3e
!! source digest: sha256:1289c004a36f4245c86667b59e5b13163052482f107466a1b1fc1b0d56822efe
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-brazil/tree/15.0/l10n_br_account_nfe"><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-15-0/l10n-brazil-15-0-l10n_br_account_nfe"><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=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><strong>Português</strong>
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NF-e
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:639ec51f8a504aafbb1f23980234d05f50d3dfab19ee851c4bde4b014d45d3ba
!! source digest: sha256:fefe4395a9e0bab30cdfebf05346907253785c770594bac31aa1c95c89079f4e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"maintainers": ["rvalyi", "renatonlima"],
"website": "https://github.com/OCA/l10n-brazil",
"development_status": "Beta",
"version": "15.0.2.3.0",
"version": "15.0.3.0.0",
"depends": [
"l10n_br_fiscal_edi",
"l10n_br_fiscal_certificate",
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">NF-e</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:639ec51f8a504aafbb1f23980234d05f50d3dfab19ee851c4bde4b014d45d3ba
!! source digest: sha256:fefe4395a9e0bab30cdfebf05346907253785c770594bac31aa1c95c89079f4e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-brazil/tree/15.0/l10n_br_nfe"><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-15-0/l10n-brazil-15-0-l10n_br_nfe"><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=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Este módulo permite a emissão de NF-e.</p>
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe_spec/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nfe spec
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b474a18fa598eb0813552c9201117cfff4a74f83cdbb8901dba20612e5ce97a6
!! source digest: sha256:ac16ab7e5e25c15c4fb97123350478b3461e37fbb2e9377a9c80f871103aff94
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe_spec/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nfe spec",
"version": "15.0.1.1.0",
"version": "15.0.2.0.0",
"author": "Akretion, Odoo Community Association (OCA)",
"license": "LGPL-3",
"category": "Accounting",
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_nfe_spec/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">nfe spec</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b474a18fa598eb0813552c9201117cfff4a74f83cdbb8901dba20612e5ce97a6
!! source digest: sha256:ac16ab7e5e25c15c4fb97123350478b3461e37fbb2e9377a9c80f871103aff94
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.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/15.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 image-reference" href="https://translation.odoo-community.org/projects/l10n-brazil-15-0/l10n-brazil-15-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 image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-brazil&amp;target_branch=15.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 da Nota Fiscal Electrônica (NF-e).
Expand Down
27 changes: 17 additions & 10 deletions spec_driven_model/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Spec Driven Model
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:789ee3c15335faefd2f51998edc5a9d6584034031a0236263a33915cc9fa9464
!! source digest: sha256:b7beb1b8cae500fcdbdeca06ca2f8159c771946878425c2775645a6324f7ad28
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -31,7 +31,7 @@ Spec Driven Model
Intro
~~~~~

This module is a databinding framework for Odoo and XML data: it allows to go from XML to Odoo objects back and forth. This module started with the `GenerateDS <https://www.davekuhlman.org/generateDS.html>`_ pure Python databinding framework and is now being migrated to xsdata. So a good starting point is to read `the xsdata documentation here <https://xsdata.readthedocs.io/>`_
This module is a databinding framework for Odoo and XML data: it allows to go from XML to Odoo objects back and forth. While having no hard dependency with it, it has been designed to be used with xsdata. So a good starting point is to read `the xsdata documentation here <https://xsdata.readthedocs.io/>`_

But what if instead of only generating Python structures from XML files you could actually generate full blown Odoo objects or serialize Odoo objects back to XML? This is what this module is for!

Expand All @@ -56,7 +56,7 @@ Now that you have generated these Odoo abstract bindings you should tell Odoo ho

Notice you should inherit from `spec_models.SpecModel` and not the usual `models.Model`.

**Field mapping**: You can then define two ways mapping between fields by overriding fields from Odoo or from the binding and using `_compute=` , `_inverse=` or simply `related=`.
**Field mapping**: You can then define two ways mapping between fields by overriding fields from Odoo or from the binding using `_compute=` , `_inverse=` or simply `related=`.

**Relational fields**: simple fields are easily mapped this way. However what about relational fields? In your XSD schema, your electronic invoice is related to the `partner.binding.mixin` not to an Odoo `res.partner`. Don't worry, when `SpecModel` classes are instanciated for all relational fields, we look if their comodel have been injected into some existing Odoo model and if so we remap them to the proper Odoo model.

Expand All @@ -66,7 +66,7 @@ Notice you should inherit from `spec_models.SpecModel` and not the usual `models
StackedModel
~~~~~~~~~~~~

Sadly real life XML is a bit more complex than that. Often XML structures are deeply nested just because it makes it easier for XSD schemas to validate them! for instance an electronic invoice line can be a nested structure with lots of tax details and product details. In a relational model like Odoo however you often want flatter data structures. This is where `StackedModel` comes to the rescue! It inherits from `SpecModel` and when you inherit from `StackedModel` you can inherit from all the generated mixins corresponding to the nested XML tags below some tag (here `invoice.line.binding.mixin`). All the fields corresponding to these XML tag attributes will be collected in your model and the XML parsing and serialization will happen as expected::
Sadly real life XML is a bit more complex than that. Often XML structures are deeply nested just because it makes it easier for XSD schemas to validate them! for instance an electronic invoice line can be a nested structure with lots of tax details and product details. In a relational model like Odoo however you often want flatter data structures. This is where `StackedModel` comes to the rescue! It inherits from `SpecModel` and when you inherit from `StackedModel` you can inherit from all the generated mixins corresponding to the nested XML tags below some tag (here `invoice.line.binding.mixin`). All the fields corresponding to these XML tag attributes will be collected in your model and the XML parsing and serialization will happen as expected. Here is an example inspired from the Brazilian Electronic Invoice where the schema is called `nfe` and where we use the 2 digits `40` for its short version::


from odoo.addons.spec_driven_model.models import spec_models
Expand All @@ -75,17 +75,24 @@ Sadly real life XML is a bit more complex than that. Often XML structures are de
class InvoiceLine(spec_models.StackedModel):
_inherit = [
'account.move.line',
'invoice.line.binding.mixin',
'nfe.40.det',
]
_stacked = 'invoice.line.binding.mixin'
_nfe40_spec_settings = {
"module": "odoo.addons.l10n_br_nfe_spec.models.v4_0.leiaute_nfe_v4_00",
"stacking_mixin": "nfe.40.det",
"stacking_points": {},
# all m2o below this level will be stacked even if not required:
"stacking_force_paths": ("det.imposto.",),
"stacking_skip_paths": ("nfe40_det_infNFe_id",),
}

All many2one fields that are required in the XSD (xsd_required=True) will get their model stacked automatically and recursively. You can force non required many2one fields to be stacked using the `_force_stack_paths` attribute. On the contrary, you can avoid some required many2one fields to be stacked using the `stack_skip` attribute.
All many2one fields that are required in the XSD (xsd_required=True) will get their model stacked automatically and recursively. You can force non required many2one fields to be stacked using the `stacking_force_paths` attribute. On the contrary, you can avoid some required many2one fields to be stacked using the `stacking_skip_paths` attribute.


Hooks
~~~~~
Initialization hook
~~~~~~~~~~~~~~~~~~~

Because XSD schemas can define lot's of different models, spec_driven_model comes with handy hooks that will automatically make all XSD mixins turn into concrete Odoo model (eg with a table) if you didn't inject them into existing Odoo models.
Because XSD schemas can define lot's of different models, spec_driven_model comes with a handy _register_hook that will automatically make all XSD mixins turn into concrete Odoo model (eg with a table) if you didn't inject them into existing Odoo models.

**Table of contents**

Expand Down
2 changes: 1 addition & 1 deletion spec_driven_model/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Spec Driven Model",
"summary": """XML binding for Odoo: XML to Odoo models and models to XML.""",
"version": "15.0.1.3.1",
"version": "15.0.2.0.0",
"maintainers": ["rvalyi"],
"license": "LGPL-3",
"author": "Akretion, Odoo Community Association (OCA)",
Expand Down
Loading

0 comments on commit bbfac1c

Please sign in to comment.