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

[MIG] [18.0] stock_quantity_history_location #360

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from
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
116 changes: 116 additions & 0 deletions stock_quantity_history_location/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
===============================
Stock Quantity History Location
===============================

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

.. |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/17.0/stock_quantity_history_location
: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-17-0/stock-logistics-reporting-17-0-stock_quantity_history_location
: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=17.0
:alt: Try me on Runboat

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

This module allows to run an Inventory report or Inventory Valuation
report by location, for a past date or for current date.

**Table of contents**

.. contents::
:local:

Usage
=====

First, you need to activate Storage Locations. To do so, go to Inventory
/ Configuration / Settings / Warehouse and activate it.

To use this module, go to:

- *Inventory / Reporting / Locations*

- Select Inventory at Date & Location

- Filter by location

- **Optionally: Mark if you want to include child location**

- Choose a moment in time:

- Current Inventory
- At a Specific Date

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_quantity_history_location%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
-------

* ForgeFlow

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

- Ewetoye Ibrahim <[email protected]>
- Jordi Ballester Alomar <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Ernesto Tejeda

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.

.. |maintainer-EwetoyeIbrahim| image:: https://github.com/EwetoyeIbrahim.png?size=40px
:target: https://github.com/EwetoyeIbrahim
:alt: EwetoyeIbrahim
.. |maintainer-luisg123v| image:: https://github.com/luisg123v.png?size=40px
:target: https://github.com/luisg123v
:alt: luisg123v
.. |maintainer-rolandojduartem| image:: https://github.com/rolandojduartem.png?size=40px
:target: https://github.com/rolandojduartem
:alt: rolandojduartem

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-EwetoyeIbrahim| |maintainer-luisg123v| |maintainer-rolandojduartem|

This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/17.0/stock_quantity_history_location>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions stock_quantity_history_location/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import wizards
from . import models
18 changes: 18 additions & 0 deletions stock_quantity_history_location/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Stock Quantity History Location",
"summary": "Provides stock quantity by location on past date",
"version": "0.0.1",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"maintainers": [
"EwetoyeIbrahim",
"luisg123v",
"rolandojduartem",
],
"website": "https://github.com/OCA/stock-logistics-reporting",
"depends": ["stock"],
"data": ["wizards/stock_quantity_history.xml"],
}
45 changes: 45 additions & 0 deletions stock_quantity_history_location/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quantity_history_location
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-09 21:33+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\n"
"Language: es\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: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__include_child_locations
msgid "Include Child Locations"
msgstr "Incluir Localizaciones Infantiles"

#. module: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__location_id
msgid "Location"
msgstr "Localización"

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quant
msgid "Quants"
msgstr ""

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quantity_history
msgid "Stock Quantity History"
msgstr "Historial de Cantidades de Existencias"

#, python-format
#~ msgid "Inventory at Date"
#~ msgstr "Inventario a Fecha"

#, python-format
#~ msgid "Inventory at Date & Location"
#~ msgstr "Inventario en Fecha y lugar"
48 changes: 48 additions & 0 deletions stock_quantity_history_location/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quantity_history_location
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-10-24 10:06+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 5.6.2\n"

#. module: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__include_child_locations
msgid "Include Child Locations"
msgstr "Includere ubicazioni figlie"

#. module: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__location_id
msgid "Location"
msgstr "Ubicazione"

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quant
msgid "Quants"
msgstr "Quanti"

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quantity_history
msgid "Stock Quantity History"
msgstr "Storico quantità giacenza"

#, python-format
#~ msgid "Inventory at Date"
#~ msgstr "Inventario alla data"

#, python-format
#~ msgid "Inventory at Date & Location"
#~ msgstr "Inventario alla Data e Locazione"

#~ msgid "Include child locations"
#~ msgstr "Includi locazioni figlie"
49 changes: 49 additions & 0 deletions stock_quantity_history_location/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quantity_history_location
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-01-21 10:40+0000\n"
"Last-Translator: kakurai8 <[email protected]>\n"
"Language-Team: none\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__include_child_locations
msgid "Include Child Locations"
msgstr ""

#. module: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__location_id
msgid "Location"
msgstr "ロケーション"

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quant
msgid "Quants"
msgstr ""

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quantity_history
msgid "Stock Quantity History"
msgstr "在庫数量履歴"

#~ msgid "Display Name"
#~ msgstr "表示名"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Include child locations"
#~ msgstr "子ロケーションを含める"

#~ msgid "Last Modified on"
#~ msgstr "最終更新日"
45 changes: 45 additions & 0 deletions stock_quantity_history_location/i18n/ro.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quantity_history_location
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-09-29 11:00+0000\n"
"Last-Translator: erik-bzcl <[email protected]>\n"
"Language-Team: none\n"
"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
"20)) ? 1 : 2;\n"
"X-Generator: Weblate 3.10\n"

#. module: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__include_child_locations
msgid "Include Child Locations"
msgstr ""

#. module: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__location_id
msgid "Location"
msgstr "Locaţia"

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quant
msgid "Quants"
msgstr ""

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quantity_history
msgid "Stock Quantity History"
msgstr "Stoc cantitativ istoric"

#, python-format
#~ msgid "Inventory at Date & Location"
#~ msgstr "Stoc în data & locaţia"

#~ msgid "Include child locations"
#~ msgstr "Inclusiv sublocaţii"
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quantity_history_location
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__include_child_locations
msgid "Include Child Locations"
msgstr ""

#. module: stock_quantity_history_location
#: model:ir.model.fields,field_description:stock_quantity_history_location.field_stock_quantity_history__location_id
msgid "Location"
msgstr ""

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quant
msgid "Quants"
msgstr ""

#. module: stock_quantity_history_location
#: model:ir.model,name:stock_quantity_history_location.model_stock_quantity_history
msgid "Stock Quantity History"
msgstr ""
1 change: 1 addition & 0 deletions stock_quantity_history_location/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_quant
25 changes: 25 additions & 0 deletions stock_quantity_history_location/models/stock_quant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2024 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from lxml import etree

from odoo import api, models


class StockQuant(models.Model):
_inherit = "stock.quant"

@api.model
def get_views(self, views, options=None):
res = super().get_views(views, options=options)
user_has_group = self.env.user.has_group("stock.group_stock_multi_locations")
list_view = res.get("views", {}).get("list", {})
if user_has_group and list_view:
arch = list_view.get("arch", "")
arch_tree = etree.XML(arch)
buttons = arch_tree.xpath('//button[@name="action_inventory_at_date"]')
for button in buttons:
button.set("string", "Inventory at Date & Location")

Check warning on line 22 in stock_quantity_history_location/models/stock_quant.py

View check run for this annotation

Codecov / codecov/patch

stock_quantity_history_location/models/stock_quant.py#L22

Added line #L22 was not covered by tests
new_arch = etree.tostring(arch_tree, encoding="unicode")
list_view["arch"] = new_arch
return res
3 changes: 3 additions & 0 deletions stock_quantity_history_location/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Loading
Loading