Initial commit: OCA Mrp packages (117 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:05 +02:00
commit 277e84fd7a
4403 changed files with 395154 additions and 0 deletions

View file

@ -0,0 +1,45 @@
# MRP BoM Current Stock
Odoo addon: mrp_bom_current_stock
## Installation
```bash
pip install odoo-bringout-oca-manufacture-reporting-mrp_bom_current_stock
```
## Dependencies
This addon depends on:
- mrp_bom_location
- report_xlsx
## Manifest Information
- **Name**: MRP BoM Current Stock
- **Version**: 16.0.1.0.0
- **Category**: Manufacture
- **License**: AGPL-3
- **Installable**: False
## Source
Based on [OCA/manufacture-reporting](https://github.com/OCA/manufacture-reporting) branch 16.0, addon `mrp_bom_current_stock`.
## License
This package maintains the original AGPL-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,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 Mrp_bom_current_stock Module - mrp_bom_current_stock
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 mrp_bom_current_stock. 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,6 @@
# Dependencies
This addon depends on:
- [mrp_bom_location](../../odoo-bringout-oca-manufacture-mrp_bom_location)
- [report_xlsx](../../odoo-bringout-oca-reporting-engine-report_xlsx)

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 mrp_bom_current_stock or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-manufacture-reporting-mrp_bom_current_stock"
# or
uv pip install odoo-bringout-oca-manufacture-reporting-mrp_bom_current_stock"
```

View file

@ -0,0 +1,11 @@
# Models
Detected core models and extensions in mrp_bom_current_stock.
```mermaid
classDiagram
```
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: mrp_bom_current_stock. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon mrp_bom_current_stock
- License: LGPL-3

View file

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

View file

@ -0,0 +1,34 @@
# Security
Access control and security definitions in mrp_bom_current_stock.
## Access Control Lists (ACLs)
Model access permissions defined in:
- **[ir.model.access.csv](../mrp_bom_current_stock/security/ir.model.access.csv)**
- 2 model access rules
## Record Rules
Row-level security rules defined in:
```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](../mrp_bom_current_stock/security/ir.model.access.csv)**
- Model access permissions (CRUD rights)
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 mrp_bom_current_stock
```

View file

@ -0,0 +1,9 @@
# Wizards
Transient models exposed as UI wizards in mrp_bom_current_stock.
```mermaid
classDiagram
class BomRouteCurrentStock
class BomRouteCurrentStockLine
```

View file

@ -0,0 +1,90 @@
=====================
MRP BoM Current Stock
=====================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:05f2c1c89b96b6711c7369e749367178e89aa4f52a7e6f53a9ce8b19dd9e69a6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fmanufacture--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/manufacture-reporting/tree/16.0/mrp_bom_current_stock
:alt: OCA/manufacture-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/manufacture-reporting-16-0/manufacture-reporting-16-0-mrp_bom_current_stock
: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/manufacture-reporting&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This modules extend the Manufacturing App adding a report that explodes the
bill of materials and show the stock available in the source location.
**Table of contents**
.. contents::
:local:
Usage
=====
To use this module, you need to:
#. Go to *Manufacturing > Reporting > BoM Current Stock Explosion*.
#. Select Product, BoM and location and click on *Explode*.
#. Set the proper location (if desired) for all the components displayed if you
haven't done so in the related BoMs.
#. Click *Print Report*.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture-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/manufacture-reporting/issues/new?body=module:%20mrp_bom_current_stock%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>
* Héctor Villarreal <hector.villarreal@forgeflow.com>
* Dhara Solanki <dhara.solanki@initos.com>
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/manufacture-reporting <https://github.com/OCA/manufacture-reporting/tree/16.0/mrp_bom_current_stock>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View file

@ -0,0 +1,6 @@
# Copyright 2018 Camptocamp SA
# Copyright 2017 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import wizard
from . import reports

View file

@ -0,0 +1,20 @@
# Copyright 2018 Camptocamp SA
# Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "MRP BoM Current Stock",
"summary": "Add a report that explodes the bill of materials and show the "
"stock available in the source location.",
"version": "16.0.1.0.0",
"category": "Manufacture",
"website": "https://github.com/OCA/manufacture-reporting",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["mrp_bom_location", "report_xlsx"],
"data": [
"security/ir.model.access.csv",
"reports/report_mrpcurrentstock.xml",
"wizard/bom_route_current_stock_view.xml",
],
}

View file

@ -0,0 +1,304 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_current_stock
#
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: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "BOM Current Stock Report"
msgstr "Izvještaj trenutnih zaliha sastavnice"
#. module: mrp_bom_current_stock
#: model:ir.actions.act_window,name:mrp_bom_current_stock.mrp_bom_current_stock_action
#: model:ir.ui.menu,name:mrp_bom_current_stock.mrp_bom_current_stock_menu
msgid "BoM Current Stock Explosion"
msgstr "Razlaganje trenutnih zaliha sastavnice"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_level
msgid "BoM Level"
msgstr "Nivo sastavnice"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "BoM Reference"
msgstr "Referenca sastavnice"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_line
msgid "BoM line"
msgstr "Linija sastavnice"
#. module: mrp_bom_current_stock
#: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_pdf
msgid "BoM: Current Stock Report PDF"
msgstr "Sastavnica: Izvještaj trenutnih zaliha PDF"
#. module: mrp_bom_current_stock
#: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_xlsx
msgid "BoM: Current Stock Report XLSX"
msgstr "Sastavnica: Izvještaj trenutnih zaliha XLSX"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Cancel"
msgstr "Inventarsko vrednovanje nekih proizvoda %s je automatizovano. Možete ažurirati njihov trošak samo iz forme proizvoda."
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Close"
msgstr "Zatvori"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_uid
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_uid
msgid "Created by"
msgstr "Kreirao"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_date
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_date
msgid "Created on"
msgstr "Kreirano"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__display_name
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__display_name
msgid "Display Name"
msgstr "Prikazani naziv"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Explode"
msgstr "Razloži"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__explosion_id
msgid "Explosion"
msgstr "Razlaganje"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Explosion result"
msgstr "Rezultat razlaganja"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Export XLSX"
msgstr "Izvoz XLSX"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__id
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__id
msgid "ID"
msgstr "ID"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock____last_update
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line____last_update
msgid "Last Modified on"
msgstr "Zadnje mijenjano"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_uid
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_uid
msgid "Last Updated by"
msgstr "Zadnji ažurirao"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_date
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_date
msgid "Last Updated on"
msgstr "Zadnje ažurirano"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Level"
msgstr "Nivo"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__line_ids
msgid "Line"
msgstr "Linija"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Location"
msgstr "Lokacija"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
msgid "Location:"
msgstr "Lokacija:"
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_report_mrp_bom_current_stock_report_mrpbom_current_stock_xlsx
msgid "MRP BOM Current Stock XLSX Report"
msgstr "MRP sastavnica trenutne zalihe XLSX izvještaj"
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock
msgid "MRP Bom Route Current Stock"
msgstr "MRP ruta sastavnice trenutne zalihe"
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock_line
msgid "MRP Bom Route Current Stock Line"
msgstr "MRP linija rute sastavnice trenutne zalihe"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_id
msgid "Parent BoM"
msgstr "Nadređena sastavnica"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Parent BoM Ref"
msgstr "Ref. nadređene sastavnice"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Parent Product Ref"
msgstr "Ref. nadređenog proizvoda"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Print PDF"
msgstr "Isprintaj PDF"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
msgid "Product"
msgstr "Artikal"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_qty
msgid "Product Quantity"
msgstr "Količina proizvoda"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Product Reference"
msgstr "Referenca proizvoda"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_tmpl_id
msgid "Product Template"
msgstr "Predložak artikla"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_uom_id
msgid "Product Unit of Measure"
msgstr "JMJ artikla"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_id
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_id
msgid "Product Variant"
msgstr "Varijanta proizvoda"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Qty Available (Location)"
msgstr "Dostupna količina (Lokacija)"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__qty_available_in_source_loc
msgid "Qty Available in Source"
msgstr "Dostupna količina u izvoru"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Quantity"
msgstr "Količina"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Select product and location to explode"
msgstr "Izaberite proizvod i lokaciju za razlaganje"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Set the source location for every component."
msgstr "Postavite izvornu lokaciju za svaku komponentu."
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__location_id
msgid "Source location"
msgstr "Izvorna lokacija"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__bom_id
msgid "Starting Bill of Materials"
msgstr "Početna sastavnica"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__location_id
msgid "Starting location"
msgstr "Početna lokacija"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty
msgid ""
"This should be the smallest quantity that this product can be produced in. "
"If the BOM contains operations, make sure the work center capacity is "
"accurate."
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id
msgid "Unit of Measure"
msgstr "Jedinica mjere"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id
msgid ""
"Unit of Measure (Unit of Measure) is the unit of measurement for the "
"inventory control"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "UoM"
msgstr "JMJ"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "or"
msgstr "ili"

View file

@ -0,0 +1,311 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_current_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-30 07:11+0000\n"
"PO-Revision-Date: 2023-05-30 07:11+0000\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: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "BOM Current Stock Report"
msgstr "Resoconto giacenza attuale DiBa"
#. module: mrp_bom_current_stock
#: model:ir.actions.act_window,name:mrp_bom_current_stock.mrp_bom_current_stock_action
#: model:ir.ui.menu,name:mrp_bom_current_stock.mrp_bom_current_stock_menu
msgid "BoM Current Stock Explosion"
msgstr "Esploso giacenza attuale DiBa"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_level
msgid "BoM Level"
msgstr "Livello DiBa"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "BoM Reference"
msgstr "Riferimento DiBa"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_line
msgid "BoM line"
msgstr "Riga DiBa"
#. module: mrp_bom_current_stock
#: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_pdf
msgid "BoM: Current Stock Report PDF"
msgstr "DiBa: resoconto PDF giacenza attuale"
#. module: mrp_bom_current_stock
#: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_xlsx
msgid "BoM: Current Stock Report XLSX"
msgstr "DiBa: resoconto XLSX giacenza attuale"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Cancel"
msgstr "Annulla"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Close"
msgstr "Chiudi"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_uid
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_uid
msgid "Created by"
msgstr "Creato da"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_date
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_date
msgid "Created on"
msgstr "Creato il"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__display_name
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__display_name
msgid "Display Name"
msgstr "Nome visualizzato"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Explode"
msgstr "Espandi"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__explosion_id
msgid "Explosion"
msgstr "Esploso"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Explosion result"
msgstr "Risultato espolso"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Export XLSX"
msgstr "Esporta XLSX"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__id
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__id
msgid "ID"
msgstr "ID"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock____last_update
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_uid
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_date
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Level"
msgstr "Livello"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__line_ids
msgid "Line"
msgstr "Riga"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Location"
msgstr "Ubicazione"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
msgid "Location:"
msgstr "Ubicazione:"
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_report_mrp_bom_current_stock_report_mrpbom_current_stock_xlsx
msgid "MRP BOM Current Stock XLSX Report"
msgstr "Resoconto XLSX giacenza attuale DiBa MRP"
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock
msgid "MRP Bom Route Current Stock"
msgstr "Giacenza attuale rotta DiBa MRP"
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock_line
msgid "MRP Bom Route Current Stock Line"
msgstr "Riga giacenza attuale rotta DiBa MRP"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_id
msgid "Parent BoM"
msgstr "DiBa padre"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Parent BoM Ref"
msgstr "Riferimento DiBa padre"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Parent Product Ref"
msgstr "Riferimento prodotto padre"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Print PDF"
msgstr "Stampa PDF"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
msgid "Product"
msgstr "Prodotto"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_qty
msgid "Product Quantity"
msgstr "Quantità prodotto"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Product Reference"
msgstr "Riferimento prodotto"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_tmpl_id
msgid "Product Template"
msgstr "Modello prodotto"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_uom_id
msgid "Product Unit of Measure"
msgstr "Unità di misura del prodotto"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_id
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_id
msgid "Product Variant"
msgstr "Variante prodotto"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Qty Available (Location)"
msgstr "Qta. disponibile (ubicazione)"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__qty_available_in_source_loc
msgid "Qty Available in Source"
msgstr "Qta. disponibile in sorgente"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Quantity"
msgstr "Quantità"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Select product and location to explode"
msgstr "Selezionare il prodotto e l'ubicazione da esplodere"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Set the source location for every component."
msgstr "Impostare l'ubicazione di origine per ogni componente."
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__location_id
msgid "Source location"
msgstr "Ubicazione di origine"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__bom_id
msgid "Starting Bill of Materials"
msgstr "Distinta base di partenza"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__location_id
msgid "Starting location"
msgstr "Ubicazione di partenza"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty
msgid ""
"This should be the smallest quantity that this product can be produced in. "
"If the BOM contains operations, make sure the work center capacity is "
"accurate."
msgstr ""
"Questa dovrebbe essere la quantità minima di produzione del prodotto. Se la "
"DiBa contiene operazioni, assicurarsi che la capacità del centro di lavoro "
"sia precisa."
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id
msgid "Unit of Measure"
msgstr "Unità di misura"
#. module: mrp_bom_current_stock
#: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id
msgid ""
"Unit of Measure (Unit of Measure) is the unit of measurement for the "
"inventory control"
msgstr ""
"Unità di misura (Unità di misura) è l'unità di misura per il controllo di "
"inventario"
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "UoM"
msgstr "UdM"
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "or"
msgstr "o"

View file

@ -0,0 +1,304 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_current_stock
#
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: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "BOM Current Stock Report"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.actions.act_window,name:mrp_bom_current_stock.mrp_bom_current_stock_action
#: model:ir.ui.menu,name:mrp_bom_current_stock.mrp_bom_current_stock_menu
msgid "BoM Current Stock Explosion"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_level
msgid "BoM Level"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "BoM Reference"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_line
msgid "BoM line"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_pdf
msgid "BoM: Current Stock Report PDF"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_xlsx
msgid "BoM: Current Stock Report XLSX"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Cancel"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Close"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_uid
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_uid
msgid "Created by"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_date
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_date
msgid "Created on"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__display_name
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__display_name
msgid "Display Name"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Explode"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__explosion_id
msgid "Explosion"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Explosion result"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Export XLSX"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__id
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__id
msgid "ID"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock____last_update
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line____last_update
msgid "Last Modified on"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_uid
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_uid
msgid "Last Updated by"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_date
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_date
msgid "Last Updated on"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Level"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__line_ids
msgid "Line"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Location"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
msgid "Location:"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_report_mrp_bom_current_stock_report_mrpbom_current_stock_xlsx
msgid "MRP BOM Current Stock XLSX Report"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock
msgid "MRP Bom Route Current Stock"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock_line
msgid "MRP Bom Route Current Stock Line"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_id
msgid "Parent BoM"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Parent BoM Ref"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Parent Product Ref"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Print PDF"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
msgid "Product"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_qty
msgid "Product Quantity"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "Product Reference"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_tmpl_id
msgid "Product Template"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_uom_id
msgid "Product Unit of Measure"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_id
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_id
msgid "Product Variant"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Qty Available (Location)"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__qty_available_in_source_loc
msgid "Qty Available in Source"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf
#, python-format
msgid "Quantity"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form
msgid "Select product and location to explode"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "Set the source location for every component."
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__location_id
msgid "Source location"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__bom_id
msgid "Starting Bill of Materials"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__location_id
msgid "Starting location"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty
msgid ""
"This should be the smallest quantity that this product can be produced in. "
"If the BOM contains operations, make sure the work center capacity is "
"accurate."
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id
msgid "Unit of Measure"
msgstr ""
#. module: mrp_bom_current_stock
#: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id
msgid ""
"Unit of Measure (Unit of Measure) is the unit of measurement for the "
"inventory control"
msgstr ""
#. module: mrp_bom_current_stock
#. odoo-python
#: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0
#, python-format
msgid "UoM"
msgstr ""
#. module: mrp_bom_current_stock
#: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2
msgid "or"
msgstr ""

View file

@ -0,0 +1,3 @@
* Lois Rilo <lois.rilo@forgeflow.com>
* Héctor Villarreal <hector.villarreal@forgeflow.com>
* Dhara Solanki <dhara.solanki@initos.com>

View file

@ -0,0 +1,2 @@
This modules extend the Manufacturing App adding a report that explodes the
bill of materials and show the stock available in the source location.

View file

@ -0,0 +1,7 @@
To use this module, you need to:
#. Go to *Manufacturing > Reporting > BoM Current Stock Explosion*.
#. Select Product, BoM and location and click on *Explode*.
#. Set the proper location (if desired) for all the components displayed if you
haven't done so in the related BoMs.
#. Click *Print Report*.

View file

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

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_mrpbom_current_stock_pdf">
<t t-call="web.html_container">
<t t-call="web.internal_layout">
<div class="page">
<h2>BOM Current Stock Report</h2>
<t t-foreach="docs" t-as="o">
<table class="table table-condensed">
<thead>
<tr>
<th>Location:</th>
<td>
<span t-field="o.location_id.display_name" />
</td>
</tr>
<tr>
<th>Level</th>
<th>Product</th>
<th>Quantity</th>
<th>Location</th>
<th>Qty Available (Location)</th>
</tr>
</thead>
<tbody>
<tr style="font-weight: bold;">
<td>0</td>
<td>
<span t-field="o.product_id.display_name" />
</td>
<td>
<span t-field="o.product_qty" />
<span
groups="uom.group_uom"
t-field="o.product_uom_id.name"
/>
</td>
<td>
<span />
</td>
</tr>
<tr t-foreach="o.line_ids" t-as="l">
<td>
<span t-field="l.bom_level" />
</td>
<td>
<span
style="color: white;"
t-esc="'... '*(l.bom_level)"
/>
<span t-esc="l.product_id.display_name" />
</td>
<td>
<span t-esc="l.product_qty" />
<span
t-esc="l.product_uom_id.name"
groups="uom.group_uom"
/>
</td>
<td>
<span t-field="l.location_id.display_name" />
</td>
<td>
<span t-field="l.qty_available_in_source_loc" />
<span
t-esc="l.product_uom_id.name"
groups="uom.group_uom"
/>
</td>
</tr>
</tbody>
</table>
</t>
</div>
</t>
</t>
</template>
<record id="action_report_bom_current_stock_pdf" model="ir.actions.report">
<field name="name">BoM: Current Stock Report PDF</field>
<field name="model">mrp.bom.current.stock</field>
<field name="report_type">qweb-pdf</field>
<field
name="report_name"
>mrp_bom_current_stock.report_mrpbom_current_stock_pdf</field>
<field
name="report_file"
>mrp_bom_current_stock.report_mrpbom_current_stock_pdf</field>
<field name="binding_type">report</field>
</record>
<record id="action_report_bom_current_stock_xlsx" model="ir.actions.report">
<field name="name">BoM: Current Stock Report XLSX</field>
<field name="model">mrp.bom.current.stock</field>
<field name="report_type">xlsx</field>
<field
name="report_name"
>mrp_bom_current_stock.report_mrpbom_current_stock_xlsx</field>
<field name="report_file">mrp_bom</field>
<field name="binding_type">report</field>
<field name="attachment_use">False</field>
</record>
</odoo>

View file

@ -0,0 +1,78 @@
# Copyright 2018-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from odoo import models
from odoo.tools.translate import _
_logger = logging.getLogger(__name__)
class ReportMrpBomCurrentStockXlsx(models.AbstractModel):
_name = "report.mrp_bom_current_stock.report_mrpbom_current_stock_xlsx"
_inherit = "report.report_xlsx.abstract"
_description = "MRP BOM Current Stock XLSX Report"
@staticmethod
def _print_bom_children(ch, sheet, row):
i = row
sheet.write(i, 0, ch.bom_level or "")
sheet.write(i, 1, ch.bom_line.bom_id.code or "")
sheet.write(i, 2, ch.product_id.product_tmpl_id.display_name or "")
sheet.write(i, 3, ch.product_qty or "")
sheet.write(i, 4, ch.qty_available_in_source_loc or 0.0)
sheet.write(i, 5, ch.product_uom_id.name or "")
sheet.write(i, 6, ch.location_id.name or "")
sheet.write(i, 7, ch.bom_id.code or "")
sheet.write(i, 8, ch.bom_id.product_tmpl_id.display_name or "")
i += 1
return i
def generate_xlsx_report(self, workbook, data, objects):
workbook.set_properties(
{"comments": "Created with Python and XlsxWriter from Odoo 11.0"}
)
sheet = workbook.add_worksheet(_("BOM Current Stock Report"))
sheet.set_landscape()
sheet.fit_to_pages(1, 0)
sheet.set_zoom(80)
sheet.set_column(0, 0, 5)
sheet.set_column(1, 2, 40)
sheet.set_column(3, 3, 10)
sheet.set_column(4, 4, 20)
sheet.set_column(5, 5, 7)
sheet.set_column(6, 6, 20)
sheet.set_column(7, 8, 40)
title_style = workbook.add_format(
{"bold": True, "bg_color": "#FFFFCC", "bottom": 1}
)
sheet_title = [
_("Level"),
_("BoM Reference"),
_("Product Reference"),
_("Quantity"),
_("Qty Available (Location)"),
_("UoM"),
_("Location"),
_("Parent BoM Ref"),
_("Parent Product Ref"),
]
sheet.set_row(0, None, None, {"collapsed": 1})
sheet.write_row(1, 0, sheet_title, title_style)
sheet.freeze_panes(2, 0)
bold = workbook.add_format({"bold": True})
i = 2
for o in objects:
sheet.write(i, 0, "0", bold)
sheet.write(i, 1, o.bom_id.code or "", bold)
sheet.write(i, 2, o.product_tmpl_id.name or "", bold)
sheet.write(i, 3, o.product_qty or "", bold)
sheet.write(i, 5, o.product_uom_id.name or "", bold)
sheet.write(i, 6, o.location_id.name or "", bold)
i += 1
for ch in o.line_ids:
i = self._print_bom_children(ch, sheet, i)

View file

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_mrp_bom_current_stock,access_mrp_bom_current_stock,model_mrp_bom_current_stock,base.group_user,1,1,1,0
access_mrp_bom_current_stock_line,access_mrp_bom_current_stock_line,model_mrp_bom_current_stock_line,base.group_user,1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_mrp_bom_current_stock access_mrp_bom_current_stock model_mrp_bom_current_stock base.group_user 1 1 1 0
3 access_mrp_bom_current_stock_line access_mrp_bom_current_stock_line model_mrp_bom_current_stock_line base.group_user 1 1 1 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1,435 @@
<!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>MRP BoM Current Stock</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="mrp-bom-current-stock">
<h1 class="title">MRP BoM Current Stock</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:05f2c1c89b96b6711c7369e749367178e89aa4f52a7e6f53a9ce8b19dd9e69a6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/manufacture-reporting/tree/16.0/mrp_bom_current_stock"><img alt="OCA/manufacture-reporting" src="https://img.shields.io/badge/github-OCA%2Fmanufacture--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/manufacture-reporting-16-0/manufacture-reporting-16-0-mrp_bom_current_stock"><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/manufacture-reporting&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>This modules extend the Manufacturing App adding a report that explodes the
bill of materials and show the stock available in the source location.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<p>To use this module, you need to:</p>
<ol class="arabic simple">
<li>Go to <em>Manufacturing &gt; Reporting &gt; BoM Current Stock Explosion</em>.</li>
<li>Select Product, BoM and location and click on <em>Explode</em>.</li>
<li>Set the proper location (if desired) for all the components displayed if you
havent done so in the related BoMs.</li>
<li>Click <em>Print Report</em>.</li>
</ol>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture-reporting/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/manufacture-reporting/issues/new?body=module:%20mrp_bom_current_stock%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-3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<ul class="simple">
<li>ForgeFlow</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">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>Héctor Villarreal &lt;<a class="reference external" href="mailto:hector.villarreal&#64;forgeflow.com">hector.villarreal&#64;forgeflow.com</a>&gt;</li>
<li>Dhara Solanki &lt;<a class="reference external" href="mailto:dhara.solanki&#64;initos.com">dhara.solanki&#64;initos.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">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>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture-reporting/tree/16.0/mrp_bom_current_stock">OCA/manufacture-reporting</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_mrp_bom_current_stock

View file

@ -0,0 +1,193 @@
# Copyright 2018-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import odoo.tests.common as common
class TestMRPBomCurrentStock(common.TransactionCase):
@classmethod
def setUpClass(cls):
super(TestMRPBomCurrentStock, cls).setUpClass()
cls.product_obj = cls.env["product.product"]
cls.bom_obj = cls.env["mrp.bom"]
cls.bom_line_obj = cls.env["mrp.bom.line"]
cls.uom_unit = cls.env.ref("uom.product_uom_unit")
cls.uom_dozen = cls.env.ref("uom.product_uom_dozen")
cls.uom_meter = cls.env.ref("uom.product_uom_meter")
cls.uom_kgm = cls.env.ref("uom.product_uom_kgm")
cls.uom_gm = cls.env.ref("uom.product_uom_gram")
cls.stock_loc = cls.env.ref("stock.stock_location_stock")
# Create products:
cls.product_top = cls.product_obj.create(
{
"name": "FP-01",
"type": "product",
"uom_id": cls.uom_dozen.id,
"uom_po_id": cls.uom_dozen.id,
}
)
cls.product_sub_1 = cls.product_obj.create(
{
"name": "IP-01",
"type": "product",
"uom_id": cls.uom_dozen.id,
"uom_po_id": cls.uom_dozen.id,
}
)
cls.product_sub_2 = cls.product_obj.create(
{
"name": "IP-02",
"type": "product",
"uom_id": cls.uom_kgm.id,
"uom_po_id": cls.uom_kgm.id,
}
)
cls.product_sub_3 = cls.product_obj.create(
{
"name": "IP-03",
"type": "product",
"uom_id": cls.uom_unit.id,
"uom_po_id": cls.uom_unit.id,
}
)
cls.component_1 = cls.product_obj.create(
{
"name": "PP-01",
"type": "product",
"uom_id": cls.uom_unit.id,
"uom_po_id": cls.uom_unit.id,
}
)
cls.component_2 = cls.product_obj.create(
{
"name": "PP-02",
"type": "product",
"uom_id": cls.uom_unit.id,
"uom_po_id": cls.uom_unit.id,
}
)
cls.component_3 = cls.product_obj.create(
{
"name": "PP-03",
"type": "product",
"uom_id": cls.uom_meter.id,
"uom_po_id": cls.uom_meter.id,
}
)
# Create Bills of Materials:
cls.bom_top = cls.bom_obj.create(
{
"product_tmpl_id": cls.product_top.product_tmpl_id.id,
"product_qty": 1.0,
"product_uom_id": cls.uom_unit.id,
}
)
cls.line_top_1 = cls.bom_line_obj.create(
{
"product_id": cls.product_sub_1.id,
"bom_id": cls.bom_top.id,
"product_qty": 1.0,
"product_uom_id": cls.uom_dozen.id,
}
)
cls.line_top_2 = cls.bom_line_obj.create(
{
"product_id": cls.product_sub_2.id,
"bom_id": cls.bom_top.id,
"product_qty": 200.0,
"product_uom_id": cls.uom_gm.id,
}
)
cls.line_top_3 = cls.bom_line_obj.create(
{
"product_id": cls.product_sub_3.id,
"bom_id": cls.bom_top.id,
"product_qty": 1.0,
"product_uom_id": cls.uom_dozen.id,
}
)
cls.bom_sub_1 = cls.bom_obj.create(
{
"product_tmpl_id": cls.product_sub_1.product_tmpl_id.id,
"product_qty": 12.0,
"product_uom_id": cls.uom_unit.id,
}
)
cls.line_sub_1_1 = cls.bom_line_obj.create(
{
"product_id": cls.component_1.id,
"bom_id": cls.bom_sub_1.id,
"product_qty": 1.0,
"product_uom_id": cls.uom_dozen.id,
}
)
cls.bom_sub_2 = cls.bom_obj.create(
{
"product_tmpl_id": cls.product_sub_2.product_tmpl_id.id,
"product_qty": 20.0,
"product_uom_id": cls.uom_kgm.id,
}
)
cls.line_sub_2_1 = cls.bom_line_obj.create(
{
"product_id": cls.component_2.id,
"bom_id": cls.bom_sub_2.id,
"product_qty": 1.0,
"product_uom_id": cls.uom_unit.id,
}
)
cls.bom_sub_3 = cls.bom_obj.create(
{
"product_tmpl_id": cls.product_sub_3.product_tmpl_id.id,
"product_qty": 10.0,
"product_uom_id": cls.uom_unit.id,
}
)
cls.line_sub_3_1 = cls.bom_line_obj.create(
{
"product_id": cls.component_3.id,
"bom_id": cls.bom_sub_3.id,
"product_qty": 2.0,
"product_uom_id": cls.uom_meter.id,
}
)
def _product_change_qty(self, product, new_qty):
values = {
"product_id": product.id,
"new_quantity": new_qty,
"product_tmpl_id": product.product_tmpl_id.id,
}
wizard = self.env["stock.change.product.qty"].create(values)
wizard.change_product_qty()
def test_wizard(self):
self.wizard = self.env["mrp.bom.current.stock"].create(
{
"product_id": self.product_top.id,
"bom_id": self.bom_top.id,
"location_id": self.stock_loc.id,
}
)
self.wizard.do_explode()
sol = (1, 1, 200, 0.01, 1, 2.4)
lines = self.wizard.line_ids
self.assertEqual(self.wizard.location_id, self.stock_loc)
for i, line in enumerate(lines):
self.assertEqual(line.product_qty, sol[i])
self._product_change_qty(line.product_id, line.product_qty)
lines._compute_qty_available_in_source_loc()
for line in lines:
available = line.product_id.product_tmpl_id.uom_id._compute_quantity(
line.product_qty, line.product_uom_id
)
self.assertEqual(line.qty_available_in_source_loc, available)

View file

@ -0,0 +1,5 @@
# Copyright 2018 Camptocamp SA
# Copyright 2017 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import bom_route_current_stock

View file

@ -0,0 +1,153 @@
# Copyright 2018 Camptocamp SA
# Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class BomRouteCurrentStock(models.TransientModel):
_name = "mrp.bom.current.stock"
_description = "MRP Bom Route Current Stock"
bom_id = fields.Many2one(
comodel_name="mrp.bom", string="Starting Bill of Materials", required=True
)
product_id = fields.Many2one(
comodel_name="product.product",
string="Product Variant",
domain="[('type', 'in', ['product', 'consu'])]",
required=True,
)
product_tmpl_id = fields.Many2one(
comodel_name="product.template",
string="Product Template",
related="product_id.product_tmpl_id",
)
product_qty = fields.Float(
related="bom_id.product_qty", digits="Product Unit of Measure"
)
product_uom_id = fields.Many2one(
comodel_name="uom.uom", related="bom_id.product_uom_id"
)
location_id = fields.Many2one(
comodel_name="stock.location", string="Starting location"
)
line_ids = fields.One2many(
comodel_name="mrp.bom.current.stock.line", inverse_name="explosion_id"
)
@api.onchange("product_id")
def _onchange_product_id(self):
if self.product_id:
self.bom_id = self.env["mrp.bom"]._bom_find(products=self.product_id)[
self.product_id
]
@api.onchange("bom_id")
def _onchange_bom_id(self):
if self.bom_id.location_id:
self.location_id = self.bom_id.location_id
@api.model
def _prepare_line(self, bom_line, level, factor):
return {
"product_id": bom_line.product_id.id,
"bom_line": bom_line.id,
"bom_level": level,
"product_qty": bom_line.product_qty * factor,
"product_uom_id": bom_line.product_uom_id.id,
"location_id": (
bom_line.location_id.id if bom_line.location_id else self.location_id.id
),
"explosion_id": self.id,
}
def do_explode(self):
self.ensure_one()
line_obj = self.env["mrp.bom.current.stock.line"]
def _create_lines(bom, level=0, factor=1):
level += 1
for line in bom.bom_line_ids:
vals = self._prepare_line(line, level, factor)
line_obj.create(vals)
location = line.location_id
line_boms = line.product_id.bom_ids
boms = (
line_boms.filtered(lambda bom: bom.location_id == location)
or line_boms
)
if boms:
line_qty = line.product_uom_id._compute_quantity(
line.product_qty, boms[0].product_uom_id
)
new_factor = factor * line_qty / boms[0].product_qty
_create_lines(boms[0], level, new_factor)
_create_lines(self.bom_id)
return {
"type": "ir.actions.act_window",
"name": "Open lines",
"view_mode": "form",
"res_model": "mrp.bom.current.stock",
"view_id": self.env.ref(
"mrp_bom_current_stock.mrp_bom_current_stock_view_form2"
).id,
"target": "new",
"res_id": self.id,
}
class BomRouteCurrentStockLine(models.TransientModel):
_name = "mrp.bom.current.stock.line"
_description = "MRP Bom Route Current Stock Line"
explosion_id = fields.Many2one(comodel_name="mrp.bom.current.stock", readonly=True)
product_id = fields.Many2one(
comodel_name="product.product", string="Product Variant", readonly=True
)
bom_level = fields.Integer(string="BoM Level", readonly=True)
product_qty = fields.Float(
string="Product Quantity", readonly=True, digits="Product Unit of Measure"
)
product_uom_id = fields.Many2one(
comodel_name="uom.uom", string="Product Unit of Measure", readonly=True
)
location_id = fields.Many2one(
comodel_name="stock.location", string="Source location"
)
bom_line = fields.Many2one(
comodel_name="mrp.bom.line", string="BoM line", readonly=True
)
qty_available_in_source_loc = fields.Float(
string="Qty Available in Source",
compute="_compute_qty_available_in_source_loc",
readonly=True,
)
bom_id = fields.Many2one(
comodel_name="mrp.bom",
string="Parent BoM",
related="bom_line.bom_id",
readonly=True,
)
@api.onchange("location_id")
def _compute_qty_available_in_source_loc(self):
for record in self:
product_available = record.product_id.with_context(
location=record.location_id.id
)._compute_quantities_dict(
self._context.get("lot_id"),
self._context.get("owner_id"),
self._context.get("package_id"),
self._context.get("from_date"),
self._context.get("to_date"),
)[
record.product_id.id
][
"qty_available"
]
res = record.product_id.product_tmpl_id.uom_id._compute_quantity(
product_available, record.product_uom_id
)
record.qty_available_in_source_loc = res

View file

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017 ForgeFlow S.L.
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<odoo>
<record id="mrp_bom_current_stock_view_form" model="ir.ui.view">
<field name="name">mrp.bom.current.stock.form</field>
<field name="model">mrp.bom.current.stock</field>
<field name="arch" type="xml">
<form>
<group name="step_1" string="Select product and location to explode">
<field
name="product_id"
domain="[('bom_ids','!=',False),('bom_ids.type','!=','phantom')]"
/>
<field name="product_tmpl_id" invisible="1" />
<field
name="bom_id"
domain="['&amp;', '|', ('product_id','=',product_id),
'&amp;', ('product_tmpl_id.product_variant_ids','=',product_id),
('product_id','=',False), ('type', '=', 'normal')]"
/>
<field name="location_id" />
</group>
<footer>
<button
name="do_explode"
type="object"
string="Explode"
class="oe_highlight"
/>
<button special="cancel" string="Cancel" />
</footer>
</form>
</field>
</record>
<record id="mrp_bom_current_stock_view_form2" model="ir.ui.view">
<field name="name">mrp.bom.current.stock.form2</field>
<field name="model">mrp.bom.current.stock</field>
<field name="arch" type="xml">
<form>
<group name="step_2" string="Explosion result">
<p
style="width: max-content;"
>Set the source location for every component.</p>
<br />
<field name="product_id" readonly="1" />
<field name="bom_id" readonly="1" />
<field name="line_ids" nolabel="1" colspan="2">
<tree create="0" delete="0" editable="1">
<field name="bom_level" readonly="1" />
<field name="product_id" readonly="1" />
<field name="product_qty" readonly="1" />
<field name="qty_available_in_source_loc" readonly="1" />
<field
name="product_uom_id"
groups="uom.group_uom"
readonly="1"
/>
<field name="location_id" />
<field name="bom_id" readonly="1" />
</tree>
</field>
</group>
<footer>
<button
name="%(mrp_bom_current_stock.action_report_bom_current_stock_pdf)d"
type="action"
string="Print PDF"
class="oe_highlight"
/>
<button
name="%(mrp_bom_current_stock.action_report_bom_current_stock_xlsx)d"
type="action"
string="Export XLSX"
class="oe_highlight"
/>
or
<button special="cancel" string="Close" />
</footer>
</form>
</field>
</record>
<record id="mrp_bom_current_stock_action" model="ir.actions.act_window">
<field name="name">BoM Current Stock Explosion</field>
<field name="res_model">mrp.bom.current.stock</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem
id="mrp_bom_current_stock_menu"
action="mrp_bom_current_stock_action"
parent="mrp.menu_mrp_reporting"
sequence="50"
/>
</odoo>

View file

@ -0,0 +1,43 @@
[project]
name = "odoo-bringout-oca-manufacture-reporting-mrp_bom_current_stock"
version = "16.0.0"
description = "MRP BoM Current Stock - Add a report that explodes the bill of materials and show the stock available in the source location."
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-manufacture-reporting-mrp_bom_location>=16.0.0",
"odoo-bringout-oca-manufacture-reporting-report_xlsx>=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 = ["mrp_bom_current_stock"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.4.1",
]