Skip to content

datastructsro/mimir

Repository files navigation

Mimir ๐Ÿ“ˆ

Odoo Version Python License

Mimir is a production-grade linear regression demand forecaster designed for the Parqcast ecosystem. It bridges the gap between historical data exports and automated, just-in-time inventory replenishment in Odoo.

๐Ÿš€ Overview

Mimir reads Parquet exports generated by the Parqcast Odoo addon, runs a demand forecasting pipeline, and computes min/max replenishment rules. These optimized rules are then pushed back to Odoo stock.warehouse.orderpoint records to automate inventory management.

Currently supported Odoo versions: 18, 19

โœจ Features

  • Automated Demand Forecasting: Uses linear regression to project future demand based on historical data.
  • Replenishment Rules Generation: Automatically computes minimum and maximum stock rules.
  • Seamless Odoo Integration: Optionally pushes computed rules directly to stock.warehouse.orderpoint records via XML-RPC.
  • Multilingual Support: Ships with UI translations for 19 languages out of the box.
  • CLI Interface: Provides a lightweight CLI for headless execution and scripting.

๐Ÿ› ๏ธ Setup & Installation

Prerequisites: Python 3.12.3 (Required for Odoo.sh compatibility).

The project uses uv for dependency management.

# Install workspace + development dependencies
uv sync

# Run the test suite
uv run pytest tests/ -x -q

# Lint the codebase
uv run ruff check .

๐Ÿ“– Usage

Odoo Addon

The addon (located in the odoo_addon/ directory) integrates directly into Odoo:

  1. It reads ir.attachment exports generated by Parqcast.
  2. It runs the forecasting pipeline.
  3. It stores the forecast results and rules as attachments on a mimir.run record.
  4. Optionally, it pushes these rules directly to stock.warehouse.orderpoint via XML-RPC.

Command Line Interface (CLI)

For standalone execution or pipeline integration, use the CLI:

uv run mimir /path/to/parqcast/exports /path/to/output --verbose

๐Ÿงช Testing & Development

Test Data Generation

A deterministic set of sample Parquet inputs can be generated for testing. The generated files are stored under test_data/ (which is git-ignored).

uv run python scripts/generate_test_data.py

Locales

The addon includes UI translations for 19 languages. All msgstr entries are fully populated (see odoo_addon/i18n/). Translation PRs are always welcome!

ุงู„ุนุฑุจูŠุฉ (ar) Čeština (cs) Dansk (da)
Deutsch (de) Ελληνικฮฌ (el) Español (es)
Eesti (et) Suomi (fi) Hrvatski (hr)
Magyar (hu) Kurdî (ku) Norsk Bokmål (nb)
Nederlands (nl) Polski (pl) Português (pt)
Română (ro) Slovenčina (sk) Slovenščina (sl)
Svenska (sv)

๐Ÿข About DataStruct

Built and maintained by DataStruct s.r.o. — an Odoo Official Partner based in the Czech Republic. We specialize in demand forecasting and ERP implementations for manufacturing, retail, and logistics in the Czech–German–Polish region.

Companion Projects:

๐Ÿ“„ License

This project is licensed under the LGPL-3.0-or-later license.

About

Linear-regression demand forecaster for Odoo. Reads parqcast Parquet exports, computes min/max replenishment rules, writes them back to stock.warehouse.orderpoint.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors