Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions stock_move_variation_report/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
=========================================
Stock Move Report Show Quantity Variation
=========================================

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

.. |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%2Fstock--logistics--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-reporting/tree/18.0/stock_move_variation_report
:alt: OCA/stock-logistics-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-18-0/stock-logistics-reporting-18-0-stock_move_variation_report
: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/stock-logistics-reporting&target_branch=18.0
:alt: Try me on Runboat

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

The Product Moves Report lists quantities moved for products. However it
can be hard to identify the stock quantity variations.

This feature adds a column with the quantity variation for each move.
Incoming moves are a positive variation, and outgoing moves are a
negative variation.

**Table of contents**

.. contents::
:local:

Usage
=====

Open the menu Inventory / Reporting / Product Moves.

Use the three dot icon on the top left to make the "Qty Variation"
column visible.

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

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

* Open Source Integrators

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/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/18.0/stock_move_variation_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 stock_move_variation_report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
13 changes: 13 additions & 0 deletions stock_move_variation_report/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# © 2025 Daniel Reis - Open Source Integrators
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Stock Move Report Show Quantity Variation",
"summary": "Show quantity variation the the Inventory Moves report",
"version": "18.0.1.0.0",
"category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logistics-reporting",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"license": "LGPL-3",
"depends": ["stock_account"],
"data": ["views/stock_move_line_view.xml"],
}
1 change: 1 addition & 0 deletions stock_move_variation_report/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_move_line
32 changes: 32 additions & 0 deletions stock_move_variation_report/models/stock_move_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# © 2025 Daniel Reis - Open Source Integrators
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import api, fields, models


class StockMoveLine(models.Model):
_inherit = "stock.move.line"

qty_variation = fields.Float(
compute="_compute_qty_variation",
store=True,
)

def _get_qty_variation_sign(self):
self.ensure_one()
if self.move_id._is_in():
return 1
elif self.move_id._is_out():
return -1
else:
return 0

@api.depends(
"quantity",
"move_id.product_uom_qty",
"location_id.usage",
"location_dest_id.usage",
)
def _compute_qty_variation(self):
for line in self:
line.qty_variation = line.quantity * line._get_qty_variation_sign()
3 changes: 3 additions & 0 deletions stock_move_variation_report/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions stock_move_variation_report/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The Product Moves Report lists quantities moved for products.
However it can be hard to identify the stock quantity variations.

This feature adds a column with the quantity variation for each move.
Incoming moves are a positive variation, and outgoing moves are a negative variation.
3 changes: 3 additions & 0 deletions stock_move_variation_report/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Open the menu Inventory / Reporting / Product Moves.

Use the three dot icon on the top left to make the "Qty Variation" column visible.
Loading