Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,44 @@
# DDMRP History
Odoo addon: ddmrp_history
## Installation
```bash
pip install odoo-bringout-oca-ddmrp-ddmrp_history
```
## Dependencies
This addon depends on:
- ddmrp
## Manifest Information
- **Name**: DDMRP History
- **Version**: 16.0.1.2.0
- **Category**: Warehouse Management
- **License**: LGPL-3
- **Installable**: True
## Source
Based on [OCA/ddmrp](https://github.com/OCA/ddmrp) branch 16.0, addon `ddmrp_history`.
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md

View file

@ -0,0 +1,131 @@
=============
DDMRP History
=============
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d037b8db306d50283d8a06fa845eaf84e37523c62ea94cc5ccd570c64158fe52
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fddmrp-lightgray.png?logo=github
:target: https://github.com/OCA/ddmrp/tree/16.0/ddmrp_history
:alt: OCA/ddmrp
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_history
: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/ddmrp&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
Allow to extend DDMRP App to store historical data of buffers.
**Table of contents**
.. contents::
:local:
Installation
============
You need to install the python pandas library::
pip install pandas==0.25.3
Usage
=====
You can access, as a inventory manager, to all the DDMRP historical data
throught *Inventory > Reports > DDMRP Buffer History*. Additionally you can
see a historical evolution chart of any buffer at the bottom of its form view,
either by a planning or a execution perspective.
Changelog
=========
13.0.1.0.0 (2020-06-16)
~~~~~~~~~~~~~~~~~~~~~~~
* Migration to v13.
11.0.1.0.1 (2019-02-07)
~~~~~~~~~~~~~~~~~~~~~~~
* Make history charts responsive and remove NFP from execution chart.
* Use user's language to format dates in the charts.
11.0.1.0.0 (2018-08-01)
~~~~~~~~~~~~~~~~~~~~~~~
* Start of the history
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/ddmrp/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/ddmrp/issues/new?body=module:%20ddmrp_history%0Aversion:%2016.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
~~~~~~~~~~~~
* Lois Rilo <lois.rilo@forgeflow.com>
* Jordi Ballester <jordi.ballester@forgeflow.com>
* Akim Juillerat <akim.juillerat@camptocamp.com>
* Christopher Ormaza <chris.ormaza@forgeflow.com>
Other credits
~~~~~~~~~~~~~
The initial development of this module has been financially supported by:
* Aleph Objects, Inc.
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-JordiBForgeFlow| image:: https://github.com/JordiBForgeFlow.png?size=40px
:target: https://github.com/JordiBForgeFlow
:alt: JordiBForgeFlow
.. |maintainer-LoisRForgeFlow| image:: https://github.com/LoisRForgeFlow.png?size=40px
:target: https://github.com/LoisRForgeFlow
:alt: LoisRForgeFlow
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-JordiBForgeFlow| |maintainer-LoisRForgeFlow|
This module is part of the `OCA/ddmrp <https://github.com/OCA/ddmrp/tree/16.0/ddmrp_history>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View file

@ -0,0 +1 @@
from . import models

View file

@ -0,0 +1,24 @@
# Copyright 2017-22 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"name": "DDMRP History",
"summary": "Allow to store historical data of DDMRP buffers.",
"version": "16.0.1.2.0",
"development_status": "Beta",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"maintainers": ["JordiBForgeFlow", "LoisRForgeFlow"],
"website": "https://github.com/OCA/ddmrp",
"category": "Warehouse Management",
"depends": ["ddmrp"],
"data": [
"security/ir.model.access.csv",
"security/security.xml",
"views/ddmrp_history_view.xml",
"views/stock_buffer_view.xml",
],
"demo": ["demo/ddmrp.history.csv"],
"external_dependencies": {"python": ["pandas>=0.25.3"]},
"license": "LGPL-3",
"installable": True,
}

View file

@ -0,0 +1,12 @@
id,buffer_id/id,date,net_flow_position,on_hand_position,top_of_green,top_of_red,top_of_yellow
ddmrp_history_rm01_1,ddmrp.stock_buffer_rm01,2017-09-14 00:45:32,400,400,492.82,122.28,400.88
ddmrp_history_rm01_2,ddmrp.stock_buffer_rm01,2017-09-14 03:53:30,400,400,492.82,122.28,400.88
ddmrp_history_rm01_3,ddmrp.stock_buffer_rm01,2017-09-14 07:19:22,400,400,492.82,122.28,400.88
ddmrp_history_rm01_4,ddmrp.stock_buffer_rm01,2017-09-14 10:39:18,400,400,492.82,122.28,400.88
ddmrp_history_rm01_5,ddmrp.stock_buffer_rm01,2017-09-14 13:56:05,395,395,496.94,123.3,404.23
ddmrp_history_rm01_6,ddmrp.stock_buffer_rm01,2017-09-14 17:15:05,395,395,496.94,123.3,404.23
ddmrp_history_rm01_7,ddmrp.stock_buffer_rm01,2017-09-14 20:37:16,390,390,501.08,124.33,407.6
ddmrp_history_rm01_8,ddmrp.stock_buffer_rm01,2017-09-15 00:05:02,389,389,412.74,102.41,335.74
ddmrp_history_rm01_9,ddmrp.stock_buffer_rm01,2017-09-15 18:55:42,381,381,419.35,104.05,341.12
ddmrp_history_rm01_10,ddmrp.stock_buffer_rm01,2017-09-18 16:33:40,371,371,266.62,66.15,216.88
ddmrp_history_rm01_11,ddmrp.stock_buffer_rm01,2017-09-18 19:59:13,387,371,266.62,66.15,216.88
1 id buffer_id/id date net_flow_position on_hand_position top_of_green top_of_red top_of_yellow
2 ddmrp_history_rm01_1 ddmrp.stock_buffer_rm01 2017-09-14 00:45:32 400 400 492.82 122.28 400.88
3 ddmrp_history_rm01_2 ddmrp.stock_buffer_rm01 2017-09-14 03:53:30 400 400 492.82 122.28 400.88
4 ddmrp_history_rm01_3 ddmrp.stock_buffer_rm01 2017-09-14 07:19:22 400 400 492.82 122.28 400.88
5 ddmrp_history_rm01_4 ddmrp.stock_buffer_rm01 2017-09-14 10:39:18 400 400 492.82 122.28 400.88
6 ddmrp_history_rm01_5 ddmrp.stock_buffer_rm01 2017-09-14 13:56:05 395 395 496.94 123.3 404.23
7 ddmrp_history_rm01_6 ddmrp.stock_buffer_rm01 2017-09-14 17:15:05 395 395 496.94 123.3 404.23
8 ddmrp_history_rm01_7 ddmrp.stock_buffer_rm01 2017-09-14 20:37:16 390 390 501.08 124.33 407.6
9 ddmrp_history_rm01_8 ddmrp.stock_buffer_rm01 2017-09-15 00:05:02 389 389 412.74 102.41 335.74
10 ddmrp_history_rm01_9 ddmrp.stock_buffer_rm01 2017-09-15 18:55:42 381 381 419.35 104.05 341.12
11 ddmrp_history_rm01_10 ddmrp.stock_buffer_rm01 2017-09-18 16:33:40 371 371 266.62 66.15 216.88
12 ddmrp_history_rm01_11 ddmrp.stock_buffer_rm01 2017-09-18 19:59:13 387 371 266.62 66.15 216.88

View file

@ -0,0 +1,168 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ddmrp_history
#
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: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__adu
msgid "ADU"
msgstr "ADU"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__adu
msgid "Average Daily Usage"
msgstr "Prosječna dnevna upotreba"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__buffer_id
msgid "Buffer"
msgstr "Bafer"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__company_id
msgid "Company"
msgstr "Preduzeće"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_uid
msgid "Created by"
msgstr "Kreirao"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_date
msgid "Created on"
msgstr "Kreirano"
#. module: ddmrp_history
#: model:ir.actions.act_window,name:ddmrp_history.action_ddmrp_history
#: model:ir.ui.menu,name:ddmrp_history.menu_ddmrp_history
msgid "DDMRP Buffer History"
msgstr "DDMRP historija bafera"
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_ddmrp_history
msgid "DDMRP History"
msgstr "DDMRP historija"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__date
msgid "Date"
msgstr "Datum"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__display_name
msgid "Display Name"
msgstr "Prikazani naziv"
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Execution Chart"
msgstr "Grafik izvršavanja"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__execution_history_chart
msgid "Execution Historical Chart"
msgstr "Historijski grafik izvršavanja"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__planning_history_chart
msgid "Historical Chart"
msgstr "Historijski grafik"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__id
msgid "ID"
msgstr "ID"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history____last_update
msgid "Last Modified on"
msgstr "Zadnje mijenjano"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_uid
msgid "Last Updated by"
msgstr "Zadnji ažurirao"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_date
msgid "Last Updated on"
msgstr "Zadnje ažurirano"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "NFP"
msgstr "NFP"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "Net flow position"
msgstr "Pozicija neto protoka"
#. module: ddmrp_history
#. odoo-python
#: code:addons/ddmrp_history/models/stock_buffer.py:0
#: code:addons/ddmrp_history/models/stock_buffer.py:0
#, python-format
msgid "Not enough data available."
msgstr "Nema dovoljno dostupnih podataka."
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "OHP"
msgstr "OHP"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "On-Hand Position"
msgstr "Pozicija na stanju"
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Planning Chart"
msgstr "Grafik planiranja"
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_stock_buffer
msgid "Stock Buffer"
msgstr "Skladišni bafer"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_green
msgid "TOG"
msgstr "TOG"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_red
msgid "TOR"
msgstr "TOR"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "TOY"
msgstr "TOY"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_green
msgid "Top of Green"
msgstr "Vrh zelene zone"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_red
msgid "Top of Red"
msgstr "Vrh crvene zone"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "Top of Yellow"
msgstr "Vrh žute zone"

View file

@ -0,0 +1,168 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ddmrp_history
#
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: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__adu
msgid "ADU"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__adu
msgid "Average Daily Usage"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__buffer_id
msgid "Buffer"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__company_id
msgid "Company"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_uid
msgid "Created by"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_date
msgid "Created on"
msgstr ""
#. module: ddmrp_history
#: model:ir.actions.act_window,name:ddmrp_history.action_ddmrp_history
#: model:ir.ui.menu,name:ddmrp_history.menu_ddmrp_history
msgid "DDMRP Buffer History"
msgstr ""
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_ddmrp_history
msgid "DDMRP History"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__date
msgid "Date"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__display_name
msgid "Display Name"
msgstr ""
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Execution Chart"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__execution_history_chart
msgid "Execution Historical Chart"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__planning_history_chart
msgid "Historical Chart"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__id
msgid "ID"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history____last_update
msgid "Last Modified on"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_uid
msgid "Last Updated by"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_date
msgid "Last Updated on"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "NFP"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "Net flow position"
msgstr ""
#. module: ddmrp_history
#. odoo-python
#: code:addons/ddmrp_history/models/stock_buffer.py:0
#: code:addons/ddmrp_history/models/stock_buffer.py:0
#, python-format
msgid "Not enough data available."
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "OHP"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "On-Hand Position"
msgstr ""
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Planning Chart"
msgstr ""
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_stock_buffer
msgid "Stock Buffer"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_green
msgid "TOG"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_red
msgid "TOR"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "TOY"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_green
msgid "Top of Green"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_red
msgid "Top of Red"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "Top of Yellow"
msgstr ""

View file

@ -0,0 +1,171 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ddmrp_history
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-06 11:48+0000\n"
"PO-Revision-Date: 2024-04-29 11:36+0000\n"
"Last-Translator: Lois Rilo <lois.rilo@forgeflow.com>\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: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__adu
msgid "ADU"
msgstr "CPD"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__adu
msgid "Average Daily Usage"
msgstr "Consumo Promedio Diario"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__buffer_id
msgid "Buffer"
msgstr "Búfer"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__company_id
msgid "Company"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_date
msgid "Created on"
msgstr "Creado en"
#. module: ddmrp_history
#: model:ir.actions.act_window,name:ddmrp_history.action_ddmrp_history
#: model:ir.ui.menu,name:ddmrp_history.menu_ddmrp_history
msgid "DDMRP Buffer History"
msgstr "Historia de Amortiguador DDMRP"
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_ddmrp_history
msgid "DDMRP History"
msgstr "Historia DDMRP"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__date
msgid "Date"
msgstr "Fecha"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__display_name
msgid "Display Name"
msgstr "Nombre mostrado"
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Execution Chart"
msgstr "Gráfico de Ejecución"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__execution_history_chart
msgid "Execution Historical Chart"
msgstr "Gráfico de Ejecución de Historia"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__planning_history_chart
msgid "Historical Chart"
msgstr "Grafico Histórico"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__id
msgid "ID"
msgstr "ID"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history____last_update
msgid "Last Modified on"
msgstr "Última Modificación en"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_uid
msgid "Last Updated by"
msgstr "Última Actualización por"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_date
msgid "Last Updated on"
msgstr "Última Actualización en"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "NFP"
msgstr "PFN"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "Net flow position"
msgstr "Posición de flujo neto"
#. module: ddmrp_history
#. odoo-python
#: code:addons/ddmrp_history/models/stock_buffer.py:0
#, python-format
msgid "Not enough data available."
msgstr "No hay suficientes datos disponibles."
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "OHP"
msgstr "PEM"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "On-Hand Position"
msgstr "Posición En Mano"
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Planning Chart"
msgstr "Gráfico de Planificación"
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_stock_buffer
msgid "Stock Buffer"
msgstr "Amortiguador de Inventario"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_green
msgid "TOG"
msgstr "TDV"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_red
msgid "TOR"
msgstr "TDR"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "TOY"
msgstr "TDA"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_green
msgid "Top of Green"
msgstr "Tope de Verde"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_red
msgid "Top of Red"
msgstr "Tope de Rojo"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "Top of Yellow"
msgstr "Tope de Amarillo"

View file

@ -0,0 +1,170 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ddmrp_history
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-07-22 10:13+0000\n"
"Last-Translator: c2cdidier <didier.donze@camptocamp.com>\n"
"Language-Team: none\n"
"Language: fr\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 3.10\n"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__adu
msgid "ADU"
msgstr "CMJ"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__adu
msgid "Average Daily Usage"
msgstr "Consommation moyenne journalière"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__buffer_id
msgid "Buffer"
msgstr "Buffer"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__company_id
msgid "Company"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_uid
msgid "Created by"
msgstr "Créé par"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_date
msgid "Created on"
msgstr "Créé le"
#. module: ddmrp_history
#: model:ir.actions.act_window,name:ddmrp_history.action_ddmrp_history
#: model:ir.ui.menu,name:ddmrp_history.menu_ddmrp_history
msgid "DDMRP Buffer History"
msgstr "DDMRP Historique de Buffer"
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_ddmrp_history
msgid "DDMRP History"
msgstr "DDMRP Historique"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__date
msgid "Date"
msgstr "Date"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Execution Chart"
msgstr "Graphique d'exécution"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__execution_history_chart
msgid "Execution Historical Chart"
msgstr "Graphique historique d'exécution"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__planning_history_chart
msgid "Historical Chart"
msgstr "Graphique historique"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__id
msgid "ID"
msgstr "ID"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_uid
msgid "Last Updated by"
msgstr "Dernière modification par"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "NFP"
msgstr "NFP"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "Net flow position"
msgstr "Stock disponible"
#. module: ddmrp_history
#. odoo-python
#: code:addons/ddmrp_history/models/stock_buffer.py:0
#, python-format
msgid "Not enough data available."
msgstr "Trop peu de données disponibles."
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "OHP"
msgstr ""
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "On-Hand Position"
msgstr ""
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Planning Chart"
msgstr "Graphique de planification"
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_stock_buffer
msgid "Stock Buffer"
msgstr "Buffer de stock"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_green
msgid "TOG"
msgstr "TOG"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_red
msgid "TOR"
msgstr "TOR"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "TOY"
msgstr "TOY"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_green
msgid "Top of Green"
msgstr "Top du vert"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_red
msgid "Top of Red"
msgstr "Top du rouge"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "Top of Yellow"
msgstr "Top du jaune"

View file

@ -0,0 +1,170 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ddmrp_history
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-08 07:45+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__adu
msgid "ADU"
msgstr "ADU"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__adu
msgid "Average Daily Usage"
msgstr "Utilizzo medio giornaliero"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__buffer_id
msgid "Buffer"
msgstr "Buffer"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__company_id
msgid "Company"
msgstr "Azienda"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_uid
msgid "Created by"
msgstr "Creato da"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__create_date
msgid "Created on"
msgstr "Creato il"
#. module: ddmrp_history
#: model:ir.actions.act_window,name:ddmrp_history.action_ddmrp_history
#: model:ir.ui.menu,name:ddmrp_history.menu_ddmrp_history
msgid "DDMRP Buffer History"
msgstr "Storico buffer DDMRP"
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_ddmrp_history
msgid "DDMRP History"
msgstr "Storico DDMRP"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__date
msgid "Date"
msgstr "Data"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__display_name
msgid "Display Name"
msgstr "Nome visualizzato"
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Execution Chart"
msgstr "Grafico esecuzione"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__execution_history_chart
msgid "Execution Historical Chart"
msgstr "Grafico storico esecuzione"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_stock_buffer__planning_history_chart
msgid "Historical Chart"
msgstr "Grafico storico"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__id
msgid "ID"
msgstr "ID"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "NFP"
msgstr "NFP"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__net_flow_position
msgid "Net flow position"
msgstr "Posizione flusso netta"
#. module: ddmrp_history
#. odoo-python
#: code:addons/ddmrp_history/models/stock_buffer.py:0
#, python-format
msgid "Not enough data available."
msgstr "Dati disponibili non sufficienti."
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "OHP"
msgstr "OHP"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__on_hand_position
msgid "On-Hand Position"
msgstr "Posizione a disposizione"
#. module: ddmrp_history
#: model_terms:ir.ui.view,arch_db:ddmrp_history.stock_buffer_view_form
msgid "Planning Chart"
msgstr "Grafico pianificazione"
#. module: ddmrp_history
#: model:ir.model,name:ddmrp_history.model_stock_buffer
msgid "Stock Buffer"
msgstr "Buffer di materiale"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_green
msgid "TOG"
msgstr "TOG"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_red
msgid "TOR"
msgstr "TOR"
#. module: ddmrp_history
#: model:ir.model.fields,field_description:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "TOY"
msgstr "TOY"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_green
msgid "Top of Green"
msgstr "Superiore della verde"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_red
msgid "Top of Red"
msgstr "Superiore della rossa"
#. module: ddmrp_history
#: model:ir.model.fields,help:ddmrp_history.field_ddmrp_history__top_of_yellow
msgid "Top of Yellow"
msgstr "Superiore della gialla"

View file

@ -0,0 +1,2 @@
from . import ddmrp_history
from . import stock_buffer

View file

@ -0,0 +1,53 @@
# Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class DdmrpHistory(models.Model):
_name = "ddmrp.history"
_description = "DDMRP History"
buffer_id = fields.Many2one(
comodel_name="stock.buffer",
string="Buffer",
ondelete="cascade",
index=True,
)
date = fields.Datetime()
top_of_red = fields.Float(
string="TOR",
help="Top of Red",
group_operator="avg",
)
top_of_yellow = fields.Float(
string="TOY",
help="Top of Yellow",
group_operator="avg",
)
top_of_green = fields.Float(
string="TOG",
help="Top of Green",
group_operator="avg",
)
net_flow_position = fields.Float(
string="NFP",
digits="Product Unit of Measure",
help="Net flow position",
group_operator="avg",
)
on_hand_position = fields.Float(
string="OHP",
digits="Product Unit of Measure",
help="On-Hand Position",
group_operator="avg",
)
adu = fields.Float(
string="ADU",
digits="Product Unit of Measure",
group_operator="avg",
help="Average Daily Usage",
)
company_id = fields.Many2one(
related="buffer_id.company_id",
)

View file

@ -0,0 +1,309 @@
# Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
import json
import logging
from math import pi
from odoo import _, fields, models
_logger = logging.getLogger(__name__)
try:
import numpy as np
import pandas as pd
from bokeh.embed import components
from bokeh.models import DatetimeTickFormatter, HoverTool
from bokeh.plotting import figure
except (ImportError, IOError) as err:
_logger.debug(err)
class StockBuffer(models.Model):
_inherit = "stock.buffer"
planning_history_chart = fields.Text(
string="Historical Chart",
compute="_compute_history_chart",
)
execution_history_chart = fields.Text(
string="Execution Historical Chart",
compute="_compute_execution_history_chart",
)
def _prepare_history_data(self):
self.ensure_one()
data = {
"buffer_id": self.id,
"date": fields.Datetime.now(),
"top_of_red": self.top_of_red,
"top_of_yellow": self.top_of_yellow,
"top_of_green": self.top_of_green,
"net_flow_position": self.net_flow_position,
"on_hand_position": self.product_location_qty_available_not_res,
"adu": self.adu,
}
return data
def cron_actions(self, only_nfp=False):
res = super().cron_actions(only_nfp=only_nfp)
data = self._prepare_history_data()
if not self.env.context.get("no_ddmrp_history"):
self.env["ddmrp.history"].sudo().create(data)
return res
def _compute_history_chart(self):
def stacked(df, categories):
areas = {}
last = np.zeros(len(df[categories[0]]))
for cat in categories:
_next = last + df[cat]
areas[cat] = np.hstack((last[::-1], _next))
last = _next
return areas
hex_colors = self._get_colors_hex_map(pallete="planning")
planning_colors = [
hex_colors["1_red"],
hex_colors["2_yellow"],
hex_colors["3_green"],
]
for rec in self:
history = self.env["ddmrp.history"].search(
[("buffer_id", "=", rec.id)], order="date"
)
if len(history) < 2:
rec.planning_history_chart = json.dumps(
{
"div": _("Not enough data available."),
"script": "",
}
)
continue
N = len(history)
categories = ["top_of_red", "top_of_yellow", "top_of_green"]
data = {}
dates = [r.date for r in history]
data["date"] = dates
data[categories[0]] = [r.top_of_red for r in history]
data[categories[1]] = [r.top_of_yellow - r.top_of_red for r in history]
data[categories[2]] = [r.top_of_green - r.top_of_yellow for r in history]
data["net_flow_position"] = [r.net_flow_position for r in history]
data["on_hand_position"] = [r.on_hand_position for r in history]
df = pd.DataFrame(data)
df = df.set_index(["date"])
areas = stacked(df, categories)
x2 = np.hstack((data["date"][::-1], data["date"]))
tops = [
data[categories[0]][i] + data[categories[1]][i] + data[categories[2]][i]
for i in range(N)
] + [max(data["on_hand_position"]), max(data["net_flow_position"])]
top_y = max(tops)
min_y = min(
[0, min(data["on_hand_position"]), min(data["net_flow_position"])]
)
if top_y <= min_y:
top_y = min_y + 100
p = figure(
frame_height=400,
x_range=(dates[0], dates[-1]),
y_range=(min_y, top_y),
x_axis_type="datetime",
)
p.sizing_mode = "stretch_width"
p.toolbar.logo = None
p.grid.minor_grid_line_color = "#eeeeee"
p.patches(
[x2] * len(areas),
[areas[cat] for cat in categories],
color=planning_colors,
alpha=0.8,
line_color=None,
)
date_format = (
self.env["res.lang"]._lang_get(self.env.lang or "en_US").date_format
)
p.xaxis.formatter = DatetimeTickFormatter(
hours=date_format,
days=date_format,
months=date_format,
years=date_format,
)
p.xaxis.major_label_orientation = pi / 4
p.xaxis.axis_label_text_font = "helvetica"
unit = rec.product_uom.name
hover = HoverTool(
tooltips=[("qty", "$y %s" % unit)], point_policy="follow_mouse"
)
p.add_tools(hover)
p.line(dates, data["net_flow_position"], line_width=3)
p.line(dates, data["on_hand_position"], line_width=3, line_dash="dotted")
script, div = components(p, wrap_script=False)
json_data = json.dumps(
{
"div": div,
"script": script,
}
)
rec.planning_history_chart = json_data
def _compute_execution_history_chart(self):
start_stack = 0
def stacked(df, categories):
areas = {}
last = np.zeros(len(df[categories[0]]))
last += start_stack
for cat in categories:
_next = last + df[cat]
areas[cat] = np.hstack((last[::-1], _next))
last = _next
return areas
hex_colors = self._get_colors_hex_map(pallete="execution")
execution_colors = [
hex_colors["0_dark_red"],
hex_colors["1_red"],
hex_colors["2_yellow"],
hex_colors["3_green"],
hex_colors["2_yellow"],
hex_colors["1_red"],
hex_colors["0_dark_red"],
]
history_model = self.env["ddmrp.history"]
for rec in self:
domain = [("buffer_id", "=", rec.id)]
history_oh = history_model.search(
domain, order="on_hand_position desc", limit=1
)
history_tog = history_model.search(
domain + [("top_of_green", "!=", False)],
order="top_of_green desc",
limit=1,
)
finish_stack = max(history_oh.on_hand_position, history_tog.top_of_green)
history = history_model.search(
domain, order="on_hand_position asc", limit=1
)
start_stack = history.on_hand_position
if start_stack >= 0.0:
start_stack = 0.0
history = history_model.search(domain, order="date")
if len(history) < 2:
rec.execution_history_chart = json.dumps(
{
"div": _("Not enough data available."),
"script": "",
}
)
continue
N = len(history)
categories = [
"dark_red_low",
"top_of_red_low",
"top_of_yellow_low",
"top_of_green",
"top_of_yellow",
"top_of_red",
"dark_red",
]
data = {}
dates = [r.date for r in history]
data["date"] = dates
data[categories[0]] = [(0 - start_stack) for r in history]
data[categories[1]] = [(r.top_of_red / 2) for r in history]
data[categories[2]] = [(r.top_of_red / 2) for r in history]
data[categories[3]] = [r.top_of_green - r.top_of_yellow for r in history]
data[categories[4]] = [
(r.top_of_green - r.top_of_red - (r.top_of_green - r.top_of_yellow)) / 2
for r in history
]
data[categories[5]] = [
(r.top_of_green - r.top_of_red - (r.top_of_green - r.top_of_yellow)) / 2
for r in history
]
data[categories[6]] = [
finish_stack
- r.top_of_red
- (r.top_of_green - r.top_of_yellow)
- (r.top_of_green - r.top_of_red - (r.top_of_green - r.top_of_yellow))
for r in history
]
data["on_hand_position"] = [r.on_hand_position for r in history]
df = pd.DataFrame(data)
df = df.set_index(["date"])
areas = stacked(df, categories)
x2 = np.hstack((data["date"][::-1], data["date"]))
tops = [
data[categories[0]][i]
+ data[categories[1]][i]
+ data[categories[2]][i]
+ data[categories[3]][i]
+ data[categories[4]][i]
+ data[categories[5]][i]
+ data[categories[6]][i]
for i in range(N)
]
top_y = max(tops)
p = figure(
frame_height=400,
x_range=(dates[0], dates[-1]),
y_range=(start_stack, top_y or 100),
x_axis_type="datetime",
)
p.sizing_mode = "stretch_width"
p.toolbar.logo = None
p.grid.minor_grid_line_color = "#eeeeee"
p.patches(
[x2] * len(areas),
[areas[cat] for cat in categories],
color=execution_colors,
alpha=0.8,
line_color=None,
)
date_format = (
self.env["res.lang"]._lang_get(self.env.lang or "en_US").date_format
)
p.xaxis.formatter = DatetimeTickFormatter(
hours=date_format,
days=date_format,
months=date_format,
years=date_format,
)
p.xaxis.major_label_orientation = pi / 4
unit = rec.product_uom.name
hover = HoverTool(
tooltips=[("qty", "$y %s" % unit)], point_policy="follow_mouse"
)
p.add_tools(hover)
p.line(dates, data["on_hand_position"], line_width=3, line_dash="dotted")
script, div = components(p, wrap_script=False)
json_data = json.dumps(
{
"div": div,
"script": script,
}
)
rec.execution_history_chart = json_data

View file

@ -0,0 +1,4 @@
* Lois Rilo <lois.rilo@forgeflow.com>
* Jordi Ballester <jordi.ballester@forgeflow.com>
* Akim Juillerat <akim.juillerat@camptocamp.com>
* Christopher Ormaza <chris.ormaza@forgeflow.com>

View file

@ -0,0 +1,3 @@
The initial development of this module has been financially supported by:
* Aleph Objects, Inc.

View file

@ -0,0 +1 @@
Allow to extend DDMRP App to store historical data of buffers.

View file

@ -0,0 +1,15 @@
13.0.1.0.0 (2020-06-16)
~~~~~~~~~~~~~~~~~~~~~~~
* Migration to v13.
11.0.1.0.1 (2019-02-07)
~~~~~~~~~~~~~~~~~~~~~~~
* Make history charts responsive and remove NFP from execution chart.
* Use user's language to format dates in the charts.
11.0.1.0.0 (2018-08-01)
~~~~~~~~~~~~~~~~~~~~~~~
* Start of the history

View file

@ -0,0 +1,3 @@
You need to install the python pandas library::
pip install pandas==0.25.3

View file

@ -0,0 +1,4 @@
You can access, as a inventory manager, to all the DDMRP historical data
throught *Inventory > Reports > DDMRP Buffer History*. Additionally you can
see a historical evolution chart of any buffer at the bottom of its form view,
either by a planning or a execution perspective.

View file

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
ddmrp_history_user,ddmrp.history.user,model_ddmrp_history,ddmrp.group_stock_buffer_maintainer,1,0,0,0
ddmrp_history_manager,ddmrp.history.manager,model_ddmrp_history,ddmrp.group_ddmrp_manager,1,0,0,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 ddmrp_history_user ddmrp.history.user model_ddmrp_history ddmrp.group_stock_buffer_maintainer 1 0 0 0
3 ddmrp_history_manager ddmrp.history.manager model_ddmrp_history ddmrp.group_ddmrp_manager 1 0 0 1

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com)
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<odoo>
<record id="ddmrp_history_multicompany" model="ir.rule">
<field name="name">DDMRP History Multi-Company</field>
<field name="model_id" ref="model_ddmrp_history" />
<field eval="True" name="global" />
<field
name="domain_force"
>['|',('company_id', 'in', company_ids),('company_id','=',False)]</field>
</record>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -0,0 +1,477 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>DDMRP History</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="ddmrp-history">
<h1 class="title">DDMRP History</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d037b8db306d50283d8a06fa845eaf84e37523c62ea94cc5ccd570c64158fe52
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/ddmrp/tree/16.0/ddmrp_history"><img alt="OCA/ddmrp" src="https://img.shields.io/badge/github-OCA%2Fddmrp-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_history"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/ddmrp&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Allow to extend DDMRP App to store historical data of buffers.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#changelog" id="toc-entry-3">Changelog</a><ul>
<li><a class="reference internal" href="#section-1" id="toc-entry-4">13.0.1.0.0 (2020-06-16)</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-5">11.0.1.0.1 (2019-02-07)</a></li>
<li><a class="reference internal" href="#section-3" id="toc-entry-6">11.0.1.0.0 (2018-08-01)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-11">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-12">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
<p>You need to install the python pandas library:</p>
<pre class="literal-block">
pip install pandas==0.25.3
</pre>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>You can access, as a inventory manager, to all the DDMRP historical data
throught <em>Inventory &gt; Reports &gt; DDMRP Buffer History</em>. Additionally you can
see a historical evolution chart of any buffer at the bottom of its form view,
either by a planning or a execution perspective.</p>
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#toc-entry-3">Changelog</a></h1>
<div class="section" id="section-1">
<h2><a class="toc-backref" href="#toc-entry-4">13.0.1.0.0 (2020-06-16)</a></h2>
<ul class="simple">
<li>Migration to v13.</li>
</ul>
</div>
<div class="section" id="section-2">
<h2><a class="toc-backref" href="#toc-entry-5">11.0.1.0.1 (2019-02-07)</a></h2>
<ul class="simple">
<li>Make history charts responsive and remove NFP from execution chart.</li>
<li>Use users language to format dates in the charts.</li>
</ul>
</div>
<div class="section" id="section-3">
<h2><a class="toc-backref" href="#toc-entry-6">11.0.1.0.0 (2018-08-01)</a></h2>
<ul class="simple">
<li>Start of the history</li>
</ul>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/ddmrp/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/ddmrp/issues/new?body=module:%20ddmrp_history%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
<ul class="simple">
<li>ForgeFlow</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
<ul class="simple">
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
<li>Jordi Ballester &lt;<a class="reference external" href="mailto:jordi.ballester&#64;forgeflow.com">jordi.ballester&#64;forgeflow.com</a>&gt;</li>
<li>Akim Juillerat &lt;<a class="reference external" href="mailto:akim.juillerat&#64;camptocamp.com">akim.juillerat&#64;camptocamp.com</a>&gt;</li>
<li>Christopher Ormaza &lt;<a class="reference external" href="mailto:chris.ormaza&#64;forgeflow.com">chris.ormaza&#64;forgeflow.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#toc-entry-11">Other credits</a></h2>
<p>The initial development of this module has been financially supported by:</p>
<ul class="simple">
<li>Aleph Objects, Inc.</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/JordiBForgeFlow"><img alt="JordiBForgeFlow" src="https://github.com/JordiBForgeFlow.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/LoisRForgeFlow"><img alt="LoisRForgeFlow" src="https://github.com/LoisRForgeFlow.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/ddmrp/tree/16.0/ddmrp_history">OCA/ddmrp</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1 @@
from . import test_ddmrp_history

View file

@ -0,0 +1,35 @@
# Copyright 2018 Camptocamp SA
# Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from datetime import datetime, timedelta
from odoo import fields
from odoo.tests import TransactionCase
class TestDDMRPHistory(TransactionCase):
def setUp(self):
super().setUp()
self.buffer = self.env.ref("ddmrp.stock_buffer_fp01")
def test_history(self):
self.buffer.write(
{"adu_fixed": 10, "order_cycle": 5, "order_spike_horizon": 10}
)
self.buffer.cron_actions()
history_today = self.env["ddmrp.history"].search(
[("buffer_id", "=", self.buffer.id)], order="date desc", limit=1
)
self.assertAlmostEqual(
fields.Datetime.from_string(history_today.date),
datetime.today(),
delta=timedelta(seconds=1),
)
self.assertEqual(history_today.top_of_red, self.buffer.top_of_red)
self.assertEqual(history_today.top_of_yellow, self.buffer.top_of_yellow)
self.assertEqual(history_today.top_of_green, self.buffer.top_of_green)
# Check that chart computation do not raise an error:
self.buffer.cron_actions()
self.assertTrue(self.buffer.planning_history_chart)
self.assertTrue(self.buffer.execution_history_chart)

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017 ForgeFlow S.L. (https://www.forgeflow.com)
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<odoo>
<record id="view_ddmrp_history_tree" model="ir.ui.view">
<field name="name">ddmrp.history.tree</field>
<field name="model">ddmrp.history</field>
<field name="arch" type="xml">
<tree create="0">
<field name="buffer_id" />
<field name="adu" />
<field name="top_of_green" />
<field name="top_of_yellow" />
<field name="top_of_red" />
<field name="net_flow_position" />
<field name="on_hand_position" />
<field name="date" />
<field
name="company_id"
groups="base.group_multi_company"
optional="hide"
/>
</tree>
</field>
</record>
<record id="view_ddmrp_history_search" model="ir.ui.view">
<field name="name">ddmrp.history.search</field>
<field name="model">ddmrp.history</field>
<field name="arch" type="xml">
<search>
<field name="buffer_id" />
</search>
</field>
</record>
<record id="action_ddmrp_history" model="ir.actions.act_window">
<field name="name">DDMRP Buffer History</field>
<field name="res_model">ddmrp.history</field>
<field name="view_mode">tree,pivot,graph</field>
</record>
<menuitem
name="DDMRP Buffer History"
parent="stock.menu_warehouse_report"
action="action_ddmrp_history"
id="menu_ddmrp_history"
/>
</odoo>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017-19 ForgeFlow S.L. (https://www.forgeflow.com)
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<odoo>
<record id="stock_buffer_view_form" model="ir.ui.view">
<field name="name">stock.buffer.form - ddmrp_history</field>
<field name="model">stock.buffer</field>
<field name="inherit_id" ref="ddmrp.stock_buffer_view_form" />
<field name="arch" type="xml">
<notebook position="inside">
<page name="planning_history" string="Planning Chart">
<div style="margin-top: 1em;">
<field
name="planning_history_chart"
style="width:100%"
widget="bokeh_chart"
nolabel="1"
/>
</div>
</page>
<page name="execution_history" string="Execution Chart">
<div style="margin-top: 1em;">
<field
name="execution_history_chart"
style="width:100%"
widget="bokeh_chart"
nolabel="1"
/>
</div>
</page>
</notebook>
</field>
</record>
</odoo>

View file

@ -0,0 +1,32 @@
# Architecture
```mermaid
flowchart TD
U[Users] -->|HTTP| V[Views and QWeb Templates]
V --> C[Controllers]
V --> W[Wizards Transient Models]
C --> M[Models and ORM]
W --> M
M --> R[Reports]
DX[Data XML] --> M
S[Security ACLs and Groups] -. enforces .-> M
subgraph Ddmrp_history Module - ddmrp_history
direction LR
M:::layer
W:::layer
C:::layer
V:::layer
R:::layer
S:::layer
DX:::layer
end
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
```
Notes
- Views include tree/form/kanban templates and report templates.
- Controllers provide website/portal routes when present.
- Wizards are UI flows implemented with `models.TransientModel`.
- Data XML loads data/demo records; Security defines groups and access.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for ddmrp_history. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,3 @@
# Controllers
This module does not define custom HTTP controllers.

View file

@ -0,0 +1,5 @@
# Dependencies
This addon depends on:
- [ddmrp](../../odoo-bringout-oca-ddmrp-ddmrp)

View file

@ -0,0 +1,4 @@
# FAQ
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
- Q: How to enable? A: Start server with --addon ddmrp_history or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-ddmrp-ddmrp_history"
# or
uv pip install odoo-bringout-oca-ddmrp-ddmrp_history"
```

View file

@ -0,0 +1,13 @@
# Models
Detected core models and extensions in ddmrp_history.
```mermaid
classDiagram
class ddmrp_history
class stock_buffer
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: ddmrp_history. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon ddmrp_history
- License: LGPL-3

View file

@ -0,0 +1,3 @@
# Reports
This module does not define custom reports.

View file

@ -0,0 +1,41 @@
# Security
Access control and security definitions in ddmrp_history.
## Access Control Lists (ACLs)
Model access permissions defined in:
- **[ir.model.access.csv](../ddmrp_history/security/ir.model.access.csv)**
- 2 model access rules
## Record Rules
Row-level security rules defined in:
## Security Groups & Configuration
Security groups and permissions defined in:
- **[security.xml](../ddmrp_history/security/security.xml)**
```mermaid
graph TB
subgraph "Security Layers"
A[Users] --> B[Groups]
B --> C[Access Control Lists]
C --> D[Models]
B --> E[Record Rules]
E --> F[Individual Records]
end
```
Security files overview:
- **[ir.model.access.csv](../ddmrp_history/security/ir.model.access.csv)**
- Model access permissions (CRUD rights)
- **[security.xml](../ddmrp_history/security/security.xml)**
- Security groups, categories, and XML-based rules
Notes
- Access Control Lists define which groups can access which models
- Record Rules provide row-level security (filter records by user/group)
- Security groups organize users and define permission sets
- All security is enforced at the ORM level by Odoo

View file

@ -0,0 +1,5 @@
# Troubleshooting
- Ensure Python and Odoo environment matches repo guidance.
- Check database connectivity and logs if startup fails.
- Validate that dependent addons listed in DEPENDENCIES.md are installed.

View file

@ -0,0 +1,7 @@
# Usage
Start Odoo including this addon (from repo root):
```bash
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon ddmrp_history
```

View file

@ -0,0 +1,3 @@
# Wizards
This module does not include UI wizards.

View file

@ -0,0 +1,42 @@
[project]
name = "odoo-bringout-oca-ddmrp-ddmrp_history"
version = "16.0.0"
description = "DDMRP History - Allow to store historical data of DDMRP buffers."
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ddmrp-ddmrp>=16.0.0",
"requests>=2.25.1"
]
readme = "README.md"
requires-python = ">= 3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]
[project.urls]
homepage = "https://github.com/bringout/0"
repository = "https://github.com/bringout/0"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["ddmrp_history"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.4.1",
]