Skip to content

Commit 835f8d4

Browse files
committed
Merge PR #373 into 18.0
Signed-off-by pedrobaeza
2 parents 4e5c239 + 433ffd0 commit 835f8d4

14 files changed

Lines changed: 654 additions & 0 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
====================================
2+
Volume in the invoices analysis view
3+
====================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:2b66390acebaddec80ed86839766bfd8085ed9b248f1fd5e2f7425483aaeb0ad
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Production/Stable
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github
20+
:target: https://github.com/OCA/account-invoice-reporting/tree/18.0/account_reporting_volume
21+
:alt: OCA/account-invoice-reporting
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/account-invoice-reporting-18-0/account-invoice-reporting-18-0-account_reporting_volume
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoice-reporting&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module adds the measure "Volume" in the invoices analysis view.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Usage
39+
=====
40+
41+
1. Go to *Invoicing > Reporting > Management > Invoice Analysis*.
42+
2. Add the "Volume" measure from your "Measures" dropdown in your
43+
analysis.
44+
45+
Bug Tracker
46+
===========
47+
48+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-reporting/issues>`_.
49+
In case of trouble, please check there if your issue has already been reported.
50+
If you spotted it first, help us to smash it by providing a detailed and welcomed
51+
`feedback <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_reporting_volume%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
52+
53+
Do not contact contributors directly about support or help with technical issues.
54+
55+
Credits
56+
=======
57+
58+
Authors
59+
-------
60+
61+
* Tecnativa
62+
63+
Contributors
64+
------------
65+
66+
- `Tecnativa <https://www.tecnativa.com>`__:
67+
68+
- Carlos Roca
69+
- Stefan Ungureanu
70+
71+
Maintainers
72+
-----------
73+
74+
This module is maintained by the OCA.
75+
76+
.. image:: https://odoo-community.org/logo.png
77+
:alt: Odoo Community Association
78+
:target: https://odoo-community.org
79+
80+
OCA, or the Odoo Community Association, is a nonprofit organization whose
81+
mission is to support the collaborative development of Odoo features and
82+
promote its widespread use.
83+
84+
This module is part of the `OCA/account-invoice-reporting <https://github.com/OCA/account-invoice-reporting/tree/18.0/account_reporting_volume>`_ project on GitHub.
85+
86+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2022 Tecnativa - Carlos Roca
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Volume in the invoices analysis view",
6+
"version": "18.0.1.0.0",
7+
"author": "Tecnativa, Odoo Community Association (OCA)",
8+
"category": "Inventory, Logistics, Warehousing",
9+
"development_status": "Production/Stable",
10+
"license": "AGPL-3",
11+
"website": "https://github.com/OCA/account-invoice-reporting",
12+
"depends": ["sale"],
13+
"installable": True,
14+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_reporting_volume
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: account_reporting_volume
17+
#: model:ir.model,name:account_reporting_volume.model_account_invoice_report
18+
msgid "Invoices Statistics"
19+
msgstr ""
20+
21+
#. module: account_reporting_volume
22+
#: model:ir.model.fields,field_description:account_reporting_volume.field_account_invoice_report__volume
23+
msgid "Volume"
24+
msgstr ""
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_reporting_volume
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 13.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2022-05-06 08:18+0000\n"
10+
"PO-Revision-Date: 2022-05-06 10:20+0200\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"Language: es\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
"X-Generator: Poedit 2.3\n"
19+
20+
#. module: account_reporting_volume
21+
#: model:ir.model,name:account_reporting_volume.model_account_invoice_report
22+
msgid "Invoices Statistics"
23+
msgstr "Estadísticas de facturas"
24+
25+
#. module: account_reporting_volume
26+
#: model:ir.model.fields,field_description:account_reporting_volume.field_account_invoice_report__volume
27+
msgid "Volume"
28+
msgstr "Volumen"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_reporting_volume
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2024-02-22 09:38+0000\n"
10+
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
11+
"Language-Team: none\n"
12+
"Language: it\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: account_reporting_volume
20+
#: model:ir.model,name:account_reporting_volume.model_account_invoice_report
21+
msgid "Invoices Statistics"
22+
msgstr "Statistiche fatture"
23+
24+
#. module: account_reporting_volume
25+
#: model:ir.model.fields,field_description:account_reporting_volume.field_account_invoice_report__volume
26+
msgid "Volume"
27+
msgstr "Volume"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import account_invoice_report
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2022 Tecnativa - Carlos Roca
2+
# Copyright 2025 Tecnativa - Víctor Martínez
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
5+
from odoo import fields, models
6+
from odoo.tools import SQL
7+
8+
9+
class AccountInvoiceReport(models.Model):
10+
_inherit = "account.invoice.report"
11+
12+
volume = fields.Float(digits="Volume")
13+
14+
def _select(self) -> SQL:
15+
return SQL(
16+
"""
17+
%s,
18+
COALESCE(
19+
(product.volume *
20+
(CASE WHEN move.move_type IN
21+
('in_invoice','out_refund','in_receipt') THEN -1 ELSE 1 END)
22+
* line.quantity / uom_line.factor * uom_template.factor),
23+
0.0
24+
) as volume
25+
""",
26+
super()._select(),
27+
)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [Tecnativa](https://www.tecnativa.com):
2+
- Carlos Roca
3+
- Stefan Ungureanu

0 commit comments

Comments
 (0)