Skip to content

Commit

Permalink
[ADD] web_footer_gdpr_report
Browse files Browse the repository at this point in the history
  • Loading branch information
LucPinheiro committed Dec 30, 2022
1 parent 5b31161 commit 7fba913
Show file tree
Hide file tree
Showing 14 changed files with 847 additions and 0 deletions.
74 changes: 74 additions & 0 deletions web_footer_gdpr_report/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
======================
Web Footer GDPR Report
======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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%2Fslv--web-lightgray.png?logo=github
:target: https://github.com/OCA/slv-web/tree/15.0/web_footer_gdpr_report
:alt: OCA/slv-web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/slv-web-15-0/slv-web-15-0-web_footer_gdpr_report
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/slv-web&target_branch=15.0
:alt: Try me on Runboat

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

Adds footer GDPR report in layout web

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/slv-web/issues>`_.
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
`feedback <https://github.com/OCA/slv-web/issues/new?body=module:%20web_footer_gdpr_report%0Aversion:%2015.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
~~~~~~~

* Solvos

Contributors
~~~~~~~~~~~~

* Lucia Pinheiro <[email protected]>
* David Alonso <[email protected]>

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.

This module is part of the `OCA/slv-web <https://github.com/OCA/slv-web/tree/15.0/web_footer_gdpr_report>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions web_footer_gdpr_report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions web_footer_gdpr_report/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# © 2022 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
{
"name": "Web Footer GDPR Report",
"summary": """
Adds footer GDPR report in layout web
""",
"author": "Solvos",
"license": "LGPL-3",
"version": "15.0.1.0.0",
"category": "Sales/Sales",
"website": "https://github.com/solvosci/slv-sale",
"depends": [
"sale","web"
],
"data": [
"views/res_config_settings_views.xml",
"report/web_footer_gdpr_report.xml"
],
'installable': True,
}
100 changes: 100 additions & 0 deletions web_footer_gdpr_report/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_footer_gdpr_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-29 12:02+0100\n"
"PO-Revision-Date: 2022-12-29 12:07+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.1.1\n"

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_invoice_config_settings_view
msgid "Add GDPR in invoice footer"
msgstr "Añadir Cláusulas RGPD en el pie de página de factura"

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_order_config_settings_view
msgid "Add GDPR in order footer"
msgstr "Añadir Cláusulas RGPD en el pie de página de pedido"

#. module: web_footer_gdpr_report
#: model:ir.model.fields,field_description:web_footer_gdpr_report.field_res_company__add_gdpr_invoice
msgid "Add Gdpr Invoice"
msgstr "Añadir Cláusulas RGPD en factura"

#. module: web_footer_gdpr_report
#: model:ir.model.fields,field_description:web_footer_gdpr_report.field_res_company__add_gdpr_order
msgid "Add Gdpr Order"
msgstr "Añadir Cláusulas RGPD en Pedido"

#. module: web_footer_gdpr_report
#: model:ir.model,name:web_footer_gdpr_report.model_res_company
msgid "Companies"
msgstr "Compania"

#. module: web_footer_gdpr_report
#: model:ir.model,name:web_footer_gdpr_report.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes"

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_invoice_config_settings_view
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_order_config_settings_view
msgid "Documentation"
msgstr "Documentación"

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_invoice_config_settings_view
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_order_config_settings_view
msgid "GDPR"
msgstr "Cláusulas RGPD"

#. module: web_footer_gdpr_report
#: model:ir.model.fields,field_description:web_footer_gdpr_report.field_res_config_settings__add_gdpr_invoice
msgid "GDPR Invoice"
msgstr "Cláusulas RGPD en Facturas"

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_invoice_config_settings_view
msgid "GDPR Invoice..."
msgstr "Cláusulas RGPD en Facturas..."

#. module: web_footer_gdpr_report
#: model:ir.model.fields,field_description:web_footer_gdpr_report.field_res_config_settings__add_gdpr_order
msgid "GDPR Order"
msgstr "Cláusulas RGPD en Pedido"

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_order_config_settings_view
msgid "GDPR Order..."
msgstr "Cláusulas RGPD en Pedido..."

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.report_invoice_document
msgid "add_gdpr_invoice"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.report_saleorder_document
msgid "add_gdpr_order"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.report_invoice_document
msgid "invoice"
msgstr "facturas"

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.report_saleorder_document
msgid "order"
msgstr "pedidos"
100 changes: 100 additions & 0 deletions web_footer_gdpr_report/i18n/web_footer_gdpr_report.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_footer_gdpr_report
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-29 12:02+0100\n"
"PO-Revision-Date: 2022-12-29 11:01+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 3.1.1\n"

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_invoice_config_settings_view
msgid "Add GDPR in invoice footer"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_order_config_settings_view
msgid "Add GDPR in order footer"
msgstr ""

#. module: web_footer_gdpr_report
#: model:ir.model.fields,field_description:web_footer_gdpr_report.field_res_company__add_gdpr_invoice
msgid "Add Gdpr Invoice"
msgstr ""

#. module: web_footer_gdpr_report
#: model:ir.model.fields,field_description:web_footer_gdpr_report.field_res_company__add_gdpr_order
msgid "Add Gdpr Order"
msgstr ""

#. module: web_footer_gdpr_report
#: model:ir.model,name:web_footer_gdpr_report.model_res_company
msgid "Companies"
msgstr ""

#. module: web_footer_gdpr_report
#: model:ir.model,name:web_footer_gdpr_report.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_invoice_config_settings_view
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_order_config_settings_view
msgid "Documentation"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_invoice_config_settings_view
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_order_config_settings_view
msgid "GDPR"
msgstr ""

#. module: web_footer_gdpr_report
#: model:ir.model.fields,field_description:web_footer_gdpr_report.field_res_config_settings__add_gdpr_invoice
msgid "GDPR Invoice"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_invoice_config_settings_view
msgid "GDPR Invoice..."
msgstr ""

#. module: web_footer_gdpr_report
#: model:ir.model.fields,field_description:web_footer_gdpr_report.field_res_config_settings__add_gdpr_order
msgid "GDPR Order"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.footer_gdpr_order_config_settings_view
msgid "GDPR Order..."
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.report_invoice_document
msgid "add_gdpr_invoice"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.report_saleorder_document
msgid "add_gdpr_order"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.report_invoice_document
msgid "invoice"
msgstr ""

#. module: web_footer_gdpr_report
#: model_terms:ir.ui.view,arch_db:web_footer_gdpr_report.report_saleorder_document
msgid "order"
msgstr ""
2 changes: 2 additions & 0 deletions web_footer_gdpr_report/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import res_company
from . import res_config_settings
11 changes: 11 additions & 0 deletions web_footer_gdpr_report/models/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# © 2022 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)

from odoo import models, fields


class ResCompany(models.Model):
_inherit = "res.company"

add_gdpr_order = fields.Html()
add_gdpr_invoice = fields.Html()
20 changes: 20 additions & 0 deletions web_footer_gdpr_report/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# © 2022 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)

from odoo import models, fields


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

add_gdpr_order = fields.Html(
related='company_id.add_gdpr_order',
string='GDPR Order',
readonly=False,
)
add_gdpr_invoice = fields.Html(
related='company_id.add_gdpr_invoice',
string='GDPR Invoice',
readonly=False,
)

2 changes: 2 additions & 0 deletions web_footer_gdpr_report/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Lucia Pinheiro <[email protected]>
* David Alonso <[email protected]>
1 change: 1 addition & 0 deletions web_footer_gdpr_report/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds footer GDPR report in layout web
38 changes: 38 additions & 0 deletions web_footer_gdpr_report/report/web_footer_gdpr_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<template id="report_saleorder_document" inherit_id="sale.report_saleorder_document">
<xpath expr="//t[@t-set='doc']" position="after">
<t t-set="o_type">order</t>
<t t-set="o_gdpr">add_gdpr_order</t>
</xpath>
</template>

<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//t[@t-set='o']" position="after">
<t t-set="o_type">invoice</t>
<t t-set="i_gdpr">add_gdpr_invoice</t>
</xpath>
</template>

<template id="web_footer_gdpr_document_inherit" inherit_id="web.external_layout_standard">
<xpath expr="//ul" position="inside">
<div t-if="o_type" class="footer_gdpr">
<t t-if="o_type=='order'">
<span t-if="o_gdpr=='add_gdpr_order'" t-field="company.add_gdpr_order"/>
</t>
<t t-if="o_type=='invoice'">
<span t-if="i_gdpr=='add_gdpr_invoice'" t-field="company.add_gdpr_invoice"/>
</t>
</div>
</xpath>
<xpath expr="//div[hasclass('text-muted')]" position="attributes">
<attribute name="style">margin-top: -18px !important;</attribute>
</xpath>
<xpath expr="//div[hasclass('footer_gdpr')]" position="attributes">
<attribute name="style">font-size: 0.55em; margin-top: -15px; text-align: center;!important;</attribute>
</xpath>
</template>

</odoo>

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7fba913

Please sign in to comment.