Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] sale_report_delivered_volume: Migration to 17.0 #281

Open
wants to merge 9 commits into
base: 17.0
Choose a base branch
from
86 changes: 86 additions & 0 deletions sale_report_delivered_volume/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
============================
Sale Report Delivered Volume
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a667693bb3badeef15771eae2bfb056219e4b80c2fbc1c61fef1227fadd688a6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/licence-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%2Fsale--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/sale-reporting/tree/17.0/sale_report_delivered_volume
:alt: OCA/sale-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-reporting-17-0/sale-reporting-17-0-sale_report_delivered_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/sale-reporting&target_branch=17.0
:alt: Try me on Runboat

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

This module adds the measure "Volume Delivered" in the sale report view.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Go to *Sales > Reporting > Sales*.
2. Add the "Volume Delivered" measure from your "Measures" dropdown in
your analysis.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-reporting/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/sale-reporting/issues/new?body=module:%20sale_report_delivered_volume%0Aversion:%2017.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
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Carlos Roca
- Carolina Fernandez

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/sale-reporting <https://github.com/OCA/sale-reporting/tree/17.0/sale_report_delivered_volume>`_ 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 sale_report_delivered_volume/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions sale_report_delivered_volume/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2022 Tecnativa - Carlos Roca
# Copyright 2023 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale Report Delivered Volume",
"version": "17.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"category": "Sales",
"development_status": "Production/Stable",
"license": "AGPL-3",
"website": "https://github.com/OCA/sale-reporting",
"depends": ["sale"],
"installable": True,
}
28 changes: 28 additions & 0 deletions sale_report_delivered_volume/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_report_delivered_volume
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-06 09:48+0000\n"
"PO-Revision-Date: 2023-10-09 09:14+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\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: Weblate 4.17\n"

#. module: sale_report_delivered_volume
#: model:ir.model,name:sale_report_delivered_volume.model_sale_report
msgid "Sales Analysis Report"
msgstr "Informe de análisis de ventas"

#. module: sale_report_delivered_volume
#: model:ir.model.fields,field_description:sale_report_delivered_volume.field_sale_report__volume_delivered
msgid "Volume Delivered"
msgstr "Volumen Entregado"
27 changes: 27 additions & 0 deletions sale_report_delivered_volume/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_report_delivered_volume
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-12 11:34+0000\n"
"Last-Translator: mymage <[email protected]>\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: sale_report_delivered_volume
#: model:ir.model,name:sale_report_delivered_volume.model_sale_report
msgid "Sales Analysis Report"
msgstr "Resoconto analisi vendite"

#. module: sale_report_delivered_volume
#: model:ir.model.fields,field_description:sale_report_delivered_volume.field_sale_report__volume_delivered
msgid "Volume Delivered"
msgstr "Volume consegnato"
24 changes: 24 additions & 0 deletions sale_report_delivered_volume/i18n/sale_report_delivered_volume.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_report_delivered_volume
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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: sale_report_delivered_volume
#: model:ir.model,name:sale_report_delivered_volume.model_sale_report
msgid "Sales Analysis Report"
msgstr ""

#. module: sale_report_delivered_volume
#: model:ir.model.fields,field_description:sale_report_delivered_volume.field_sale_report__volume_delivered
msgid "Volume Delivered"
msgstr ""
1 change: 1 addition & 0 deletions sale_report_delivered_volume/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_report
27 changes: 27 additions & 0 deletions sale_report_delivered_volume/models/sale_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class SaleReport(models.Model):
_inherit = "sale.report"

volume_delivered = fields.Float(digits="Volume")

def _select_additional_fields(self):
res = super()._select_additional_fields()
select_str_volume_delivered = """

Check warning on line 14 in sale_report_delivered_volume/models/sale_report.py

View check run for this annotation

Codecov / codecov/patch

sale_report_delivered_volume/models/sale_report.py#L13-L14

Added lines #L13 - L14 were not covered by tests
CASE
WHEN l.product_id IS NOT NULL THEN sum(
p.volume * l.qty_delivered / u.factor * u2.factor
)
ELSE 0
END
"""
res.update(

Check warning on line 22 in sale_report_delivered_volume/models/sale_report.py

View check run for this annotation

Codecov / codecov/patch

sale_report_delivered_volume/models/sale_report.py#L22

Added line #L22 was not covered by tests
{
"volume_delivered": select_str_volume_delivered,
}
)
return res

Check warning on line 27 in sale_report_delivered_volume/models/sale_report.py

View check run for this annotation

Codecov / codecov/patch

sale_report_delivered_volume/models/sale_report.py#L27

Added line #L27 was not covered by tests
3 changes: 3 additions & 0 deletions sale_report_delivered_volume/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions sale_report_delivered_volume/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Tecnativa](https://www.tecnativa.com):
- Carlos Roca
- Carolina Fernandez
1 change: 1 addition & 0 deletions sale_report_delivered_volume/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module adds the measure "Volume Delivered" in the sale report view.
3 changes: 3 additions & 0 deletions sale_report_delivered_volume/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Go to *Sales \> Reporting \> Sales*.
2. Add the "Volume Delivered" measure from your "Measures" dropdown in
your analysis.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading