Skip to content

Commit

Permalink
[MIG] stock_move_delay_report: Migration to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LoisRForgeFlow committed Jun 17, 2024
1 parent c2a48ce commit c75310f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 96 deletions.
6 changes: 6 additions & 0 deletions setup/stock_move_delay_report/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
90 changes: 0 additions & 90 deletions stock_move_delay_report/README.rst
Original file line number Diff line number Diff line change
@@ -1,90 +0,0 @@
=======================
Stock Move Delay Report
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:fdf78d6d5d5d85cc3b2e93a9d34999f8776e8b9e677a3a36cb77f0679e2d0820
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-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%2Fstock--logistics--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_move_delay_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-13-0/stock-logistics-reporting-13-0-stock_move_delay_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=13.0
:alt: Try me on Runboat

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

This module adds a report to check the delay from incoming and outgoing moves grouped by Responsible Partner.

**Table of contents**

.. contents::
:local:

Usage
=====

Go to Inventory -> Reporting -> Delay Analysis.

Here there are 3 views:

Graph View: Shows the mean delay days of the stock moves for each partner with incoming or outgoing moves.

Pivot View: Shows the mean delay days of the stock moves for each partner with incoming or outgoing moves. Also shows the % of moves done on time.

Tree View: Shows all the done moves grouped by the partner responsible (in charge) of the picking.

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_delay_report%0Aversion:%2013.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
~~~~~~~

* ForgeFlow

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

* `ForgeFlow <https://www.forgeflow.com>`_:
* David Jiménez <[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/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_move_delay_report>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion stock_move_delay_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Stock Move Delay Report",
"summary": "Stock Move Delay Report",
"version": "13.0.1.0.0",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-reporting",
Expand Down
6 changes: 3 additions & 3 deletions stock_move_delay_report/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class StockMove(models.Model):
@api.depends("state")
def _compute_date_delay(self):
for rec in self:
if rec.state == "done" and rec.date_expected:
rec.date_delay = (rec.date - rec.date_expected).days
elif not rec.date_expected:
if rec.state == "done" and rec.date_deadline:
rec.date_delay = (rec.date - rec.date_deadline).days
elif not rec.date_deadline:
rec.date_delay = 0
else:
rec.date_delay = None
Expand Down
4 changes: 2 additions & 2 deletions stock_move_delay_report/report/delay_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class StockMoveDelayReport(models.Model):
date = fields.Date("Date Scheduled", readonly=True)
move_id = fields.Many2one("stock.move", "Stock Move #", readonly=True)
product_id = fields.Many2one("product.product", "Product", readonly=True)
reference = fields.Char("Reference", readonly=True)
reference = fields.Char(readonly=True)
location_src_id = fields.Many2one("stock.location", "From", readonly=True)
location_dest_id = fields.Many2one("stock.location", "To", readonly=True)
date_delay = fields.Float("Date Delay", group_operator="avg", readonly=True)
date_delay = fields.Float(group_operator="avg", readonly=True)
done_on_time = fields.Float("Done on Time", group_operator="avg", readonly=True)
product_uom = fields.Many2one("uom.uom", "Unit of Measure", readonly=True)
responsible_id = fields.Many2one("res.partner", "Responsible", readonly=True)
Expand Down

0 comments on commit c75310f

Please sign in to comment.