diff --git a/account_reporting_volume/README.rst b/account_reporting_volume/README.rst new file mode 100644 index 000000000..8bae2037a --- /dev/null +++ b/account_reporting_volume/README.rst @@ -0,0 +1,90 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +==================================== +Volume in the invoices analysis view +==================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:02d18b83cf858e43230da7ab90af52b73a5b5ed826ba1bd5dd510a21eb4425ae + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github + :target: https://github.com/OCA/account-invoice-reporting/tree/19.0/account_reporting_volume + :alt: OCA/account-invoice-reporting +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-invoice-reporting-19-0/account-invoice-reporting-19-0-account_reporting_volume + :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/account-invoice-reporting&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the measure "Volume" in the invoices analysis view. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +1. Go to *Invoicing > Reporting > Management > Invoice Analysis*. +2. Add the "Volume" measure from your "Measures" dropdown in your + analysis. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Tecnativa + +Contributors +------------ + +- `Tecnativa `__: + + - Carlos Roca + - Stefan Ungureanu + +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/account-invoice-reporting `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_reporting_volume/__init__.py b/account_reporting_volume/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/account_reporting_volume/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_reporting_volume/__manifest__.py b/account_reporting_volume/__manifest__.py new file mode 100644 index 000000000..6ab441375 --- /dev/null +++ b/account_reporting_volume/__manifest__.py @@ -0,0 +1,14 @@ +# Copyright 2022 Tecnativa - Carlos Roca +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Volume in the invoices analysis view", + "version": "19.0.1.0.0", + "author": "Tecnativa, Odoo Community Association (OCA)", + "category": "Inventory, Logistics, Warehousing", + "development_status": "Production/Stable", + "license": "AGPL-3", + "website": "https://github.com/OCA/account-invoice-reporting", + "depends": ["sale"], + "installable": True, +} diff --git a/account_reporting_volume/i18n/account_reporting_volume.pot b/account_reporting_volume/i18n/account_reporting_volume.pot new file mode 100644 index 000000000..a4523cea8 --- /dev/null +++ b/account_reporting_volume/i18n/account_reporting_volume.pot @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_reporting_volume +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_reporting_volume +#: model:ir.model,name:account_reporting_volume.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "" + +#. module: account_reporting_volume +#: model:ir.model.fields,field_description:account_reporting_volume.field_account_invoice_report__volume +msgid "Volume" +msgstr "" diff --git a/account_reporting_volume/i18n/es.po b/account_reporting_volume/i18n/es.po new file mode 100644 index 000000000..d5aef46ae --- /dev/null +++ b/account_reporting_volume/i18n/es.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_reporting_volume +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-06 08:18+0000\n" +"PO-Revision-Date: 2022-05-06 10:20+0200\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 2.3\n" + +#. module: account_reporting_volume +#: model:ir.model,name:account_reporting_volume.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "Estadísticas de facturas" + +#. module: account_reporting_volume +#: model:ir.model.fields,field_description:account_reporting_volume.field_account_invoice_report__volume +msgid "Volume" +msgstr "Volumen" diff --git a/account_reporting_volume/i18n/it.po b/account_reporting_volume/i18n/it.po new file mode 100644 index 000000000..0c2f078b0 --- /dev/null +++ b/account_reporting_volume/i18n/it.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_reporting_volume +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-02-22 09:38+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: account_reporting_volume +#: model:ir.model,name:account_reporting_volume.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "Statistiche fatture" + +#. module: account_reporting_volume +#: model:ir.model.fields,field_description:account_reporting_volume.field_account_invoice_report__volume +msgid "Volume" +msgstr "Volume" diff --git a/account_reporting_volume/models/__init__.py b/account_reporting_volume/models/__init__.py new file mode 100644 index 000000000..52e62702b --- /dev/null +++ b/account_reporting_volume/models/__init__.py @@ -0,0 +1 @@ +from . import account_invoice_report diff --git a/account_reporting_volume/models/account_invoice_report.py b/account_reporting_volume/models/account_invoice_report.py new file mode 100644 index 000000000..537eea1ac --- /dev/null +++ b/account_reporting_volume/models/account_invoice_report.py @@ -0,0 +1,27 @@ +# Copyright 2022 Tecnativa - Carlos Roca +# Copyright 2025 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models +from odoo.tools import SQL + + +class AccountInvoiceReport(models.Model): + _inherit = "account.invoice.report" + + volume = fields.Float(digits="Volume") + + def _select(self) -> SQL: + return SQL( + """ + %s, + COALESCE( + (product.volume * + (CASE WHEN move.move_type IN + ('in_invoice','out_refund','in_receipt') THEN -1 ELSE 1 END) + * line.quantity / uom_line.factor * uom_template.factor), + 0.0 + ) as volume + """, + super()._select(), + ) diff --git a/account_reporting_volume/pyproject.toml b/account_reporting_volume/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/account_reporting_volume/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_reporting_volume/readme/CONTRIBUTORS.md b/account_reporting_volume/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..8482fb6c4 --- /dev/null +++ b/account_reporting_volume/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- [Tecnativa](https://www.tecnativa.com): + - Carlos Roca + - Stefan Ungureanu diff --git a/account_reporting_volume/readme/DESCRIPTION.md b/account_reporting_volume/readme/DESCRIPTION.md new file mode 100644 index 000000000..49fec3bac --- /dev/null +++ b/account_reporting_volume/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module adds the measure "Volume" in the invoices analysis view. diff --git a/account_reporting_volume/readme/USAGE.md b/account_reporting_volume/readme/USAGE.md new file mode 100644 index 000000000..624b82530 --- /dev/null +++ b/account_reporting_volume/readme/USAGE.md @@ -0,0 +1,3 @@ +1. Go to *Invoicing \> Reporting \> Management \> Invoice Analysis*. +2. Add the "Volume" measure from your "Measures" dropdown in your + analysis. diff --git a/account_reporting_volume/static/description/icon.png b/account_reporting_volume/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/account_reporting_volume/static/description/icon.png differ diff --git a/account_reporting_volume/static/description/index.html b/account_reporting_volume/static/description/index.html new file mode 100644 index 000000000..f275bab2e --- /dev/null +++ b/account_reporting_volume/static/description/index.html @@ -0,0 +1,442 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Volume in the invoices analysis view

+ +

Production/Stable License: AGPL-3 OCA/account-invoice-reporting Translate me on Weblate Try me on Runboat

+

This module adds the measure “Volume” in the invoices analysis view.

+

Table of contents

+ +
+

Usage

+
    +
  1. Go to Invoicing > Reporting > Management > Invoice Analysis.
  2. +
  3. Add the “Volume” measure from your “Measures” dropdown in your +analysis.
  4. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa:
      +
    • Carlos Roca
    • +
    • Stefan Ungureanu
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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/account-invoice-reporting project on GitHub.

+

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

+
+
+
+
+ +