├── mrp_bom_matrix_report ├── __init__.py ├── reports │ ├── __init__.py │ ├── mrp_bom_matrix_report_views.xml │ └── mrp_bom_matrix_report.py ├── readme │ ├── USAGE.md │ ├── CONTRIBUTORS.md │ └── DESCRIPTION.md ├── pyproject.toml ├── static │ └── description │ │ ├── icon.png │ │ └── index.html ├── security │ └── ir.model.access.csv ├── __manifest__.py ├── i18n │ ├── mrp_bom_matrix_report.pot │ ├── it.po │ └── fr.po └── README.rst ├── mrp_flattened_bom_xlsx ├── models │ ├── __init__.py │ └── mrp_bom.py ├── tests │ ├── __init__.py │ └── test_flattened_bom.py ├── __init__.py ├── pyproject.toml ├── report │ ├── __init__.py │ ├── flattened_bom_xlsx.xml │ └── flattened_bom_xlsx.py ├── static │ └── description │ │ ├── icon.png │ │ └── index.html ├── readme │ ├── CONTRIBUTORS.md │ ├── USAGE.md │ └── DESCRIPTION.md ├── __manifest__.py ├── i18n │ ├── mrp_flattened_bom_xlsx.pot │ └── it.po └── README.rst ├── mrp_bom_current_stock ├── reports │ ├── __init__.py │ ├── report_mrpcurrentstock_xlsx.py │ └── report_mrpcurrentstock.xml ├── tests │ ├── __init__.py │ └── test_mrp_bom_current_stock.py ├── pyproject.toml ├── static │ └── description │ │ ├── icon.png │ │ └── index.html ├── readme │ ├── CONTRIBUTORS.md │ ├── DESCRIPTION.md │ └── USAGE.md ├── __init__.py ├── wizard │ ├── __init__.py │ ├── bom_route_current_stock_view.xml │ └── bom_route_current_stock.py ├── security │ └── ir.model.access.csv ├── __manifest__.py ├── README.rst └── i18n │ ├── mrp_bom_current_stock.pot │ ├── tr.po │ └── it.po ├── checklog-odoo.cfg ├── mrp_bom_structure_xlsx ├── pyproject.toml ├── __init__.py ├── report │ ├── __init__.py │ ├── bom_structure_xlsx.xml │ └── bom_structure_xlsx.py ├── tests │ ├── __init__.py │ ├── test_mrp_bom_structure_xlsx.py │ └── common.py ├── static │ └── description │ │ └── icon.png ├── readme │ ├── INSTALL.md │ ├── USAGE.md │ ├── DESCRIPTION.md │ └── CONTRIBUTORS.md ├── __manifest__.py ├── i18n │ ├── mrp_bom_structure_xlsx.pot │ ├── de.po │ └── it.po └── README.rst ├── prettier.config.cjs ├── setup └── _metapackage │ └── pyproject.toml ├── .editorconfig ├── .ruff.toml ├── .copier-answers.yml ├── .gitignore ├── .github └── workflows │ ├── pre-commit.yml │ ├── test.yml │ └── stale.yml ├── README.md ├── .pylintrc-mandatory ├── .pylintrc ├── .pre-commit-config.yaml └── eslint.config.cjs /mrp_bom_matrix_report/__init__.py: -------------------------------------------------------------------------------- 1 | from . import reports 2 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import mrp_bom 2 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_flattened_bom 2 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/reports/__init__.py: -------------------------------------------------------------------------------- 1 | from . import mrp_bom_matrix_report 2 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/reports/__init__.py: -------------------------------------------------------------------------------- 1 | from . import report_mrpcurrentstock_xlsx 2 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_mrp_bom_current_stock 2 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/__init__.py: -------------------------------------------------------------------------------- 1 | from . import models 2 | from . import report 3 | -------------------------------------------------------------------------------- /checklog-odoo.cfg: -------------------------------------------------------------------------------- 1 | [checklog-odoo] 2 | ignore= 3 | WARNING.* 0 failed, 0 error\(s\).* 4 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | - Go to *Manufacturing \> Reporting \> BOM Matrix*. 2 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["whool"] 3 | build-backend = "whool.buildapi" 4 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 2 | from . import report 3 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/report/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 2 | from . import bom_structure_xlsx 3 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/report/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 2 | from . import flattened_bom_xlsx 3 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 2 | from . import test_mrp_bom_structure_xlsx 3 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/manufacture-reporting/HEAD/mrp_bom_current_stock/static/description/icon.png -------------------------------------------------------------------------------- /mrp_bom_matrix_report/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/manufacture-reporting/HEAD/mrp_bom_matrix_report/static/description/icon.png -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/manufacture-reporting/HEAD/mrp_bom_structure_xlsx/static/description/icon.png -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OCA/manufacture-reporting/HEAD/mrp_flattened_bom_xlsx/static/description/icon.png -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/readme/INSTALL.md: -------------------------------------------------------------------------------- 1 | To install this module, you need to: 2 | 3 | 1. Go to apps 4 | 2. Look for mrp_bom_structure_xlsx module 5 | 3. Click install 6 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | To use this module, you need to: 2 | 3 | Go to the Bill of Materials form or list views, press 'Print \> Export 4 | BoM Structure to Excel'. 5 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module extends the functionality of the MRP capabilities of Odoo, 2 | and allow you to export the BoM structure to MS Excel .XLSX format. 3 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Lois Rilo \ 2 | - Héctor Villarreal \ 3 | - Dhara Solanki \ 4 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This modules extend the Manufacturing App adding a report that explodes 2 | the bill of materials and show the stock available in the source 3 | location. 4 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Jordi Ballester \<\> 2 | - Lois Rilo \<\> 3 | - Pimolnat Suntian \<\> 4 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Camptocamp SA 2 | # Copyright 2017 ForgeFlow S.L. 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 4 | 5 | from . import wizard 6 | from . import reports 7 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/wizard/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Camptocamp SA 2 | # Copyright 2017 ForgeFlow S.L. 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 4 | 5 | from . import bom_route_current_stock 6 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 2 | access_report_mrp_bom_matrix,mrp.bom.matrix.report,model_mrp_bom_matrix_report,mrp.group_mrp_user,1,0,0,0 3 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Héctor Villarreal \<\> 2 | - Lois Rilo \<\> 3 | - Joan Mateu \<\> 4 | - Dhara Solanki \<\> 5 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | To use this module, you need to: 2 | 3 | 1. Go to 'Manufacturing / Products / Bill of Materials' 4 | 5 | 2. Select a BOM or more BOMS 6 | 7 | *(Could be interesting to modify quantities of these BOMs)* 8 | 9 | 3. Go to 'Print / Export Flattened BOM to Excel'. 10 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/security/ir.model.access.csv: -------------------------------------------------------------------------------- 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 4 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/readme/USAGE.md: -------------------------------------------------------------------------------- 1 | To use this module, you need to: 2 | 3 | 1. Go to *Manufacturing \> Reporting \> BoM Current Stock Explosion*. 4 | 2. Select Product, BoM and location and click on *Explode*. 5 | 3. Set the proper location (if desired) for all the components 6 | displayed if you haven't done so in the related BoMs. 7 | 4. Click *Print Report*. 8 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/readme/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | - Jordi Ballester \<\> 2 | - Miquel Raïch \<\> 3 | - Lois Rilo Antelo \<\> 4 | - Aaron Henriquez \<\> 5 | - Bhavesh Odedra \<\> 6 | 7 | - `Tecnativa `_: 8 | 9 | - Víctor Martínez 10 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | The Matrix Bill of Materials is a report that shows connections between 2 | all parents and all components. 3 | 4 | This report helps to identify the products that are used in lots of 5 | assemblies or finished products. 6 | 7 | If a raw material/assembly is used in many parent assemblies/finished 8 | products, it is likely that you'd want to make sure that you never run 9 | out of it. 10 | -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('prettier').Config} */ 2 | 3 | const config = { 4 | // https://github.com/prettier/prettier/issues/15388#issuecomment-1717746872 5 | plugins: [require.resolve("@prettier/plugin-xml")], 6 | bracketSpacing: false, 7 | printWidth: 88, 8 | proseWrap: "always", 9 | semi: true, 10 | trailingComma: "es5", 11 | xmlWhitespaceSensitivity: "preserve", 12 | }; 13 | 14 | module.exports = config; 15 | -------------------------------------------------------------------------------- /setup/_metapackage/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "odoo-addons-oca-manufacture-reporting" 3 | version = "18.0.20250728.0" 4 | dependencies = [ 5 | "odoo-addon-mrp_bom_current_stock==18.0.*", 6 | "odoo-addon-mrp_bom_matrix_report==18.0.*", 7 | "odoo-addon-mrp_bom_structure_xlsx==18.0.*", 8 | "odoo-addon-mrp_flattened_bom_xlsx==18.0.*", 9 | ] 10 | classifiers=[ 11 | "Programming Language :: Python", 12 | "Framework :: Odoo", 13 | "Framework :: Odoo :: 18.0", 14 | ] 15 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com) 2 | # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). 3 | 4 | { 5 | "name": "MRP BOM Matrix Report", 6 | "version": "18.0.1.0.0", 7 | "license": "LGPL-3", 8 | "author": "ForgeFlow, Odoo Community Association (OCA)", 9 | "website": "https://github.com/OCA/manufacture-reporting", 10 | "category": "Manufacturing", 11 | "depends": ["mrp"], 12 | "data": ["security/ir.model.access.csv", "reports/mrp_bom_matrix_report_views.xml"], 13 | } 14 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/readme/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | This module extends the functionality of the MRP capabilities of Odoo, 2 | and allows you to export the flattened BOM to MS Excel .XLSX format. 3 | 4 | A flattened bill of material removes the intermediate levels in the BOM 5 | and connect the lowest levels directly to the highest level. 6 | 7 | A list of the sum of lowest levels will be shown for every BoM you 8 | export using this method. 9 | 10 | It also maintains units correctly across all nested BOM's and take units 11 | that have been defined in product Unit of Measure field. 12 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 ForgeFlow S.L. 2 | # (http://www.forgeflow.com) 3 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 4 | 5 | { 6 | "name": "Export Flattened BOM to Excel", 7 | "version": "18.0.1.0.0", 8 | "category": "Manufacturing", 9 | "author": "ForgeFlow, Odoo Community Association (OCA)", 10 | "website": "https://github.com/OCA/manufacture-reporting", 11 | "license": "AGPL-3", 12 | "depends": ["report_xlsx", "mrp"], 13 | "data": ["report/flattened_bom_xlsx.xml"], 14 | "installable": True, 15 | } 16 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017-19 ForgeFlow S.L. (https://www.forgeflow.com) 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | 4 | { 5 | "name": "MRP BOM Structure XLSX", 6 | "version": "18.0.1.0.0", 7 | "category": "Manufacturing", 8 | "summary": "Export BoM Structure to Excel .XLSX", 9 | "author": "ForgeFlow, Odoo Community Association (OCA)", 10 | "website": "https://github.com/OCA/manufacture-reporting", 11 | "license": "AGPL-3", 12 | "depends": ["report_xlsx", "mrp"], 13 | "data": ["report/bom_structure_xlsx.xml"], 14 | "installable": True, 15 | } 16 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Configuration for known file extensions 2 | [*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}] 3 | charset = utf-8 4 | end_of_line = lf 5 | indent_size = 4 6 | indent_style = space 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | 10 | [*.{json,yml,yaml,rst,md}] 11 | indent_size = 2 12 | 13 | # Do not configure editor for libs and autogenerated content 14 | [{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}] 15 | charset = unset 16 | end_of_line = unset 17 | indent_size = unset 18 | indent_style = unset 19 | insert_final_newline = false 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/report/bom_structure_xlsx.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Export BoM Structure to Excel 7 | mrp.bom 8 | 9 | ir.actions.report 10 | mrp_bom_structure_xlsx.bom_structure_xlsx 11 | xlsx 12 | mrp_bom 13 | 14 | 15 | -------------------------------------------------------------------------------- /.ruff.toml: -------------------------------------------------------------------------------- 1 | 2 | target-version = "py310" 3 | fix = true 4 | 5 | [lint] 6 | extend-select = [ 7 | "B", 8 | "C90", 9 | "E501", # line too long (default 88) 10 | "I", # isort 11 | "UP", # pyupgrade 12 | ] 13 | extend-safe-fixes = ["UP008"] 14 | exclude = ["setup/*"] 15 | 16 | [format] 17 | exclude = ["setup/*"] 18 | 19 | [lint.per-file-ignores] 20 | "__init__.py" = ["F401", "I001"] # ignore unused and unsorted imports in __init__.py 21 | "__manifest__.py" = ["B018"] # useless expression 22 | 23 | [lint.isort] 24 | section-order = ["future", "standard-library", "third-party", "odoo", "odoo-addons", "first-party", "local-folder"] 25 | 26 | [lint.isort.sections] 27 | "odoo" = ["odoo"] 28 | "odoo-addons" = ["odoo.addons"] 29 | 30 | [lint.mccabe] 31 | max-complexity = 16 32 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Export Flattened BOM Structure to Excel 7 | mrp.bom 8 | 9 | ir.actions.report 10 | mrp_flattened_bom_xlsx.flattened_bom_xlsx 11 | xlsx 12 | mrp_bom_structure 13 | False 14 | 15 | 16 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/__manifest__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Camptocamp SA 2 | # Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com) 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 4 | 5 | { 6 | "name": "MRP BoM Current Stock", 7 | "summary": "Add a report that explodes the bill of materials and show the " 8 | "stock available in the source location.", 9 | "version": "18.0.1.0.0", 10 | "category": "Manufacture", 11 | "website": "https://github.com/OCA/manufacture-reporting", 12 | "author": "ForgeFlow, Odoo Community Association (OCA)", 13 | "license": "AGPL-3", 14 | "depends": ["mrp", "report_xlsx"], 15 | "data": [ 16 | "security/ir.model.access.csv", 17 | "reports/report_mrpcurrentstock.xml", 18 | "wizard/bom_route_current_stock_view.xml", 19 | ], 20 | } 21 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/tests/test_mrp_bom_structure_xlsx.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 3 | 4 | from xlrd import open_workbook 5 | 6 | from .common import TestMrpBomStructureXlsxBase 7 | 8 | 9 | class TestMrpBomStructureXlsx(TestMrpBomStructureXlsxBase): 10 | def test_bom_structure_xlsx_report(self): 11 | res = self.report_model._render( 12 | "mrp_bom_structure_xlsx.bom_structure_xlsx", self.bom.ids, False 13 | ) 14 | wb = open_workbook(file_contents=res[0]) 15 | sheet = wb.sheet_by_index(0) 16 | references = [] 17 | for rownum in range(3, sheet.nrows): 18 | references.append(sheet.row_values(rownum)[2]) 19 | self.assertIn("COMPONENT-A", references) 20 | self.assertIn("COMPONENT-B", references) 21 | self.assertIn("CHILD-COMPONENT", references) 22 | -------------------------------------------------------------------------------- /.copier-answers.yml: -------------------------------------------------------------------------------- 1 | # Do NOT update manually; changes here will be overwritten by Copier 2 | _commit: v1.29 3 | _src_path: git+https://github.com/OCA/oca-addons-repo-template 4 | additional_ruff_rules: [] 5 | ci: GitHub 6 | convert_readme_fragments_to_markdown: true 7 | enable_checklog_odoo: true 8 | generate_requirements_txt: true 9 | github_check_license: true 10 | github_ci_extra_env: {} 11 | github_enable_codecov: true 12 | github_enable_makepot: true 13 | github_enable_stale_action: true 14 | github_enforce_dev_status_compatibility: true 15 | include_wkhtmltopdf: false 16 | odoo_test_flavor: Both 17 | odoo_version: 18.0 18 | org_name: Odoo Community Association (OCA) 19 | org_slug: OCA 20 | rebel_module_groups: [] 21 | repo_description: manufacture-reporting 22 | repo_name: manufacture-reporting 23 | repo_slug: manufacture-reporting 24 | repo_website: https://github.com/OCA/manufacture-reporting 25 | use_pyproject_toml: true 26 | use_ruff: true 27 | 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | /.venv 5 | /.pytest_cache 6 | /.ruff_cache 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | env/ 14 | bin/ 15 | build/ 16 | develop-eggs/ 17 | dist/ 18 | eggs/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | *.eggs 27 | 28 | # Windows installers 29 | *.msi 30 | 31 | # Debian packages 32 | *.deb 33 | 34 | # Redhat packages 35 | *.rpm 36 | 37 | # MacOS packages 38 | *.dmg 39 | *.pkg 40 | 41 | # Installer logs 42 | pip-log.txt 43 | pip-delete-this-directory.txt 44 | 45 | # Unit test / coverage reports 46 | htmlcov/ 47 | .tox/ 48 | .coverage 49 | .cache 50 | nosetests.xml 51 | coverage.xml 52 | 53 | # Translations 54 | *.mo 55 | 56 | # Pycharm 57 | .idea 58 | 59 | # Eclipse 60 | .settings 61 | 62 | # Visual Studio cache/options directory 63 | .vs/ 64 | .vscode 65 | 66 | # OSX Files 67 | .DS_Store 68 | 69 | # Django stuff: 70 | *.log 71 | 72 | # Mr Developer 73 | .mr.developer.cfg 74 | .project 75 | .pydevproject 76 | 77 | # Rope 78 | .ropeproject 79 | 80 | # Sphinx documentation 81 | docs/_build/ 82 | 83 | # Backup files 84 | *~ 85 | *.swp 86 | 87 | # OCA rules 88 | !static/lib/ 89 | -------------------------------------------------------------------------------- /.github/workflows/pre-commit.yml: -------------------------------------------------------------------------------- 1 | name: pre-commit 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "18.0*" 7 | push: 8 | branches: 9 | - "18.0" 10 | - "18.0-ocabot-*" 11 | 12 | jobs: 13 | pre-commit: 14 | runs-on: ubuntu-22.04 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: actions/setup-python@v5 18 | with: 19 | python-version: "3.11" 20 | - name: Get python version 21 | run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV 22 | - uses: actions/cache@v4 23 | with: 24 | path: ~/.cache/pre-commit 25 | key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} 26 | - name: Install pre-commit 27 | run: pip install pre-commit 28 | - name: Run pre-commit 29 | run: pre-commit run --all-files --show-diff-on-failure --color=always 30 | env: 31 | # Consider valid a PR that changes README fragments but doesn't 32 | # change the README.rst file itself. It's not really a problem 33 | # because the bot will update it anyway after merge. This way, we 34 | # lower the barrier for functional contributors that want to fix the 35 | # readme fragments, while still letting developers get README 36 | # auto-generated (which also helps functionals when using runboat). 37 | # DOCS https://pre-commit.com/#temporarily-disabling-hooks 38 | SKIP: oca-gen-addon-readme 39 | - name: Check that all files generated by pre-commit are in git 40 | run: | 41 | newfiles="$(git ls-files --others --exclude-from=.gitignore)" 42 | if [ "$newfiles" != "" ] ; then 43 | echo "Please check-in the following files:" 44 | echo "$newfiles" 45 | exit 1 46 | fi 47 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/tests/common.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Tecnativa - Víctor Martínez 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). 3 | from odoo.tests import Form 4 | 5 | from odoo.addons.base.tests.common import BaseCommon 6 | 7 | 8 | class TestMrpBomStructureXlsxBase(BaseCommon): 9 | @classmethod 10 | def setUpClass(cls): 11 | super().setUpClass() 12 | cls.product = cls.env["product.product"].create( 13 | {"name": "Test product", "default_code": "product"} 14 | ) 15 | cls.component_a = cls.env["product.product"].create( 16 | { 17 | "name": "Test componente A", 18 | "default_code": "COMPONENT-A", 19 | } 20 | ) 21 | cls.component_b = cls.env["product.product"].create( 22 | { 23 | "name": "Test componente B", 24 | "default_code": "COMPONENT-B", 25 | } 26 | ) 27 | cls.report_model = cls.env["ir.actions.report"] 28 | # Bom from product 29 | bom_form = Form(cls.env["mrp.bom"]) 30 | bom_form.product_tmpl_id = cls.product.product_tmpl_id 31 | with bom_form.bom_line_ids.new() as line_form: 32 | line_form.product_id = cls.component_a 33 | line_form.product_qty = 1 34 | with bom_form.bom_line_ids.new() as line_form: 35 | line_form.product_id = cls.component_b 36 | line_form.product_qty = 1 37 | cls.bom = bom_form.save() 38 | # Bom from component A 39 | cls.child_component = cls.env["product.product"].create( 40 | { 41 | "name": "Test child component", 42 | "default_code": "CHILD-COMPONENT", 43 | } 44 | ) 45 | bom_form = Form(cls.env["mrp.bom"]) 46 | bom_form.product_tmpl_id = cls.component_a.product_tmpl_id 47 | with bom_form.bom_line_ids.new() as line_form: 48 | line_form.product_id = cls.child_component 49 | line_form.product_qty = 1 50 | bom_form.save() 51 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/models/mrp_bom.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 ForgeFlow S.L. 2 | # (http://www.forgeflow.com) 3 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 4 | 5 | from odoo import models 6 | 7 | 8 | class MrpBom(models.Model): 9 | """Defines bills of material for a product or a product template""" 10 | 11 | _inherit = "mrp.bom" 12 | 13 | def _get_flattened_totals(self, factor=1, totals=None): 14 | """Calculate the **unitary** product requirements of flattened BOM. 15 | *Unit* means that the requirements are computed for one unit of the 16 | default UoM of the product. 17 | :returns: dict: keys are components and values are aggregated quantity 18 | in the product default UoM. 19 | """ 20 | self.ensure_one() 21 | if totals is None: 22 | totals = {} 23 | factor /= self.product_uom_id._compute_quantity( 24 | self.product_qty, self.product_tmpl_id.uom_id, round=False 25 | ) 26 | for line in self.bom_line_ids: 27 | sub_bom = self.env["mrp.bom"]._bom_find(line.product_id)[line.product_id] 28 | if sub_bom: 29 | new_factor = factor * line.product_uom_id._compute_quantity( 30 | line.product_qty, line.product_id.uom_id, round=False 31 | ) 32 | sub_bom._get_flattened_totals(new_factor, totals) 33 | else: 34 | if totals.get(line.product_id): 35 | totals[line.product_id] += ( 36 | factor 37 | * line.product_uom_id._compute_quantity( 38 | line.product_qty, line.product_id.uom_id, round=False 39 | ) 40 | ) 41 | else: 42 | totals[line.product_id] = ( 43 | factor 44 | * line.product_uom_id._compute_quantity( 45 | line.product_qty, line.product_id.uom_id, round=False 46 | ) 47 | ) 48 | return totals 49 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/i18n/mrp_flattened_bom_xlsx.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_flattened_bom_xlsx 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: mrp_flattened_bom_xlsx 17 | #. odoo-python 18 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 19 | msgid "BOM Name" 20 | msgstr "" 21 | 22 | #. module: mrp_flattened_bom_xlsx 23 | #: model:ir.model,name:mrp_flattened_bom_xlsx.model_mrp_bom 24 | msgid "Bill of Material" 25 | msgstr "" 26 | 27 | #. module: mrp_flattened_bom_xlsx 28 | #: model:ir.actions.report,name:mrp_flattened_bom_xlsx.flattened_bom_xlsx 29 | msgid "Export Flattened BOM Structure to Excel" 30 | msgstr "" 31 | 32 | #. module: mrp_flattened_bom_xlsx 33 | #. odoo-python 34 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 35 | msgid "Flattened BOM" 36 | msgstr "" 37 | 38 | #. module: mrp_flattened_bom_xlsx 39 | #: model:ir.model,name:mrp_flattened_bom_xlsx.model_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx 40 | msgid "Flattened BOM XLSX" 41 | msgstr "" 42 | 43 | #. module: mrp_flattened_bom_xlsx 44 | #. odoo-python 45 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 46 | msgid "Product Name" 47 | msgstr "" 48 | 49 | #. module: mrp_flattened_bom_xlsx 50 | #. odoo-python 51 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 52 | msgid "Product Reference" 53 | msgstr "" 54 | 55 | #. module: mrp_flattened_bom_xlsx 56 | #. odoo-python 57 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 58 | msgid "Quantity" 59 | msgstr "" 60 | 61 | #. module: mrp_flattened_bom_xlsx 62 | #. odoo-python 63 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 64 | msgid "Reference" 65 | msgstr "" 66 | 67 | #. module: mrp_flattened_bom_xlsx 68 | #. odoo-python 69 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 70 | msgid "Unit of Measure" 71 | msgstr "" 72 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/i18n/mrp_bom_structure_xlsx.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_structure_xlsx 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: mrp_bom_structure_xlsx 17 | #. odoo-python 18 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 19 | msgid "BOM Name" 20 | msgstr "" 21 | 22 | #. module: mrp_bom_structure_xlsx 23 | #. odoo-python 24 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 25 | msgid "BOM Structure" 26 | msgstr "" 27 | 28 | #. module: mrp_bom_structure_xlsx 29 | #: model:ir.model,name:mrp_bom_structure_xlsx.model_report_mrp_bom_structure_xlsx_bom_structure_xlsx 30 | msgid "BOM Structure XLSX Report" 31 | msgstr "" 32 | 33 | #. module: mrp_bom_structure_xlsx 34 | #: model:ir.actions.report,name:mrp_bom_structure_xlsx.bom_structure_xlsx 35 | msgid "Export BoM Structure to Excel" 36 | msgstr "" 37 | 38 | #. module: mrp_bom_structure_xlsx 39 | #. odoo-python 40 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 41 | msgid "Level" 42 | msgstr "" 43 | 44 | #. module: mrp_bom_structure_xlsx 45 | #. odoo-python 46 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 47 | msgid "Product Name" 48 | msgstr "" 49 | 50 | #. module: mrp_bom_structure_xlsx 51 | #. odoo-python 52 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 53 | msgid "Product Reference" 54 | msgstr "" 55 | 56 | #. module: mrp_bom_structure_xlsx 57 | #. odoo-python 58 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 59 | msgid "Quantity" 60 | msgstr "" 61 | 62 | #. module: mrp_bom_structure_xlsx 63 | #. odoo-python 64 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 65 | msgid "Reference" 66 | msgstr "" 67 | 68 | #. module: mrp_bom_structure_xlsx 69 | #. odoo-python 70 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 71 | msgid "Unit of Measure" 72 | msgstr "" 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | [![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/manufacture-reporting&target_branch=18.0) 3 | [![Pre-commit Status](https://github.com/OCA/manufacture-reporting/actions/workflows/pre-commit.yml/badge.svg?branch=18.0)](https://github.com/OCA/manufacture-reporting/actions/workflows/pre-commit.yml?query=branch%3A18.0) 4 | [![Build Status](https://github.com/OCA/manufacture-reporting/actions/workflows/test.yml/badge.svg?branch=18.0)](https://github.com/OCA/manufacture-reporting/actions/workflows/test.yml?query=branch%3A18.0) 5 | [![codecov](https://codecov.io/gh/OCA/manufacture-reporting/branch/18.0/graph/badge.svg)](https://codecov.io/gh/OCA/manufacture-reporting) 6 | [![Translation Status](https://translation.odoo-community.org/widgets/manufacture-reporting-18-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/manufacture-reporting-18-0/?utm_source=widget) 7 | 8 | 9 | 10 | # manufacture-reporting 11 | 12 | manufacture-reporting 13 | 14 | 15 | 16 | 17 | 18 | [//]: # (addons) 19 | 20 | Available addons 21 | ---------------- 22 | addon | version | maintainers | summary 23 | --- | --- | --- | --- 24 | [mrp_bom_current_stock](mrp_bom_current_stock/) | 18.0.1.0.0 | | Add a report that explodes the bill of materials and show the stock available in the source location. 25 | [mrp_bom_matrix_report](mrp_bom_matrix_report/) | 18.0.1.0.0 | | MRP BOM Matrix Report 26 | [mrp_bom_structure_xlsx](mrp_bom_structure_xlsx/) | 18.0.1.0.0 | | Export BoM Structure to Excel .XLSX 27 | [mrp_flattened_bom_xlsx](mrp_flattened_bom_xlsx/) | 18.0.1.0.0 | | Export Flattened BOM to Excel 28 | 29 | [//]: # (end addons) 30 | 31 | 32 | 33 | ## Licenses 34 | 35 | This repository is licensed under [AGPL-3.0](LICENSE). 36 | 37 | However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) 38 | policy. Consult each module's `__manifest__.py` file, which contains a `license` key 39 | that explains its license. 40 | 41 | ---- 42 | OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit 43 | organization whose mission is to support the collaborative development of Odoo features 44 | and promote its widespread use. 45 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_flattened_bom_xlsx 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0+e\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2023-05-30 07:37+0000\n" 10 | "PO-Revision-Date: 2023-05-30 07:37+0000\n" 11 | "Last-Translator: \n" 12 | "Language-Team: \n" 13 | "Language: \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: \n" 17 | "Plural-Forms: \n" 18 | 19 | #. module: mrp_flattened_bom_xlsx 20 | #. odoo-python 21 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 22 | msgid "BOM Name" 23 | msgstr "Nome DiBa" 24 | 25 | #. module: mrp_flattened_bom_xlsx 26 | #: model:ir.model,name:mrp_flattened_bom_xlsx.model_mrp_bom 27 | msgid "Bill of Material" 28 | msgstr "Distinta base" 29 | 30 | #. module: mrp_flattened_bom_xlsx 31 | #: model:ir.actions.report,name:mrp_flattened_bom_xlsx.flattened_bom_xlsx 32 | msgid "Export Flattened BOM Structure to Excel" 33 | msgstr "Esporta distinata base tecnica in Excel" 34 | 35 | #. module: mrp_flattened_bom_xlsx 36 | #. odoo-python 37 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 38 | msgid "Flattened BOM" 39 | msgstr "Distinta base tecnica" 40 | 41 | #. module: mrp_flattened_bom_xlsx 42 | #: model:ir.model,name:mrp_flattened_bom_xlsx.model_report_mrp_flattened_bom_xlsx_flattened_bom_xlsx 43 | msgid "Flattened BOM XLSX" 44 | msgstr "XLSX distinta base tecnica" 45 | 46 | #. module: mrp_flattened_bom_xlsx 47 | #. odoo-python 48 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 49 | msgid "Product Name" 50 | msgstr "Nome prodotto" 51 | 52 | #. module: mrp_flattened_bom_xlsx 53 | #. odoo-python 54 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 55 | msgid "Product Reference" 56 | msgstr "Riferimento prodotto" 57 | 58 | #. module: mrp_flattened_bom_xlsx 59 | #. odoo-python 60 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 61 | msgid "Quantity" 62 | msgstr "Quantità" 63 | 64 | #. module: mrp_flattened_bom_xlsx 65 | #. odoo-python 66 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 67 | msgid "Reference" 68 | msgstr "Riferimento" 69 | 70 | #. module: mrp_flattened_bom_xlsx 71 | #. odoo-python 72 | #: code:addons/mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py:0 73 | msgid "Unit of Measure" 74 | msgstr "Unità di misura" 75 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/i18n/mrp_bom_matrix_report.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_matrix_report 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: mrp_bom_matrix_report 17 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__count_parent_usage 18 | msgid "# Uses in Parent" 19 | msgstr "" 20 | 21 | #. module: mrp_bom_matrix_report 22 | #: model:ir.actions.act_window,name:mrp_bom_matrix_report.action_mrp_bom_matrix_report 23 | #: model:ir.ui.menu,name:mrp_bom_matrix_report.menu_mrp_bom_matrix_report 24 | msgid "BOM Matrix" 25 | msgstr "" 26 | 27 | #. module: mrp_bom_matrix_report 28 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__component_id 29 | msgid "Component Product" 30 | msgstr "" 31 | 32 | #. module: mrp_bom_matrix_report 33 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__display_name 34 | msgid "Display Name" 35 | msgstr "" 36 | 37 | #. module: mrp_bom_matrix_report 38 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__id 39 | msgid "ID" 40 | msgstr "" 41 | 42 | #. module: mrp_bom_matrix_report 43 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report__form_view 44 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report_pivot 45 | msgid "MRP BOM Matrix Report" 46 | msgstr "" 47 | 48 | #. module: mrp_bom_matrix_report 49 | #: model:ir.model,name:mrp_bom_matrix_report.model_mrp_bom_matrix_report 50 | msgid "MRP BoM Matrix Report" 51 | msgstr "" 52 | 53 | #. module: mrp_bom_matrix_report 54 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__parent_category_id 55 | msgid "Parent Product Category" 56 | msgstr "" 57 | 58 | #. module: mrp_bom_matrix_report 59 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__parent_template_id 60 | msgid "Parent Product Template" 61 | msgstr "" 62 | 63 | #. module: mrp_bom_matrix_report 64 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report_search_view 65 | msgid "Report MRP BOM Matrix" 66 | msgstr "" 67 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "18.0*" 7 | push: 8 | branches: 9 | - "18.0" 10 | - "18.0-ocabot-*" 11 | 12 | jobs: 13 | unreleased-deps: 14 | runs-on: ubuntu-latest 15 | name: Detect unreleased dependencies 16 | steps: 17 | - uses: actions/checkout@v4 18 | - run: | 19 | for reqfile in requirements.txt test-requirements.txt ; do 20 | if [ -f ${reqfile} ] ; then 21 | result=0 22 | # reject non-comment lines that contain a / (i.e. URLs, relative paths) 23 | grep "^[^#].*/" ${reqfile} || result=$? 24 | if [ $result -eq 0 ] ; then 25 | echo "Unreleased dependencies found in ${reqfile}." 26 | exit 1 27 | fi 28 | fi 29 | done 30 | test: 31 | runs-on: ubuntu-22.04 32 | container: ${{ matrix.container }} 33 | name: ${{ matrix.name }} 34 | strategy: 35 | fail-fast: false 36 | matrix: 37 | include: 38 | - container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest 39 | name: test with Odoo 40 | - container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest 41 | name: test with OCB 42 | makepot: "true" 43 | services: 44 | postgres: 45 | image: postgres:12.0 46 | env: 47 | POSTGRES_USER: odoo 48 | POSTGRES_PASSWORD: odoo 49 | POSTGRES_DB: odoo 50 | ports: 51 | - 5432:5432 52 | env: 53 | OCA_ENABLE_CHECKLOG_ODOO: "1" 54 | steps: 55 | - uses: actions/checkout@v4 56 | with: 57 | persist-credentials: false 58 | - name: Install addons and dependencies 59 | run: oca_install_addons 60 | - name: Check licenses 61 | run: manifestoo -d . check-licenses 62 | - name: Check development status 63 | run: manifestoo -d . check-dev-status --default-dev-status=Beta 64 | - name: Initialize test db 65 | run: oca_init_test_database 66 | - name: Run tests 67 | run: oca_run_tests 68 | - uses: codecov/codecov-action@v4 69 | with: 70 | token: ${{ secrets.CODECOV_TOKEN }} 71 | - name: Update .pot files 72 | run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} 73 | if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} 74 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/i18n/de.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_structure_xlsx 4 | # 5 | # Translators: 6 | # OCA Transbot , 2017 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Odoo Server 10.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-11-25 03:44+0000\n" 12 | "PO-Revision-Date: 2017-11-25 03:44+0000\n" 13 | "Last-Translator: OCA Transbot , 2017\n" 14 | "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" 15 | "Language: de\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: \n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #. module: mrp_bom_structure_xlsx 22 | #. odoo-python 23 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 24 | #, python-format 25 | msgid "BOM Name" 26 | msgstr "SL-Name" 27 | 28 | #. module: mrp_bom_structure_xlsx 29 | #. odoo-python 30 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 31 | #, python-format 32 | msgid "BOM Structure" 33 | msgstr "Struktur-SL" 34 | 35 | #. module: mrp_bom_structure_xlsx 36 | #: model:ir.model,name:mrp_bom_structure_xlsx.model_report_mrp_bom_structure_xlsx_bom_structure_xlsx 37 | #, fuzzy 38 | msgid "BOM Structure XLSX Report" 39 | msgstr "Struktur-SL" 40 | 41 | #. module: mrp_bom_structure_xlsx 42 | #: model:ir.actions.report,name:mrp_bom_structure_xlsx.bom_structure_xlsx 43 | msgid "Export BoM Structure to Excel" 44 | msgstr "" 45 | 46 | #. module: mrp_bom_structure_xlsx 47 | #. odoo-python 48 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 49 | #, python-format 50 | msgid "Level" 51 | msgstr "" 52 | 53 | #. module: mrp_bom_structure_xlsx 54 | #. odoo-python 55 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 56 | #, python-format 57 | msgid "Product Name" 58 | msgstr "" 59 | 60 | #. module: mrp_bom_structure_xlsx 61 | #. odoo-python 62 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 63 | #, python-format 64 | msgid "Product Reference" 65 | msgstr "" 66 | 67 | #. module: mrp_bom_structure_xlsx 68 | #. odoo-python 69 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 70 | #, python-format 71 | msgid "Quantity" 72 | msgstr "Menge" 73 | 74 | #. module: mrp_bom_structure_xlsx 75 | #. odoo-python 76 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 77 | #, python-format 78 | msgid "Reference" 79 | msgstr "" 80 | 81 | #. module: mrp_bom_structure_xlsx 82 | #. odoo-python 83 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 84 | #, python-format 85 | msgid "Unit of Measure" 86 | msgstr "" 87 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/report/flattened_bom_xlsx.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 ForgeFlow S.L. 2 | # (http://www.forgeflow.com) 3 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 4 | 5 | from odoo import models 6 | 7 | 8 | class FlattenedBomXlsx(models.AbstractModel): 9 | _name = "report.mrp_flattened_bom_xlsx.flattened_bom_xlsx" 10 | _inherit = "report.report_xlsx.abstract" 11 | _description = "Flattened BOM XLSX" 12 | 13 | def print_flattened_bom_lines(self, bom, requirements, sheet, row): 14 | i = row 15 | sheet.write(i, 0, bom.product_tmpl_id.name or "") 16 | sheet.write(i, 1, bom.code or "") 17 | sheet.write(i, 2, bom.display_name or "") 18 | sheet.write(i, 3, bom.product_qty) 19 | sheet.write(i, 4, bom.product_uom_id.name or "") 20 | sheet.write(i, 5, bom.code or "") 21 | i += 1 22 | for product, total_qty in requirements.items(): 23 | sheet.write(i, 1, product.default_code or "") 24 | sheet.write(i, 2, product.display_name or "") 25 | sheet.write(i, 3, total_qty or 0.0) 26 | sheet.write(i, 4, product.uom_id.name or "") 27 | sheet.write(i, 5, product.code or "") 28 | i += 1 29 | return i 30 | 31 | def generate_xlsx_report(self, workbook, data, objects): 32 | workbook.set_properties( 33 | {"comments": "Created with Python and XlsxWriter from Odoo 11.0"} 34 | ) 35 | sheet = workbook.add_worksheet(self.env._("Flattened BOM")) 36 | sheet.set_landscape() 37 | sheet.fit_to_pages(1, 0) 38 | sheet.set_zoom(80) 39 | sheet.set_column(0, 0, 40) 40 | sheet.set_column(1, 2, 20) 41 | sheet.set_column(3, 3, 40) 42 | sheet.set_column(4, 6, 20) 43 | title_style = workbook.add_format( 44 | {"bold": True, "bg_color": "#FFFFCC", "bottom": 1} 45 | ) 46 | sheet_title = [ 47 | self.env._("BOM Name"), 48 | self.env._("Product Reference"), 49 | self.env._("Product Name"), 50 | self.env._("Quantity"), 51 | self.env._("Unit of Measure"), 52 | self.env._("Reference"), 53 | ] 54 | sheet.set_row(0, None, None, {"collapsed": 1}) 55 | sheet.write_row(1, 0, sheet_title, title_style) 56 | sheet.freeze_panes(2, 0) 57 | i = 2 58 | 59 | for o in objects: 60 | # We need to calculate the totals for the BoM qty and UoM: 61 | starting_factor = o.product_uom_id._compute_quantity( 62 | o.product_qty, o.product_tmpl_id.uom_id, round=False 63 | ) 64 | totals = o._get_flattened_totals(factor=starting_factor) 65 | i = self.print_flattened_bom_lines(o, totals, sheet, i) 66 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_structure_xlsx 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 14.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-05-18 16:44+0000\n" 10 | "Last-Translator: Francesco Foresti \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.16.4\n" 18 | 19 | #. module: mrp_bom_structure_xlsx 20 | #. odoo-python 21 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 22 | #, python-format 23 | msgid "BOM Name" 24 | msgstr "Nome DiBa" 25 | 26 | #. module: mrp_bom_structure_xlsx 27 | #. odoo-python 28 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 29 | #, python-format 30 | msgid "BOM Structure" 31 | msgstr "Struttura DiBa" 32 | 33 | #. module: mrp_bom_structure_xlsx 34 | #: model:ir.model,name:mrp_bom_structure_xlsx.model_report_mrp_bom_structure_xlsx_bom_structure_xlsx 35 | msgid "BOM Structure XLSX Report" 36 | msgstr "Resoconto XLSX struttura DiBa" 37 | 38 | #. module: mrp_bom_structure_xlsx 39 | #: model:ir.actions.report,name:mrp_bom_structure_xlsx.bom_structure_xlsx 40 | msgid "Export BoM Structure to Excel" 41 | msgstr "Esporta struttura DiBa in Excel" 42 | 43 | #. module: mrp_bom_structure_xlsx 44 | #. odoo-python 45 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 46 | #, python-format 47 | msgid "Level" 48 | msgstr "Livello" 49 | 50 | #. module: mrp_bom_structure_xlsx 51 | #. odoo-python 52 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 53 | #, python-format 54 | msgid "Product Name" 55 | msgstr "Nome prodotto" 56 | 57 | #. module: mrp_bom_structure_xlsx 58 | #. odoo-python 59 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 60 | #, python-format 61 | msgid "Product Reference" 62 | msgstr "Riferimento prodotto" 63 | 64 | #. module: mrp_bom_structure_xlsx 65 | #. odoo-python 66 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 67 | #, python-format 68 | msgid "Quantity" 69 | msgstr "Quantità" 70 | 71 | #. module: mrp_bom_structure_xlsx 72 | #. odoo-python 73 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 74 | #, python-format 75 | msgid "Reference" 76 | msgstr "Riferimento" 77 | 78 | #. module: mrp_bom_structure_xlsx 79 | #. odoo-python 80 | #: code:addons/mrp_bom_structure_xlsx/report/bom_structure_xlsx.py:0 81 | #, python-format 82 | msgid "Unit of Measure" 83 | msgstr "Unità di misura" 84 | 85 | #~ msgid "Display Name" 86 | #~ msgstr "Nome visualizzato" 87 | 88 | #~ msgid "ID" 89 | #~ msgstr "ID" 90 | 91 | #~ msgid "Last Modified on" 92 | #~ msgstr "Ultima modifica il" 93 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "0 12 * * 0" 6 | 7 | jobs: 8 | stale: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Stale PRs and issues policy 12 | uses: actions/stale@v9 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | # General settings. 16 | ascending: true 17 | remove-stale-when-updated: true 18 | # Pull Requests settings. 19 | # 120+30 day stale policy for PRs 20 | # * Except PRs marked as "no stale" 21 | days-before-pr-stale: 120 22 | days-before-pr-close: 30 23 | exempt-pr-labels: "no stale" 24 | stale-pr-label: "stale" 25 | stale-pr-message: > 26 | There hasn't been any activity on this pull request in the past 4 months, so 27 | it has been marked as stale and it will be closed automatically if no 28 | further activity occurs in the next 30 days. 29 | 30 | If you want this PR to never become stale, please ask a PSC member to apply 31 | the "no stale" label. 32 | # Issues settings. 33 | # 180+30 day stale policy for open issues 34 | # * Except Issues marked as "no stale" 35 | days-before-issue-stale: 180 36 | days-before-issue-close: 30 37 | exempt-issue-labels: "no stale,needs more information" 38 | stale-issue-label: "stale" 39 | stale-issue-message: > 40 | There hasn't been any activity on this issue in the past 6 months, so it has 41 | been marked as stale and it will be closed automatically if no further 42 | activity occurs in the next 30 days. 43 | 44 | If you want this issue to never become stale, please ask a PSC member to 45 | apply the "no stale" label. 46 | 47 | # 15+30 day stale policy for issues pending more information 48 | # * Issues that are pending more information 49 | # * Except Issues marked as "no stale" 50 | - name: Needs more information stale issues policy 51 | uses: actions/stale@v9 52 | with: 53 | repo-token: ${{ secrets.GITHUB_TOKEN }} 54 | ascending: true 55 | only-labels: "needs more information" 56 | exempt-issue-labels: "no stale" 57 | days-before-stale: 15 58 | days-before-close: 30 59 | days-before-pr-stale: -1 60 | days-before-pr-close: -1 61 | remove-stale-when-updated: true 62 | stale-issue-label: "stale" 63 | stale-issue-message: > 64 | This issue needs more information and there hasn't been any activity 65 | recently, so it has been marked as stale and it will be closed automatically 66 | if no further activity occurs in the next 30 days. 67 | 68 | If you think this is a mistake, please ask a PSC member to remove the "needs 69 | more information" label. 70 | -------------------------------------------------------------------------------- /.pylintrc-mandatory: -------------------------------------------------------------------------------- 1 | 2 | [MASTER] 3 | load-plugins=pylint_odoo 4 | score=n 5 | 6 | [ODOOLINT] 7 | readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" 8 | manifest-required-authors=Odoo Community Association (OCA) 9 | manifest-required-keys=license 10 | manifest-deprecated-keys=description,active 11 | license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 12 | valid-odoo-versions=18.0 13 | 14 | [MESSAGES CONTROL] 15 | disable=all 16 | 17 | enable=anomalous-backslash-in-string, 18 | api-one-deprecated, 19 | api-one-multi-together, 20 | assignment-from-none, 21 | attribute-deprecated, 22 | class-camelcase, 23 | dangerous-default-value, 24 | dangerous-view-replace-wo-priority, 25 | development-status-allowed, 26 | duplicate-id-csv, 27 | duplicate-key, 28 | duplicate-xml-fields, 29 | duplicate-xml-record-id, 30 | eval-referenced, 31 | eval-used, 32 | incoherent-interpreter-exec-perm, 33 | license-allowed, 34 | manifest-author-string, 35 | manifest-deprecated-key, 36 | manifest-required-author, 37 | manifest-required-key, 38 | manifest-version-format, 39 | method-compute, 40 | method-inverse, 41 | method-required-super, 42 | method-search, 43 | openerp-exception-warning, 44 | pointless-statement, 45 | pointless-string-statement, 46 | print-used, 47 | redundant-keyword-arg, 48 | redundant-modulename-xml, 49 | reimported, 50 | relative-import, 51 | return-in-init, 52 | rst-syntax-error, 53 | sql-injection, 54 | too-few-format-args, 55 | translation-field, 56 | translation-required, 57 | unreachable, 58 | use-vim-comment, 59 | wrong-tabs-instead-of-spaces, 60 | xml-syntax-error, 61 | attribute-string-redundant, 62 | character-not-valid-in-resource-link, 63 | consider-merging-classes-inherited, 64 | context-overridden, 65 | create-user-wo-reset-password, 66 | dangerous-filter-wo-user, 67 | dangerous-qweb-replace-wo-priority, 68 | deprecated-data-xml-node, 69 | deprecated-openerp-xml-node, 70 | duplicate-po-message-definition, 71 | except-pass, 72 | file-not-used, 73 | invalid-commit, 74 | manifest-maintainers-list, 75 | missing-newline-extrafiles, 76 | missing-readme, 77 | missing-return, 78 | odoo-addons-relative-import, 79 | old-api7-method-defined, 80 | po-msgstr-variables, 81 | po-syntax-error, 82 | renamed-field-parameter, 83 | resource-not-exist, 84 | str-format-used, 85 | test-folder-imported, 86 | translation-contains-variable, 87 | translation-positional-used, 88 | unnecessary-utf8-coding-comment, 89 | website-manifest-key-not-valid-uri, 90 | xml-attribute-translatable, 91 | xml-deprecated-qweb-directive, 92 | xml-deprecated-tree-attribute, 93 | external-request-timeout 94 | 95 | [REPORTS] 96 | msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} 97 | output-format=colorized 98 | reports=no 99 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_matrix_report 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 13.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2023-05-17 14:35+0000\n" 10 | "Last-Translator: mymage \n" 11 | "Language-Team: none\n" 12 | "Language: it\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 4.14.1\n" 18 | 19 | #. module: mrp_bom_matrix_report 20 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__count_parent_usage 21 | msgid "# Uses in Parent" 22 | msgstr "N° utenti nel padre" 23 | 24 | #. module: mrp_bom_matrix_report 25 | #: model:ir.actions.act_window,name:mrp_bom_matrix_report.action_mrp_bom_matrix_report 26 | #: model:ir.ui.menu,name:mrp_bom_matrix_report.menu_mrp_bom_matrix_report 27 | msgid "BOM Matrix" 28 | msgstr "Matrice DiBa" 29 | 30 | #. module: mrp_bom_matrix_report 31 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__component_id 32 | msgid "Component Product" 33 | msgstr "Prodotto componente" 34 | 35 | #. module: mrp_bom_matrix_report 36 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__display_name 37 | msgid "Display Name" 38 | msgstr "Nome visualizzato" 39 | 40 | #. module: mrp_bom_matrix_report 41 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__id 42 | msgid "ID" 43 | msgstr "ID" 44 | 45 | #. module: mrp_bom_matrix_report 46 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report____last_update 47 | msgid "Last Modified on" 48 | msgstr "Ultima modifica il" 49 | 50 | #. module: mrp_bom_matrix_report 51 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report__form_view 52 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report_pivot 53 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report_tree_view 54 | msgid "MRP BOM Matrix Report" 55 | msgstr "Resoconto matrice DiBa MRP" 56 | 57 | #. module: mrp_bom_matrix_report 58 | #: model:ir.model,name:mrp_bom_matrix_report.model_mrp_bom_matrix_report 59 | msgid "MRP BoM Matrix Report" 60 | msgstr "Resoconto matrice DiBa MRP" 61 | 62 | #. module: mrp_bom_matrix_report 63 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__parent_category_id 64 | msgid "Parent Product Category" 65 | msgstr "Categoria prodotto padre" 66 | 67 | #. module: mrp_bom_matrix_report 68 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__parent_template_id 69 | msgid "Parent Product Template" 70 | msgstr "Modello prodotto padre" 71 | 72 | #. module: mrp_bom_matrix_report 73 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report_search_view 74 | msgid "Report MRP BOM Matrix" 75 | msgstr "Resoconto matrice DiBa MRP" 76 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018-20 ForgeFlow S.L. (https://www.forgeflow.com) 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | 4 | import logging 5 | 6 | from odoo import models 7 | from odoo.tools.translate import _ 8 | 9 | _logger = logging.getLogger(__name__) 10 | 11 | 12 | class ReportMrpBomCurrentStockXlsx(models.AbstractModel): 13 | _name = "report.mrp_bom_current_stock.report_mrpbom_current_stock_xlsx" 14 | _inherit = "report.report_xlsx.abstract" 15 | _description = "MRP BOM Current Stock XLSX Report" 16 | 17 | @staticmethod 18 | def _print_bom_children(ch, sheet, row): 19 | i = row 20 | sheet.write(i, 0, ch.bom_level or "") 21 | sheet.write(i, 1, ch.bom_line.bom_id.code or "") 22 | sheet.write(i, 2, ch.product_id.product_tmpl_id.display_name or "") 23 | sheet.write(i, 3, ch.product_qty or "") 24 | sheet.write(i, 4, ch.qty_available_in_source_loc or 0.0) 25 | sheet.write(i, 5, ch.product_uom_id.name or "") 26 | sheet.write(i, 6, ch.location_id.name or "") 27 | sheet.write(i, 7, ch.bom_id.code or "") 28 | sheet.write(i, 8, ch.bom_id.product_tmpl_id.display_name or "") 29 | i += 1 30 | return i 31 | 32 | def generate_xlsx_report(self, workbook, data, objects): 33 | workbook.set_properties( 34 | {"comments": "Created with Python and XlsxWriter from Odoo 11.0"} 35 | ) 36 | sheet = workbook.add_worksheet(_("BOM Current Stock Report")) 37 | sheet.set_landscape() 38 | sheet.fit_to_pages(1, 0) 39 | sheet.set_zoom(80) 40 | sheet.set_column(0, 0, 5) 41 | sheet.set_column(1, 2, 40) 42 | sheet.set_column(3, 3, 10) 43 | sheet.set_column(4, 4, 20) 44 | sheet.set_column(5, 5, 7) 45 | sheet.set_column(6, 6, 20) 46 | sheet.set_column(7, 8, 40) 47 | 48 | title_style = workbook.add_format( 49 | {"bold": True, "bg_color": "#FFFFCC", "bottom": 1} 50 | ) 51 | sheet_title = [ 52 | _("Level"), 53 | _("BoM Reference"), 54 | _("Product Reference"), 55 | _("Quantity"), 56 | _("Qty Available (Location)"), 57 | _("UoM"), 58 | _("Location"), 59 | _("Parent BoM Ref"), 60 | _("Parent Product Ref"), 61 | ] 62 | sheet.set_row(0, None, None, {"collapsed": 1}) 63 | sheet.write_row(1, 0, sheet_title, title_style) 64 | sheet.freeze_panes(2, 0) 65 | bold = workbook.add_format({"bold": True}) 66 | 67 | i = 2 68 | for o in objects: 69 | sheet.write(i, 0, "0", bold) 70 | sheet.write(i, 1, o.bom_id.code or "", bold) 71 | sheet.write(i, 2, o.product_tmpl_id.name or "", bold) 72 | 73 | sheet.write(i, 3, o.product_qty or "", bold) 74 | sheet.write(i, 5, o.product_uom_id.name or "", bold) 75 | sheet.write(i, 6, o.location_id.name or "", bold) 76 | i += 1 77 | for ch in o.line_ids: 78 | i = self._print_bom_children(ch, sheet, i) 79 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/reports/mrp_bom_matrix_report_views.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mrp.bom.matrix.report.form 5 | mrp.bom.matrix.report 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 | 20 | mrp.bom.matrix.report.tree 21 | mrp.bom.matrix.report 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | mrp.bom.matrix.report.pivot 33 | mrp.bom.matrix.report 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | mrp.bom.matrix.report.search 44 | mrp.bom.matrix.report 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | BOM Matrix 56 | mrp.bom.matrix.report 57 | list,form,pivot 58 | 59 | 60 | 61 | 67 |
68 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/i18n/fr.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_matrix_report 4 | # 5 | # Translators: 6 | # Quentin THEURET , 2018 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Odoo Server 11.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2018-02-15 03:40+0000\n" 12 | "PO-Revision-Date: 2018-02-15 03:40+0000\n" 13 | "Last-Translator: Quentin THEURET , 2018\n" 14 | "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" 15 | "Language: fr\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: \n" 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 20 | 21 | #. module: mrp_bom_matrix_report 22 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__count_parent_usage 23 | msgid "# Uses in Parent" 24 | msgstr "# Utilisés dans le parent" 25 | 26 | #. module: mrp_bom_matrix_report 27 | #: model:ir.actions.act_window,name:mrp_bom_matrix_report.action_mrp_bom_matrix_report 28 | #: model:ir.ui.menu,name:mrp_bom_matrix_report.menu_mrp_bom_matrix_report 29 | msgid "BOM Matrix" 30 | msgstr "Matrice de nomenclature" 31 | 32 | #. module: mrp_bom_matrix_report 33 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__component_id 34 | msgid "Component Product" 35 | msgstr "Produit composant" 36 | 37 | #. module: mrp_bom_matrix_report 38 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__display_name 39 | msgid "Display Name" 40 | msgstr "Nom affiché" 41 | 42 | #. module: mrp_bom_matrix_report 43 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__id 44 | msgid "ID" 45 | msgstr "ID" 46 | 47 | #. module: mrp_bom_matrix_report 48 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report____last_update 49 | msgid "Last Modified on" 50 | msgstr "Dernière modification le" 51 | 52 | #. module: mrp_bom_matrix_report 53 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report__form_view 54 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report_pivot 55 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report_tree_view 56 | msgid "MRP BOM Matrix Report" 57 | msgstr "Rapport des matrices de nomenclatures" 58 | 59 | #. module: mrp_bom_matrix_report 60 | #: model:ir.model,name:mrp_bom_matrix_report.model_mrp_bom_matrix_report 61 | #, fuzzy 62 | msgid "MRP BoM Matrix Report" 63 | msgstr "Rapport des matrices de nomenclatures" 64 | 65 | #. module: mrp_bom_matrix_report 66 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__parent_category_id 67 | msgid "Parent Product Category" 68 | msgstr "Catégorie du produit parent" 69 | 70 | #. module: mrp_bom_matrix_report 71 | #: model:ir.model.fields,field_description:mrp_bom_matrix_report.field_mrp_bom_matrix_report__parent_template_id 72 | msgid "Parent Product Template" 73 | msgstr "Modèle du produit parent" 74 | 75 | #. module: mrp_bom_matrix_report 76 | #: model_terms:ir.ui.view,arch_db:mrp_bom_matrix_report.mrp_bom_matrix_report_search_view 77 | msgid "Report MRP BOM Matrix" 78 | msgstr "Rapport des matrices de nomenclatures" 79 | 80 | #~ msgid "mrp.bom.matrix.report" 81 | #~ msgstr "mrp.bom.matrix.report" 82 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/report/bom_structure_xlsx.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017-19 ForgeFlow S.L. (https://www.forgeflow.com) 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | 4 | import logging 5 | 6 | from odoo import _, models 7 | from odoo.exceptions import CacheMiss 8 | 9 | _logger = logging.getLogger(__name__) 10 | 11 | 12 | class BomStructureXlsx(models.AbstractModel): 13 | _name = "report.mrp_bom_structure_xlsx.bom_structure_xlsx" 14 | _description = "BOM Structure XLSX Report" 15 | _inherit = "report.report_xlsx.abstract" 16 | 17 | def print_bom_children(self, ch, sheet, row, level): 18 | i, j = row, level 19 | j += 1 20 | sheet.write(i, 1, "> " * j) 21 | sheet.write(i, 2, ch.product_id.default_code or "") 22 | sheet.write(i, 3, ch.product_id.display_name or "") 23 | sheet.write( 24 | i, 25 | 4, 26 | ch.product_uom_id._compute_quantity(ch.product_qty, ch.product_id.uom_id) 27 | or "", 28 | ) 29 | sheet.write(i, 5, ch.product_id.uom_id.name or "") 30 | sheet.write(i, 6, ch.bom_id.code or "") 31 | i += 1 32 | # self.env.cache.invalidate() 33 | try: 34 | for child in ch.child_line_ids: 35 | i = self.print_bom_children(child, sheet, i, j) 36 | except CacheMiss as e: 37 | # The Bom has no childs, thus it is the last level. 38 | # When a BoM has no childs, chlid_line_ids is None, this creates a 39 | # CacheMiss Error. However, this is expected because there really 40 | # cannot be child_line_ids. 41 | _logger.warning(e) 42 | 43 | j -= 1 44 | return i 45 | 46 | def generate_xlsx_report(self, workbook, data, objects): 47 | workbook.set_properties( 48 | {"comments": "Created with Python and XlsxWriter from Odoo 11.0"} 49 | ) 50 | sheet = workbook.add_worksheet(_("BOM Structure")) 51 | sheet.set_landscape() 52 | sheet.fit_to_pages(1, 0) 53 | sheet.set_zoom(80) 54 | sheet.set_column(0, 0, 40) 55 | sheet.set_column(1, 2, 20) 56 | sheet.set_column(3, 3, 40) 57 | sheet.set_column(4, 6, 20) 58 | bold = workbook.add_format({"bold": True}) 59 | title_style = workbook.add_format( 60 | {"bold": True, "bg_color": "#FFFFCC", "bottom": 1} 61 | ) 62 | sheet_title = [ 63 | _("BOM Name"), 64 | _("Level"), 65 | _("Product Reference"), 66 | _("Product Name"), 67 | _("Quantity"), 68 | _("Unit of Measure"), 69 | _("Reference"), 70 | ] 71 | sheet.set_row(0, None, None, {"collapsed": 1}) 72 | sheet.write_row(1, 0, sheet_title, title_style) 73 | sheet.freeze_panes(2, 0) 74 | i = 2 75 | for o in objects: 76 | sheet.write(i, 0, o.product_tmpl_id.name or "", bold) 77 | sheet.write(i, 1, "", bold) 78 | sheet.write(i, 2, o.product_id.default_code or "", bold) 79 | sheet.write(i, 3, o.product_id.name or "", bold) 80 | sheet.write(i, 4, o.product_qty, bold) 81 | sheet.write(i, 5, o.product_uom_id.name or "", bold) 82 | sheet.write(i, 6, o.code or "", bold) 83 | i += 1 84 | j = 0 85 | for ch in o.bom_line_ids: 86 | i = self.print_bom_children(ch, sheet, i, j) 87 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/README.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | MRP BOM Matrix Report 3 | ===================== 4 | 5 | .. 6 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 7 | !! This file is generated by oca-gen-addon-readme !! 8 | !! changes will be overwritten. !! 9 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 10 | !! source digest: sha256:8c16bd0c5e9233970bf958ce223c1cdc8d1cb7d707971751c922f0f0c950166b 11 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 12 | 13 | .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png 14 | :target: https://odoo-community.org/page/development-status 15 | :alt: Beta 16 | .. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png 17 | :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html 18 | :alt: License: LGPL-3 19 | .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture--reporting-lightgray.png?logo=github 20 | :target: https://github.com/OCA/manufacture-reporting/tree/18.0/mrp_bom_matrix_report 21 | :alt: OCA/manufacture-reporting 22 | .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png 23 | :target: https://translation.odoo-community.org/projects/manufacture-reporting-18-0/manufacture-reporting-18-0-mrp_bom_matrix_report 24 | :alt: Translate me on Weblate 25 | .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png 26 | :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture-reporting&target_branch=18.0 27 | :alt: Try me on Runboat 28 | 29 | |badge1| |badge2| |badge3| |badge4| |badge5| 30 | 31 | The Matrix Bill of Materials is a report that shows connections between 32 | all parents and all components. 33 | 34 | This report helps to identify the products that are used in lots of 35 | assemblies or finished products. 36 | 37 | If a raw material/assembly is used in many parent assemblies/finished 38 | products, it is likely that you'd want to make sure that you never run 39 | out of it. 40 | 41 | **Table of contents** 42 | 43 | .. contents:: 44 | :local: 45 | 46 | Usage 47 | ===== 48 | 49 | - Go to *Manufacturing > Reporting > BOM Matrix*. 50 | 51 | Bug Tracker 52 | =========== 53 | 54 | Bugs are tracked on `GitHub Issues `_. 55 | In case of trouble, please check there if your issue has already been reported. 56 | If you spotted it first, help us to smash it by providing a detailed and welcomed 57 | `feedback `_. 58 | 59 | Do not contact contributors directly about support or help with technical issues. 60 | 61 | Credits 62 | ======= 63 | 64 | Authors 65 | ------- 66 | 67 | * ForgeFlow 68 | 69 | Contributors 70 | ------------ 71 | 72 | - Jordi Ballester 73 | - Lois Rilo 74 | - Pimolnat Suntian 75 | 76 | Maintainers 77 | ----------- 78 | 79 | This module is maintained by the OCA. 80 | 81 | .. image:: https://odoo-community.org/logo.png 82 | :alt: Odoo Community Association 83 | :target: https://odoo-community.org 84 | 85 | OCA, or the Odoo Community Association, is a nonprofit organization whose 86 | mission is to support the collaborative development of Odoo features and 87 | promote its widespread use. 88 | 89 | This module is part of the `OCA/manufacture-reporting `_ project on GitHub. 90 | 91 | You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. 92 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/README.rst: -------------------------------------------------------------------------------- 1 | .. image:: https://odoo-community.org/readme-banner-image 2 | :target: https://odoo-community.org/get-involved?utm_source=readme 3 | :alt: Odoo Community Association 4 | 5 | ===================== 6 | MRP BoM Current Stock 7 | ===================== 8 | 9 | .. 10 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 11 | !! This file is generated by oca-gen-addon-readme !! 12 | !! changes will be overwritten. !! 13 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 14 | !! source digest: sha256:e20bec6aacfde89a29c705487b42542d7fb0de9d14d2bead9bf024d82c0fc752 15 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 16 | 17 | .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png 18 | :target: https://odoo-community.org/page/development-status 19 | :alt: Beta 20 | .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png 21 | :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html 22 | :alt: License: AGPL-3 23 | .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture--reporting-lightgray.png?logo=github 24 | :target: https://github.com/OCA/manufacture-reporting/tree/18.0/mrp_bom_current_stock 25 | :alt: OCA/manufacture-reporting 26 | .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png 27 | :target: https://translation.odoo-community.org/projects/manufacture-reporting-18-0/manufacture-reporting-18-0-mrp_bom_current_stock 28 | :alt: Translate me on Weblate 29 | .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png 30 | :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture-reporting&target_branch=18.0 31 | :alt: Try me on Runboat 32 | 33 | |badge1| |badge2| |badge3| |badge4| |badge5| 34 | 35 | This modules extend the Manufacturing App adding a report that explodes 36 | the bill of materials and show the stock available in the source 37 | location. 38 | 39 | **Table of contents** 40 | 41 | .. contents:: 42 | :local: 43 | 44 | Usage 45 | ===== 46 | 47 | To use this module, you need to: 48 | 49 | 1. Go to *Manufacturing > Reporting > BoM Current Stock Explosion*. 50 | 2. Select Product, BoM and location and click on *Explode*. 51 | 3. Set the proper location (if desired) for all the components displayed 52 | if you haven't done so in the related BoMs. 53 | 4. Click *Print Report*. 54 | 55 | Bug Tracker 56 | =========== 57 | 58 | Bugs are tracked on `GitHub Issues `_. 59 | In case of trouble, please check there if your issue has already been reported. 60 | If you spotted it first, help us to smash it by providing a detailed and welcomed 61 | `feedback `_. 62 | 63 | Do not contact contributors directly about support or help with technical issues. 64 | 65 | Credits 66 | ======= 67 | 68 | Authors 69 | ------- 70 | 71 | * ForgeFlow 72 | 73 | Contributors 74 | ------------ 75 | 76 | - Lois Rilo 77 | - Héctor Villarreal 78 | - Dhara Solanki 79 | 80 | Maintainers 81 | ----------- 82 | 83 | This module is maintained by the OCA. 84 | 85 | .. image:: https://odoo-community.org/logo.png 86 | :alt: Odoo Community Association 87 | :target: https://odoo-community.org 88 | 89 | OCA, or the Odoo Community Association, is a nonprofit organization whose 90 | mission is to support the collaborative development of Odoo features and 91 | promote its widespread use. 92 | 93 | This module is part of the `OCA/manufacture-reporting `_ project on GitHub. 94 | 95 | You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. 96 | -------------------------------------------------------------------------------- /mrp_bom_structure_xlsx/README.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | MRP BOM Structure XLSX 3 | ====================== 4 | 5 | .. 6 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 7 | !! This file is generated by oca-gen-addon-readme !! 8 | !! changes will be overwritten. !! 9 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 10 | !! source digest: sha256:7b8b08cd8d3b512fae2b1cc40cb12682e9b278ea5f9ad26492817eb83eaed983 11 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 12 | 13 | .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png 14 | :target: https://odoo-community.org/page/development-status 15 | :alt: Beta 16 | .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png 17 | :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html 18 | :alt: License: AGPL-3 19 | .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture--reporting-lightgray.png?logo=github 20 | :target: https://github.com/OCA/manufacture-reporting/tree/18.0/mrp_bom_structure_xlsx 21 | :alt: OCA/manufacture-reporting 22 | .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png 23 | :target: https://translation.odoo-community.org/projects/manufacture-reporting-18-0/manufacture-reporting-18-0-mrp_bom_structure_xlsx 24 | :alt: Translate me on Weblate 25 | .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png 26 | :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture-reporting&target_branch=18.0 27 | :alt: Try me on Runboat 28 | 29 | |badge1| |badge2| |badge3| |badge4| |badge5| 30 | 31 | This module extends the functionality of the MRP capabilities of Odoo, 32 | and allow you to export the BoM structure to MS Excel .XLSX format. 33 | 34 | **Table of contents** 35 | 36 | .. contents:: 37 | :local: 38 | 39 | Installation 40 | ============ 41 | 42 | To install this module, you need to: 43 | 44 | 1. Go to apps 45 | 2. Look for mrp_bom_structure_xlsx module 46 | 3. Click install 47 | 48 | Usage 49 | ===== 50 | 51 | To use this module, you need to: 52 | 53 | Go to the Bill of Materials form or list views, press 'Print > Export 54 | BoM Structure to Excel'. 55 | 56 | Bug Tracker 57 | =========== 58 | 59 | Bugs are tracked on `GitHub Issues `_. 60 | In case of trouble, please check there if your issue has already been reported. 61 | If you spotted it first, help us to smash it by providing a detailed and welcomed 62 | `feedback `_. 63 | 64 | Do not contact contributors directly about support or help with technical issues. 65 | 66 | Credits 67 | ======= 68 | 69 | Authors 70 | ------- 71 | 72 | * ForgeFlow 73 | 74 | Contributors 75 | ------------ 76 | 77 | - Jordi Ballester 78 | 79 | - Miquel Raïch 80 | 81 | - Lois Rilo Antelo 82 | 83 | - Aaron Henriquez 84 | 85 | - Bhavesh Odedra 86 | 87 | - ``Tecnativa ``\ \_: 88 | 89 | - Víctor Martínez 90 | 91 | Maintainers 92 | ----------- 93 | 94 | This module is maintained by the OCA. 95 | 96 | .. image:: https://odoo-community.org/logo.png 97 | :alt: Odoo Community Association 98 | :target: https://odoo-community.org 99 | 100 | OCA, or the Odoo Community Association, is a nonprofit organization whose 101 | mission is to support the collaborative development of Odoo features and 102 | promote its widespread use. 103 | 104 | This module is part of the `OCA/manufacture-reporting `_ project on GitHub. 105 | 106 | You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. 107 | -------------------------------------------------------------------------------- /.pylintrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | [MASTER] 4 | load-plugins=pylint_odoo 5 | score=n 6 | 7 | [ODOOLINT] 8 | readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" 9 | manifest-required-authors=Odoo Community Association (OCA) 10 | manifest-required-keys=license 11 | manifest-deprecated-keys=description,active 12 | license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 13 | valid-odoo-versions=18.0 14 | 15 | [MESSAGES CONTROL] 16 | disable=all 17 | 18 | # This .pylintrc contains optional AND mandatory checks and is meant to be 19 | # loaded in an IDE to have it check everything, in the hope this will make 20 | # optional checks more visible to contributors who otherwise never look at a 21 | # green travis to see optional checks that failed. 22 | # .pylintrc-mandatory containing only mandatory checks is used the pre-commit 23 | # config as a blocking check. 24 | 25 | enable=anomalous-backslash-in-string, 26 | api-one-deprecated, 27 | api-one-multi-together, 28 | assignment-from-none, 29 | attribute-deprecated, 30 | class-camelcase, 31 | dangerous-default-value, 32 | dangerous-view-replace-wo-priority, 33 | development-status-allowed, 34 | duplicate-id-csv, 35 | duplicate-key, 36 | duplicate-xml-fields, 37 | duplicate-xml-record-id, 38 | eval-referenced, 39 | eval-used, 40 | incoherent-interpreter-exec-perm, 41 | license-allowed, 42 | manifest-author-string, 43 | manifest-deprecated-key, 44 | manifest-required-author, 45 | manifest-required-key, 46 | manifest-version-format, 47 | method-compute, 48 | method-inverse, 49 | method-required-super, 50 | method-search, 51 | openerp-exception-warning, 52 | pointless-statement, 53 | pointless-string-statement, 54 | print-used, 55 | redundant-keyword-arg, 56 | redundant-modulename-xml, 57 | reimported, 58 | relative-import, 59 | return-in-init, 60 | rst-syntax-error, 61 | sql-injection, 62 | too-few-format-args, 63 | translation-field, 64 | translation-required, 65 | unreachable, 66 | use-vim-comment, 67 | wrong-tabs-instead-of-spaces, 68 | xml-syntax-error, 69 | attribute-string-redundant, 70 | character-not-valid-in-resource-link, 71 | consider-merging-classes-inherited, 72 | context-overridden, 73 | create-user-wo-reset-password, 74 | dangerous-filter-wo-user, 75 | dangerous-qweb-replace-wo-priority, 76 | deprecated-data-xml-node, 77 | deprecated-openerp-xml-node, 78 | duplicate-po-message-definition, 79 | except-pass, 80 | file-not-used, 81 | invalid-commit, 82 | manifest-maintainers-list, 83 | missing-newline-extrafiles, 84 | missing-readme, 85 | missing-return, 86 | odoo-addons-relative-import, 87 | old-api7-method-defined, 88 | po-msgstr-variables, 89 | po-syntax-error, 90 | renamed-field-parameter, 91 | resource-not-exist, 92 | str-format-used, 93 | test-folder-imported, 94 | translation-contains-variable, 95 | translation-positional-used, 96 | unnecessary-utf8-coding-comment, 97 | website-manifest-key-not-valid-uri, 98 | xml-attribute-translatable, 99 | xml-deprecated-qweb-directive, 100 | xml-deprecated-tree-attribute, 101 | external-request-timeout, 102 | # messages that do not cause the lint step to fail 103 | consider-merging-classes-inherited, 104 | create-user-wo-reset-password, 105 | dangerous-filter-wo-user, 106 | deprecated-module, 107 | file-not-used, 108 | invalid-commit, 109 | missing-manifest-dependency, 110 | missing-newline-extrafiles, 111 | missing-readme, 112 | no-utf8-coding-comment, 113 | odoo-addons-relative-import, 114 | old-api7-method-defined, 115 | redefined-builtin, 116 | too-complex, 117 | unnecessary-utf8-coding-comment 118 | 119 | 120 | [REPORTS] 121 | msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} 122 | output-format=colorized 123 | reports=no 124 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/reports/mrp_bom_matrix_report.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com) 2 | # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). 3 | 4 | from odoo import api, fields, models 5 | 6 | 7 | class MrpBomMatrixReport(models.Model): 8 | _name = "mrp.bom.matrix.report" 9 | _description = "MRP BoM Matrix Report" 10 | _auto = False 11 | 12 | component_id = fields.Many2one( 13 | comodel_name="product.product", string="Component Product", readonly=True 14 | ) 15 | parent_template_id = fields.Many2one( 16 | comodel_name="product.template", string="Parent Product Template", readonly=True 17 | ) 18 | parent_category_id = fields.Many2one( 19 | comodel_name="product.category", 20 | string="Parent Product Category", 21 | store=True, 22 | readonly=True, 23 | ) 24 | count_parent_usage = fields.Integer(string="# Uses in Parent", readonly=True) 25 | 26 | @api.model 27 | def _select(self): 28 | select_str = """ 29 | SELECT min(l.id) as id, l.product_id as component_id, 30 | p.product_tmpl_id as parent_template_id, 31 | CASE WHEN min(q.count_parent_usage) is null 32 | THEN 1 33 | ELSE min(q.count_parent_usage) 34 | END as count_parent_usage, 35 | pt.categ_id as parent_category_id 36 | """ 37 | return select_str 38 | 39 | @api.model 40 | def _from(self): 41 | # In this part we search recursively for the top parent product for 42 | # all the BOMs where the component is used. 43 | from_str = """ 44 | FROM mrp_bom_line as l 45 | INNER JOIN mrp_bom p 46 | ON p.id = l.bom_id 47 | INNER JOIN product_template pt 48 | on pt.id = p.product_tmpl_id 49 | LEFT JOIN ( 50 | WITH RECURSIVE tree(child, child_name, root, root_name) AS ( 51 | WITH cte1 AS ( 52 | SELECT pt1.id as child_id, 53 | pt2.id as parent_id, 54 | pt1.name as child_name, 55 | pt2.name as parent_name 56 | FROM mrp_bom_line as l 57 | INNER JOIN product_product as pr 58 | ON pr.id = l.product_id 59 | INNER JOIN product_template as pt1 60 | ON pt1.id = pr.product_tmpl_id 61 | INNER JOIN mrp_bom as p1 62 | ON p1.id = l.bom_id 63 | INNER JOIN product_template as pt2 64 | ON pt2.id = p1.product_tmpl_id) 65 | 66 | SELECT c.child_id, 67 | c.child_name, 68 | c.parent_id, 69 | c.parent_name 70 | FROM cte1 as c 71 | LEFT JOIN cte1 as p 72 | ON c.parent_id = p.child_id 73 | WHERE p.child_id IS NULL 74 | UNION 75 | SELECT cte1.child_id, cte1.child_name, root, root_name 76 | FROM tree 77 | INNER JOIN cte1 on tree.child = cte1.parent_id) 78 | 79 | SELECT child, count(root_name) as count_parent_usage 80 | FROM tree 81 | group by child) as q 82 | ON q.child = p.product_tmpl_id 83 | """ 84 | return from_str 85 | 86 | @api.model 87 | def _group_by(self): 88 | group_by_str = """ 89 | GROUP BY l.product_id, 90 | p.product_tmpl_id, 91 | pt.categ_id 92 | """ 93 | return group_by_str 94 | 95 | @api.model 96 | def _where(self): 97 | where_str = """""" 98 | return where_str 99 | 100 | @property 101 | def _table_query(self): 102 | return f"""{self._select()}{self._from()} {self._where()}{self._group_by()}""" 103 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/README.rst: -------------------------------------------------------------------------------- 1 | ============================= 2 | Export Flattened BOM to Excel 3 | ============================= 4 | 5 | .. 6 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 7 | !! This file is generated by oca-gen-addon-readme !! 8 | !! changes will be overwritten. !! 9 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 10 | !! source digest: sha256:d4e122de82fc05d5d87a55e7c38dbb05ca83fe470f4a3770a917626d207ca551 11 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 12 | 13 | .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png 14 | :target: https://odoo-community.org/page/development-status 15 | :alt: Beta 16 | .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png 17 | :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html 18 | :alt: License: AGPL-3 19 | .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture--reporting-lightgray.png?logo=github 20 | :target: https://github.com/OCA/manufacture-reporting/tree/18.0/mrp_flattened_bom_xlsx 21 | :alt: OCA/manufacture-reporting 22 | .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png 23 | :target: https://translation.odoo-community.org/projects/manufacture-reporting-18-0/manufacture-reporting-18-0-mrp_flattened_bom_xlsx 24 | :alt: Translate me on Weblate 25 | .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png 26 | :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture-reporting&target_branch=18.0 27 | :alt: Try me on Runboat 28 | 29 | |badge1| |badge2| |badge3| |badge4| |badge5| 30 | 31 | This module extends the functionality of the MRP capabilities of Odoo, 32 | and allows you to export the flattened BOM to MS Excel .XLSX format. 33 | 34 | A flattened bill of material removes the intermediate levels in the BOM 35 | and connect the lowest levels directly to the highest level. 36 | 37 | A list of the sum of lowest levels will be shown for every BoM you 38 | export using this method. 39 | 40 | It also maintains units correctly across all nested BOM's and take units 41 | that have been defined in product Unit of Measure field. 42 | 43 | **Table of contents** 44 | 45 | .. contents:: 46 | :local: 47 | 48 | Usage 49 | ===== 50 | 51 | To use this module, you need to: 52 | 53 | 1. Go to 'Manufacturing / Products / Bill of Materials' 54 | 55 | 2. Select a BOM or more BOMS 56 | 57 | *(Could be interesting to modify quantities of these BOMs)* 58 | 59 | 3. Go to 'Print / Export Flattened BOM to Excel'. 60 | 61 | Bug Tracker 62 | =========== 63 | 64 | Bugs are tracked on `GitHub Issues `_. 65 | In case of trouble, please check there if your issue has already been reported. 66 | If you spotted it first, help us to smash it by providing a detailed and welcomed 67 | `feedback `_. 68 | 69 | Do not contact contributors directly about support or help with technical issues. 70 | 71 | Credits 72 | ======= 73 | 74 | Authors 75 | ------- 76 | 77 | * ForgeFlow 78 | 79 | Contributors 80 | ------------ 81 | 82 | - Héctor Villarreal 83 | - Lois Rilo 84 | - Joan Mateu 85 | - Dhara Solanki 86 | 87 | Maintainers 88 | ----------- 89 | 90 | This module is maintained by the OCA. 91 | 92 | .. image:: https://odoo-community.org/logo.png 93 | :alt: Odoo Community Association 94 | :target: https://odoo-community.org 95 | 96 | OCA, or the Odoo Community Association, is a nonprofit organization whose 97 | mission is to support the collaborative development of Odoo features and 98 | promote its widespread use. 99 | 100 | This module is part of the `OCA/manufacture-reporting `_ project on GitHub. 101 | 102 | You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. 103 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/wizard/bom_route_current_stock_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | mrp.bom.current.stock.form 7 | mrp.bom.current.stock 8 | 9 |
10 | 11 | 15 | 16 | 22 | 23 | 24 |
25 |
33 |
34 |
35 |
36 | 37 | mrp.bom.current.stock.form2 38 | mrp.bom.current.stock 39 | 40 |
41 | 42 |

Set the source location for every component.

45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 59 | 60 | 61 | 62 | 63 |
64 |
65 |
80 |
81 |
82 |
83 | 84 | BoM Current Stock Explosion 85 | mrp.bom.current.stock 86 | form 87 | new 88 | 89 | 95 |
96 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/tests/test_flattened_bom.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 ForgeFlow S.L. 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | 4 | from odoo.tests.common import TransactionCase 5 | 6 | 7 | class TestFlattenedBom(TransactionCase): 8 | @classmethod 9 | def setUpClass(cls): 10 | super().setUpClass() 11 | 12 | cls.product_obj = cls.env["product.product"] 13 | cls.bom_obj = cls.env["mrp.bom"] 14 | cls.bom_line_obj = cls.env["mrp.bom.line"] 15 | 16 | cls.uom_dozen = cls.env.ref("uom.product_uom_dozen") 17 | 18 | # Create products: 19 | cls.product_top = cls.product_obj.create( 20 | {"name": "Final Product", "is_storable": True, "standard_price": 300.0} 21 | ) 22 | cls.product_sub_1 = cls.product_obj.create( 23 | {"name": "L01-01", "is_storable": True, "standard_price": 300.0} 24 | ) 25 | cls.product_sub_2 = cls.product_obj.create( 26 | {"name": "L01-02", "is_storable": True, "standard_price": 300.0} 27 | ) 28 | cls.component_1 = cls.product_obj.create( 29 | {"name": "RM 01", "is_storable": True, "standard_price": 100.0} 30 | ) 31 | cls.component_2 = cls.product_obj.create( 32 | {"name": "RM 01", "is_storable": True, "standard_price": 75.0} 33 | ) 34 | cls.component_3 = cls.product_obj.create( 35 | {"name": "RM 03", "is_storable": True, "standard_price": 75.0} 36 | ) 37 | 38 | # Create Bills of Materials: 39 | cls.bom_top = cls.bom_obj.create( 40 | {"product_tmpl_id": cls.product_top.product_tmpl_id.id} 41 | ) 42 | cls.line_top_1 = cls.bom_line_obj.create( 43 | { 44 | "product_id": cls.product_sub_1.id, 45 | "bom_id": cls.bom_top.id, 46 | "product_qty": 2.0, 47 | } 48 | ) 49 | cls.line_top_2 = cls.bom_line_obj.create( 50 | { 51 | "product_id": cls.product_sub_2.id, 52 | "bom_id": cls.bom_top.id, 53 | "product_qty": 5.0, 54 | } 55 | ) 56 | 57 | cls.bom_sub_1 = cls.bom_obj.create( 58 | {"product_tmpl_id": cls.product_sub_1.product_tmpl_id.id} 59 | ) 60 | cls.line_sub_1_1 = cls.bom_line_obj.create( 61 | { 62 | "product_id": cls.component_1.id, 63 | "bom_id": cls.bom_sub_1.id, 64 | "product_qty": 2.0, 65 | } 66 | ) 67 | cls.line_sub_1_2 = cls.bom_line_obj.create( 68 | { 69 | "product_id": cls.component_2.id, 70 | "bom_id": cls.bom_sub_1.id, 71 | "product_qty": 5.0, 72 | } 73 | ) 74 | 75 | cls.bom_sub_2 = cls.bom_obj.create( 76 | {"product_tmpl_id": cls.product_sub_2.product_tmpl_id.id} 77 | ) 78 | cls.line_sub_2_1 = cls.bom_line_obj.create( 79 | { 80 | "product_id": cls.component_1.id, 81 | "bom_id": cls.bom_sub_2.id, 82 | "product_qty": 3.0, 83 | } 84 | ) 85 | cls.line_sub_2_2 = cls.bom_line_obj.create( 86 | { 87 | "product_id": cls.component_3.id, 88 | "bom_id": cls.bom_sub_2.id, 89 | "product_qty": 3.0, 90 | } 91 | ) 92 | 93 | def test_01_flattened_totals(self): 94 | """Test totals computation with a multi level BoM.""" 95 | flat_tot = self.bom_top._get_flattened_totals() 96 | self.assertEqual(len(flat_tot), 3) 97 | # Component 1 = 2*2 + 5*3 = 19 98 | self.assertEqual(flat_tot.get(self.component_1), 19) 99 | # Component 2 = 2*5 = 10 100 | self.assertEqual(flat_tot.get(self.component_2), 10) 101 | # Component 3 = 5*3 = 15 102 | self.assertEqual(flat_tot.get(self.component_3), 15) 103 | 104 | def test_02_different_uom(self): 105 | """Test totals computation with a multi level BoM and different UoM.""" 106 | self.bom_top.product_uom_id = self.uom_dozen 107 | self.line_sub_2_1.product_uom_id = self.uom_dozen 108 | flat_tot = self.bom_top._get_flattened_totals() 109 | self.assertEqual(len(flat_tot), 3) 110 | # Component 1 = 2*2 + 5*3*12 = 184 units -> 184/12 dozens 111 | self.assertAlmostEqual(flat_tot.get(self.component_1), 184 / 12) 112 | # Component 2 = 2*5 = 10 units -> 10/12 dozens 113 | self.assertAlmostEqual(flat_tot.get(self.component_2), 10 / 12) 114 | # Component 3 = 5*3 = 15 units -> 15/12 dozens 115 | self.assertAlmostEqual(flat_tot.get(self.component_3), 15 / 12) 116 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | exclude: | 2 | (?x) 3 | # NOT INSTALLABLE ADDONS 4 | # END NOT INSTALLABLE ADDONS 5 | # Files and folders generated by bots, to avoid loops 6 | ^setup/|/static/description/index\.html$| 7 | # We don't want to mess with tool-generated files 8 | .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs| 9 | # Maybe reactivate this when all README files include prettier ignore tags? 10 | ^README\.md$| 11 | # Library files can have extraneous formatting (even minimized) 12 | /static/(src/)?lib/| 13 | # Repos using Sphinx to generate docs don't need prettying 14 | ^docs/_templates/.*\.html$| 15 | # Don't bother non-technical authors with formatting issues in docs 16 | readme/.*\.(rst|md)$| 17 | # Ignore build and dist directories in addons 18 | /build/|/dist/| 19 | # Ignore test files in addons 20 | /tests/samples/.*| 21 | # You don't usually want a bot to modify your legal texts 22 | (LICENSE.*|COPYING.*) 23 | default_language_version: 24 | python: python3 25 | node: "22.9.0" 26 | repos: 27 | - repo: local 28 | hooks: 29 | # These files are most likely copier diff rejection junks; if found, 30 | # review them manually, fix the problem (if needed) and remove them 31 | - id: forbidden-files 32 | name: forbidden files 33 | entry: found forbidden files; remove them 34 | language: fail 35 | files: "\\.rej$" 36 | - id: en-po-files 37 | name: en.po files cannot exist 38 | entry: found a en.po file 39 | language: fail 40 | files: '[a-zA-Z0-9_]*/i18n/en\.po$' 41 | - repo: https://github.com/sbidoul/whool 42 | rev: v1.2 43 | hooks: 44 | - id: whool-init 45 | - repo: https://github.com/oca/maintainer-tools 46 | rev: bf9ecb9938b6a5deca0ff3d870fbd3f33341fded 47 | hooks: 48 | # update the NOT INSTALLABLE ADDONS section above 49 | - id: oca-update-pre-commit-excluded-addons 50 | - id: oca-fix-manifest-website 51 | args: ["https://github.com/OCA/manufacture-reporting"] 52 | - id: oca-gen-addon-readme 53 | args: 54 | - --addons-dir=. 55 | - --branch=18.0 56 | - --org-name=OCA 57 | - --repo-name=manufacture-reporting 58 | - --if-source-changed 59 | - --keep-source-digest 60 | - --convert-fragments-to-markdown 61 | - id: oca-gen-external-dependencies 62 | - repo: https://github.com/OCA/odoo-pre-commit-hooks 63 | rev: v0.0.33 64 | hooks: 65 | - id: oca-checks-odoo-module 66 | - id: oca-checks-po 67 | args: 68 | - --disable=po-pretty-format 69 | - repo: local 70 | hooks: 71 | - id: prettier 72 | name: prettier (with plugin-xml) 73 | entry: prettier 74 | args: 75 | - --write 76 | - --list-different 77 | - --ignore-unknown 78 | types: [text] 79 | files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$ 80 | language: node 81 | additional_dependencies: 82 | - "prettier@3.3.3" 83 | - "@prettier/plugin-xml@3.4.1" 84 | - repo: local 85 | hooks: 86 | - id: eslint 87 | name: eslint 88 | entry: eslint 89 | args: 90 | - --color 91 | - --fix 92 | verbose: true 93 | types: [javascript] 94 | language: node 95 | additional_dependencies: 96 | - "eslint@9.12.0" 97 | - "eslint-plugin-jsdoc@50.3.1" 98 | - repo: https://github.com/pre-commit/pre-commit-hooks 99 | rev: v4.6.0 100 | hooks: 101 | - id: trailing-whitespace 102 | # exclude autogenerated files 103 | exclude: /README\.rst$|\.pot?$ 104 | - id: end-of-file-fixer 105 | # exclude autogenerated files 106 | exclude: /README\.rst$|\.pot?$ 107 | - id: debug-statements 108 | - id: fix-encoding-pragma 109 | args: ["--remove"] 110 | - id: check-case-conflict 111 | - id: check-docstring-first 112 | - id: check-executables-have-shebangs 113 | - id: check-merge-conflict 114 | # exclude files where underlines are not distinguishable from merge conflicts 115 | exclude: /README\.rst$|^docs/.*\.rst$ 116 | - id: check-symlinks 117 | - id: check-xml 118 | - id: mixed-line-ending 119 | args: ["--fix=lf"] 120 | - repo: https://github.com/astral-sh/ruff-pre-commit 121 | rev: v0.6.8 122 | hooks: 123 | - id: ruff 124 | args: [--fix, --exit-non-zero-on-fix] 125 | - id: ruff-format 126 | - repo: https://github.com/OCA/pylint-odoo 127 | rev: v9.1.3 128 | hooks: 129 | - id: pylint_odoo 130 | name: pylint with optional checks 131 | args: 132 | - --rcfile=.pylintrc 133 | - --exit-zero 134 | verbose: true 135 | - id: pylint_odoo 136 | args: 137 | - --rcfile=.pylintrc-mandatory 138 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/wizard/bom_route_current_stock.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Camptocamp SA 2 | # Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com) 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 4 | 5 | from odoo import api, fields, models 6 | 7 | 8 | class BomRouteCurrentStock(models.TransientModel): 9 | _name = "mrp.bom.current.stock" 10 | _description = "MRP Bom Route Current Stock" 11 | 12 | bom_id = fields.Many2one( 13 | comodel_name="mrp.bom", string="Starting Bill of Materials", required=True 14 | ) 15 | product_id = fields.Many2one( 16 | comodel_name="product.product", 17 | string="Product Variant", 18 | domain="[('type', 'in', ['product', 'consu'])]", 19 | required=True, 20 | ) 21 | product_tmpl_id = fields.Many2one( 22 | comodel_name="product.template", 23 | string="Product Template", 24 | related="product_id.product_tmpl_id", 25 | ) 26 | product_qty = fields.Float( 27 | related="bom_id.product_qty", digits="Product Unit of Measure" 28 | ) 29 | product_uom_id = fields.Many2one( 30 | comodel_name="uom.uom", related="bom_id.product_uom_id" 31 | ) 32 | location_id = fields.Many2one( 33 | comodel_name="stock.location", string="Starting location" 34 | ) 35 | line_ids = fields.One2many( 36 | comodel_name="mrp.bom.current.stock.line", inverse_name="explosion_id" 37 | ) 38 | 39 | @api.onchange("product_id") 40 | def _onchange_product_id(self): 41 | if self.product_id: 42 | self.bom_id = self.env["mrp.bom"]._bom_find(products=self.product_id)[ 43 | self.product_id 44 | ] 45 | 46 | @api.model 47 | def _prepare_line(self, bom_line, level, factor): 48 | return { 49 | "product_id": bom_line.product_id.id, 50 | "bom_line": bom_line.id, 51 | "bom_level": level, 52 | "product_qty": bom_line.product_qty * factor, 53 | "product_uom_id": bom_line.product_uom_id.id, 54 | "location_id": self.location_id.id, 55 | "explosion_id": self.id, 56 | } 57 | 58 | def do_explode(self): 59 | self.ensure_one() 60 | line_obj = self.env["mrp.bom.current.stock.line"] 61 | 62 | def _create_lines(bom, level=0, factor=1): 63 | level += 1 64 | for line in bom.bom_line_ids: 65 | vals = self._prepare_line(line, level, factor) 66 | line_obj.create(vals) 67 | line_boms = line.product_id.bom_ids 68 | if line_boms: 69 | line_qty = line.product_uom_id._compute_quantity( 70 | line.product_qty, line_boms[0].product_uom_id 71 | ) 72 | new_factor = factor * line_qty / line_boms[0].product_qty 73 | _create_lines(line_boms[0], level, new_factor) 74 | 75 | _create_lines(self.bom_id) 76 | return { 77 | "type": "ir.actions.act_window", 78 | "name": "Open lines", 79 | "view_mode": "form", 80 | "res_model": "mrp.bom.current.stock", 81 | "view_id": self.env.ref( 82 | "mrp_bom_current_stock.mrp_bom_current_stock_view_form2" 83 | ).id, 84 | "target": "new", 85 | "res_id": self.id, 86 | } 87 | 88 | 89 | class BomRouteCurrentStockLine(models.TransientModel): 90 | _name = "mrp.bom.current.stock.line" 91 | _description = "MRP Bom Route Current Stock Line" 92 | 93 | explosion_id = fields.Many2one(comodel_name="mrp.bom.current.stock", readonly=True) 94 | product_id = fields.Many2one( 95 | comodel_name="product.product", string="Product Variant", readonly=True 96 | ) 97 | bom_level = fields.Integer(string="BoM Level", readonly=True) 98 | product_qty = fields.Float( 99 | string="Product Quantity", readonly=True, digits="Product Unit of Measure" 100 | ) 101 | product_uom_id = fields.Many2one( 102 | comodel_name="uom.uom", string="Product Unit of Measure", readonly=True 103 | ) 104 | location_id = fields.Many2one( 105 | comodel_name="stock.location", string="Source location" 106 | ) 107 | bom_line = fields.Many2one( 108 | comodel_name="mrp.bom.line", string="BoM line", readonly=True 109 | ) 110 | qty_available_in_source_loc = fields.Float( 111 | string="Qty Available in Source", 112 | compute="_compute_qty_available_in_source_loc", 113 | readonly=True, 114 | ) 115 | bom_id = fields.Many2one( 116 | comodel_name="mrp.bom", 117 | string="Parent BoM", 118 | related="bom_line.bom_id", 119 | readonly=True, 120 | ) 121 | 122 | @api.onchange("location_id") 123 | def _compute_qty_available_in_source_loc(self): 124 | for record in self: 125 | product_available = record.product_id.with_context( 126 | location=record.location_id.id 127 | )._compute_quantities_dict( 128 | self._context.get("lot_id"), 129 | self._context.get("owner_id"), 130 | self._context.get("package_id"), 131 | self._context.get("from_date"), 132 | self._context.get("to_date"), 133 | )[record.product_id.id]["qty_available"] 134 | res = record.product_id.product_tmpl_id.uom_id._compute_quantity( 135 | product_available, record.product_uom_id 136 | ) 137 | record.qty_available_in_source_loc = res 138 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/reports/report_mrpcurrentstock.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 86 | 87 | BoM: Current Stock Report PDF 88 | mrp.bom.current.stock 89 | qweb-pdf 90 | mrp_bom_current_stock.report_mrpbom_current_stock_pdf 93 | mrp_bom_current_stock.report_mrpbom_current_stock_pdf 96 | report 97 | 98 | 99 | BoM: Current Stock Report XLSX 100 | mrp.bom.current.stock 101 | xlsx 102 | mrp_bom_current_stock.report_mrpbom_current_stock_xlsx 105 | mrp_bom 106 | report 107 | False 108 | 109 | 110 | -------------------------------------------------------------------------------- /eslint.config.cjs: -------------------------------------------------------------------------------- 1 | jsdoc = require("eslint-plugin-jsdoc"); 2 | 3 | const config = [{ 4 | plugins: { 5 | jsdoc, 6 | }, 7 | 8 | languageOptions: { 9 | globals: { 10 | _: "readonly", 11 | $: "readonly", 12 | fuzzy: "readonly", 13 | jQuery: "readonly", 14 | moment: "readonly", 15 | odoo: "readonly", 16 | openerp: "readonly", 17 | owl: "readonly", 18 | luxon: "readonly", 19 | }, 20 | 21 | ecmaVersion: 2024, 22 | sourceType: "script", 23 | }, 24 | 25 | rules: { 26 | "accessor-pairs": "warn", 27 | "array-callback-return": "warn", 28 | "callback-return": "warn", 29 | "capitalized-comments": ["warn", "always", { 30 | ignoreConsecutiveComments: true, 31 | ignoreInlineComments: true, 32 | }], 33 | complexity: ["warn", 15], 34 | "constructor-super": "warn", 35 | "dot-notation": "warn", 36 | eqeqeq: "warn", 37 | "global-require": "warn", 38 | "handle-callback-err": "warn", 39 | "id-blacklist": "warn", 40 | "id-match": "warn", 41 | "init-declarations": "error", 42 | "max-depth": "warn", 43 | "max-nested-callbacks": "warn", 44 | "max-statements-per-line": "warn", 45 | "no-alert": "warn", 46 | "no-array-constructor": "warn", 47 | "no-caller": "warn", 48 | "no-case-declarations": "warn", 49 | "no-class-assign": "warn", 50 | "no-cond-assign": "error", 51 | "no-const-assign": "error", 52 | "no-constant-condition": "warn", 53 | "no-control-regex": "warn", 54 | "no-debugger": "error", 55 | "no-delete-var": "warn", 56 | "no-div-regex": "warn", 57 | "no-dupe-args": "error", 58 | "no-dupe-class-members": "error", 59 | "no-dupe-keys": "error", 60 | "no-duplicate-case": "error", 61 | "no-duplicate-imports": "error", 62 | "no-else-return": "warn", 63 | "no-empty-character-class": "warn", 64 | "no-empty-function": "error", 65 | "no-empty-pattern": "error", 66 | "no-empty": "warn", 67 | "no-eq-null": "error", 68 | "no-eval": "error", 69 | "no-ex-assign": "error", 70 | "no-extend-native": "warn", 71 | "no-extra-bind": "warn", 72 | "no-extra-boolean-cast": "warn", 73 | "no-extra-label": "warn", 74 | "no-fallthrough": "warn", 75 | "no-func-assign": "error", 76 | "no-global-assign": "error", 77 | "no-implicit-coercion": ["warn", { 78 | allow: ["~"], 79 | }], 80 | "no-implicit-globals": "warn", 81 | "no-implied-eval": "warn", 82 | "no-inline-comments": "warn", 83 | "no-inner-declarations": "warn", 84 | "no-invalid-regexp": "warn", 85 | "no-irregular-whitespace": "warn", 86 | "no-iterator": "warn", 87 | "no-label-var": "warn", 88 | "no-labels": "warn", 89 | "no-lone-blocks": "warn", 90 | "no-lonely-if": "error", 91 | "no-mixed-requires": "error", 92 | "no-multi-str": "warn", 93 | "no-native-reassign": "error", 94 | "no-negated-condition": "warn", 95 | "no-negated-in-lhs": "error", 96 | "no-new-func": "warn", 97 | "no-new-object": "warn", 98 | "no-new-require": "warn", 99 | "no-new-symbol": "warn", 100 | "no-new-wrappers": "warn", 101 | "no-new": "warn", 102 | "no-obj-calls": "warn", 103 | "no-octal-escape": "warn", 104 | "no-octal": "warn", 105 | "no-param-reassign": "warn", 106 | "no-path-concat": "warn", 107 | "no-process-env": "warn", 108 | "no-process-exit": "warn", 109 | "no-proto": "warn", 110 | "no-prototype-builtins": "warn", 111 | "no-redeclare": "warn", 112 | "no-regex-spaces": "warn", 113 | "no-restricted-globals": "warn", 114 | "no-restricted-imports": "warn", 115 | "no-restricted-modules": "warn", 116 | "no-restricted-syntax": "warn", 117 | "no-return-assign": "error", 118 | "no-script-url": "warn", 119 | "no-self-assign": "warn", 120 | "no-self-compare": "warn", 121 | "no-sequences": "warn", 122 | "no-shadow-restricted-names": "warn", 123 | "no-shadow": "warn", 124 | "no-sparse-arrays": "warn", 125 | "no-sync": "warn", 126 | "no-this-before-super": "warn", 127 | "no-throw-literal": "warn", 128 | "no-undef-init": "warn", 129 | "no-undef": "error", 130 | "no-unmodified-loop-condition": "warn", 131 | "no-unneeded-ternary": "error", 132 | "no-unreachable": "error", 133 | "no-unsafe-finally": "error", 134 | "no-unused-expressions": "error", 135 | "no-unused-labels": "error", 136 | "no-unused-vars": "error", 137 | "no-use-before-define": "error", 138 | "no-useless-call": "warn", 139 | "no-useless-computed-key": "warn", 140 | "no-useless-concat": "warn", 141 | "no-useless-constructor": "warn", 142 | "no-useless-escape": "warn", 143 | "no-useless-rename": "warn", 144 | "no-void": "warn", 145 | "no-with": "warn", 146 | "operator-assignment": ["error", "always"], 147 | "prefer-const": "warn", 148 | radix: "warn", 149 | "require-yield": "warn", 150 | "sort-imports": "warn", 151 | "spaced-comment": ["error", "always"], 152 | strict: ["error", "function"], 153 | "use-isnan": "error", 154 | 155 | "jsdoc/check-tag-names": "warn", 156 | "jsdoc/check-types": "warn", 157 | "jsdoc/require-param-description": "off", 158 | "jsdoc/require-return": "off", 159 | "jsdoc/require-return-description": "off", 160 | "jsdoc/require-return-type": "off", 161 | 162 | "valid-typeof": "warn", 163 | yoda: "warn", 164 | }, 165 | 166 | settings: { 167 | jsdoc: { 168 | tagNamePreference: { 169 | arg: "param", 170 | argument: "param", 171 | augments: "extends", 172 | constructor: "class", 173 | exception: "throws", 174 | func: "function", 175 | method: "function", 176 | prop: "property", 177 | return: "returns", 178 | virtual: "abstract", 179 | yield: "yields", 180 | }, 181 | preferredTypes: { 182 | array: "Array", 183 | bool: "Boolean", 184 | boolean: "Boolean", 185 | number: "Number", 186 | object: "Object", 187 | str: "String", 188 | string: "String", 189 | }, 190 | }, 191 | }, 192 | 193 | }, { 194 | files: ["**/*.esm.js"], 195 | 196 | languageOptions: { 197 | ecmaVersion: 2024, 198 | sourceType: "module", 199 | }, 200 | }]; 201 | 202 | module.exports = config 203 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/tests/test_mrp_bom_current_stock.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018-20 ForgeFlow S.L. (https://www.forgeflow.com) 2 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). 3 | 4 | import odoo.tests.common as common 5 | 6 | 7 | class TestMRPBomCurrentStock(common.TransactionCase): 8 | @classmethod 9 | def setUpClass(cls): 10 | super().setUpClass() 11 | 12 | cls.product_obj = cls.env["product.product"] 13 | cls.bom_obj = cls.env["mrp.bom"] 14 | cls.bom_line_obj = cls.env["mrp.bom.line"] 15 | 16 | cls.uom_unit = cls.env.ref("uom.product_uom_unit") 17 | cls.uom_dozen = cls.env.ref("uom.product_uom_dozen") 18 | cls.uom_meter = cls.env.ref("uom.product_uom_meter") 19 | cls.uom_kgm = cls.env.ref("uom.product_uom_kgm") 20 | cls.uom_gm = cls.env.ref("uom.product_uom_gram") 21 | 22 | cls.stock_loc = cls.env.ref("stock.stock_location_stock") 23 | 24 | # Create products: 25 | cls.product_top = cls.product_obj.create( 26 | { 27 | "name": "FP-01", 28 | "is_storable": True, 29 | "uom_id": cls.uom_dozen.id, 30 | "uom_po_id": cls.uom_dozen.id, 31 | } 32 | ) 33 | cls.product_sub_1 = cls.product_obj.create( 34 | { 35 | "name": "IP-01", 36 | "is_storable": True, 37 | "uom_id": cls.uom_dozen.id, 38 | "uom_po_id": cls.uom_dozen.id, 39 | } 40 | ) 41 | cls.product_sub_2 = cls.product_obj.create( 42 | { 43 | "name": "IP-02", 44 | "is_storable": True, 45 | "uom_id": cls.uom_kgm.id, 46 | "uom_po_id": cls.uom_kgm.id, 47 | } 48 | ) 49 | cls.product_sub_3 = cls.product_obj.create( 50 | { 51 | "name": "IP-03", 52 | "is_storable": True, 53 | "uom_id": cls.uom_unit.id, 54 | "uom_po_id": cls.uom_unit.id, 55 | } 56 | ) 57 | 58 | cls.component_1 = cls.product_obj.create( 59 | { 60 | "name": "PP-01", 61 | "is_storable": True, 62 | "uom_id": cls.uom_unit.id, 63 | "uom_po_id": cls.uom_unit.id, 64 | } 65 | ) 66 | cls.component_2 = cls.product_obj.create( 67 | { 68 | "name": "PP-02", 69 | "is_storable": True, 70 | "uom_id": cls.uom_unit.id, 71 | "uom_po_id": cls.uom_unit.id, 72 | } 73 | ) 74 | cls.component_3 = cls.product_obj.create( 75 | { 76 | "name": "PP-03", 77 | "is_storable": True, 78 | "uom_id": cls.uom_meter.id, 79 | "uom_po_id": cls.uom_meter.id, 80 | } 81 | ) 82 | 83 | # Create Bills of Materials: 84 | cls.bom_top = cls.bom_obj.create( 85 | { 86 | "product_tmpl_id": cls.product_top.product_tmpl_id.id, 87 | "product_qty": 1.0, 88 | "product_uom_id": cls.uom_unit.id, 89 | } 90 | ) 91 | cls.line_top_1 = cls.bom_line_obj.create( 92 | { 93 | "product_id": cls.product_sub_1.id, 94 | "bom_id": cls.bom_top.id, 95 | "product_qty": 1.0, 96 | "product_uom_id": cls.uom_dozen.id, 97 | } 98 | ) 99 | cls.line_top_2 = cls.bom_line_obj.create( 100 | { 101 | "product_id": cls.product_sub_2.id, 102 | "bom_id": cls.bom_top.id, 103 | "product_qty": 200.0, 104 | "product_uom_id": cls.uom_gm.id, 105 | } 106 | ) 107 | cls.line_top_3 = cls.bom_line_obj.create( 108 | { 109 | "product_id": cls.product_sub_3.id, 110 | "bom_id": cls.bom_top.id, 111 | "product_qty": 1.0, 112 | "product_uom_id": cls.uom_dozen.id, 113 | } 114 | ) 115 | 116 | cls.bom_sub_1 = cls.bom_obj.create( 117 | { 118 | "product_tmpl_id": cls.product_sub_1.product_tmpl_id.id, 119 | "product_qty": 12.0, 120 | "product_uom_id": cls.uom_unit.id, 121 | } 122 | ) 123 | cls.line_sub_1_1 = cls.bom_line_obj.create( 124 | { 125 | "product_id": cls.component_1.id, 126 | "bom_id": cls.bom_sub_1.id, 127 | "product_qty": 1.0, 128 | "product_uom_id": cls.uom_dozen.id, 129 | } 130 | ) 131 | 132 | cls.bom_sub_2 = cls.bom_obj.create( 133 | { 134 | "product_tmpl_id": cls.product_sub_2.product_tmpl_id.id, 135 | "product_qty": 20.0, 136 | "product_uom_id": cls.uom_kgm.id, 137 | } 138 | ) 139 | cls.line_sub_2_1 = cls.bom_line_obj.create( 140 | { 141 | "product_id": cls.component_2.id, 142 | "bom_id": cls.bom_sub_2.id, 143 | "product_qty": 1.0, 144 | "product_uom_id": cls.uom_unit.id, 145 | } 146 | ) 147 | 148 | cls.bom_sub_3 = cls.bom_obj.create( 149 | { 150 | "product_tmpl_id": cls.product_sub_3.product_tmpl_id.id, 151 | "product_qty": 10.0, 152 | "product_uom_id": cls.uom_unit.id, 153 | } 154 | ) 155 | cls.line_sub_3_1 = cls.bom_line_obj.create( 156 | { 157 | "product_id": cls.component_3.id, 158 | "bom_id": cls.bom_sub_3.id, 159 | "product_qty": 2.0, 160 | "product_uom_id": cls.uom_meter.id, 161 | } 162 | ) 163 | 164 | def _product_change_qty(self, product, new_qty): 165 | values = { 166 | "product_id": product.id, 167 | "new_quantity": new_qty, 168 | "product_tmpl_id": product.product_tmpl_id.id, 169 | } 170 | wizard = self.env["stock.change.product.qty"].create(values) 171 | wizard.change_product_qty() 172 | 173 | def test_wizard(self): 174 | self.wizard = self.env["mrp.bom.current.stock"].create( 175 | { 176 | "product_id": self.product_top.id, 177 | "bom_id": self.bom_top.id, 178 | "location_id": self.stock_loc.id, 179 | } 180 | ) 181 | self.wizard.do_explode() 182 | sol = (1, 1, 200, 0.01, 1, 2.4) 183 | lines = self.wizard.line_ids 184 | self.assertEqual(self.wizard.location_id, self.stock_loc) 185 | for i, line in enumerate(lines): 186 | self.assertEqual(line.product_qty, sol[i]) 187 | self._product_change_qty(line.product_id, line.product_qty) 188 | lines._compute_qty_available_in_source_loc() 189 | for line in lines: 190 | available = line.product_id.product_tmpl_id.uom_id._compute_quantity( 191 | line.product_qty, line.product_uom_id 192 | ) 193 | self.assertEqual(line.qty_available_in_source_loc, available) 194 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/i18n/mrp_bom_current_stock.pot: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_current_stock 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "Last-Translator: \n" 10 | "Language-Team: \n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | "Content-Transfer-Encoding: \n" 14 | "Plural-Forms: \n" 15 | 16 | #. module: mrp_bom_current_stock 17 | #. odoo-python 18 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 19 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 20 | msgid "BOM Current Stock Report" 21 | msgstr "" 22 | 23 | #. module: mrp_bom_current_stock 24 | #: model:ir.actions.act_window,name:mrp_bom_current_stock.mrp_bom_current_stock_action 25 | #: model:ir.ui.menu,name:mrp_bom_current_stock.mrp_bom_current_stock_menu 26 | msgid "BoM Current Stock Explosion" 27 | msgstr "" 28 | 29 | #. module: mrp_bom_current_stock 30 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_level 31 | msgid "BoM Level" 32 | msgstr "" 33 | 34 | #. module: mrp_bom_current_stock 35 | #. odoo-python 36 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 37 | msgid "BoM Reference" 38 | msgstr "" 39 | 40 | #. module: mrp_bom_current_stock 41 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_line 42 | msgid "BoM line" 43 | msgstr "" 44 | 45 | #. module: mrp_bom_current_stock 46 | #: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_pdf 47 | msgid "BoM: Current Stock Report PDF" 48 | msgstr "" 49 | 50 | #. module: mrp_bom_current_stock 51 | #: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_xlsx 52 | msgid "BoM: Current Stock Report XLSX" 53 | msgstr "" 54 | 55 | #. module: mrp_bom_current_stock 56 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 57 | msgid "Cancel" 58 | msgstr "" 59 | 60 | #. module: mrp_bom_current_stock 61 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 62 | msgid "Close" 63 | msgstr "" 64 | 65 | #. module: mrp_bom_current_stock 66 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_uid 67 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_uid 68 | msgid "Created by" 69 | msgstr "" 70 | 71 | #. module: mrp_bom_current_stock 72 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_date 73 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_date 74 | msgid "Created on" 75 | msgstr "" 76 | 77 | #. module: mrp_bom_current_stock 78 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__display_name 79 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__display_name 80 | msgid "Display Name" 81 | msgstr "" 82 | 83 | #. module: mrp_bom_current_stock 84 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 85 | msgid "Explode" 86 | msgstr "" 87 | 88 | #. module: mrp_bom_current_stock 89 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__explosion_id 90 | msgid "Explosion" 91 | msgstr "" 92 | 93 | #. module: mrp_bom_current_stock 94 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 95 | msgid "Explosion result" 96 | msgstr "" 97 | 98 | #. module: mrp_bom_current_stock 99 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 100 | msgid "Export XLSX" 101 | msgstr "" 102 | 103 | #. module: mrp_bom_current_stock 104 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__id 105 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__id 106 | msgid "ID" 107 | msgstr "" 108 | 109 | #. module: mrp_bom_current_stock 110 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_uid 111 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_uid 112 | msgid "Last Updated by" 113 | msgstr "" 114 | 115 | #. module: mrp_bom_current_stock 116 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_date 117 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_date 118 | msgid "Last Updated on" 119 | msgstr "" 120 | 121 | #. module: mrp_bom_current_stock 122 | #. odoo-python 123 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 124 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 125 | msgid "Level" 126 | msgstr "" 127 | 128 | #. module: mrp_bom_current_stock 129 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__line_ids 130 | msgid "Line" 131 | msgstr "" 132 | 133 | #. module: mrp_bom_current_stock 134 | #. odoo-python 135 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 136 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 137 | msgid "Location" 138 | msgstr "" 139 | 140 | #. module: mrp_bom_current_stock 141 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 142 | msgid "Location:" 143 | msgstr "" 144 | 145 | #. module: mrp_bom_current_stock 146 | #: model:ir.model,name:mrp_bom_current_stock.model_report_mrp_bom_current_stock_report_mrpbom_current_stock_xlsx 147 | msgid "MRP BOM Current Stock XLSX Report" 148 | msgstr "" 149 | 150 | #. module: mrp_bom_current_stock 151 | #: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock 152 | msgid "MRP Bom Route Current Stock" 153 | msgstr "" 154 | 155 | #. module: mrp_bom_current_stock 156 | #: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock_line 157 | msgid "MRP Bom Route Current Stock Line" 158 | msgstr "" 159 | 160 | #. module: mrp_bom_current_stock 161 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_id 162 | msgid "Parent BoM" 163 | msgstr "" 164 | 165 | #. module: mrp_bom_current_stock 166 | #. odoo-python 167 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 168 | msgid "Parent BoM Ref" 169 | msgstr "" 170 | 171 | #. module: mrp_bom_current_stock 172 | #. odoo-python 173 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 174 | msgid "Parent Product Ref" 175 | msgstr "" 176 | 177 | #. module: mrp_bom_current_stock 178 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 179 | msgid "Print PDF" 180 | msgstr "" 181 | 182 | #. module: mrp_bom_current_stock 183 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 184 | msgid "Product" 185 | msgstr "" 186 | 187 | #. module: mrp_bom_current_stock 188 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_qty 189 | msgid "Product Quantity" 190 | msgstr "" 191 | 192 | #. module: mrp_bom_current_stock 193 | #. odoo-python 194 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 195 | msgid "Product Reference" 196 | msgstr "" 197 | 198 | #. module: mrp_bom_current_stock 199 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_tmpl_id 200 | msgid "Product Template" 201 | msgstr "" 202 | 203 | #. module: mrp_bom_current_stock 204 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_uom_id 205 | msgid "Product Unit of Measure" 206 | msgstr "" 207 | 208 | #. module: mrp_bom_current_stock 209 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_id 210 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_id 211 | msgid "Product Variant" 212 | msgstr "" 213 | 214 | #. module: mrp_bom_current_stock 215 | #. odoo-python 216 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 217 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 218 | msgid "Qty Available (Location)" 219 | msgstr "" 220 | 221 | #. module: mrp_bom_current_stock 222 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__qty_available_in_source_loc 223 | msgid "Qty Available in Source" 224 | msgstr "" 225 | 226 | #. module: mrp_bom_current_stock 227 | #. odoo-python 228 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 229 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty 230 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 231 | msgid "Quantity" 232 | msgstr "" 233 | 234 | #. module: mrp_bom_current_stock 235 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 236 | msgid "Select product and location to explode" 237 | msgstr "" 238 | 239 | #. module: mrp_bom_current_stock 240 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 241 | msgid "Set the source location for every component." 242 | msgstr "" 243 | 244 | #. module: mrp_bom_current_stock 245 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__location_id 246 | msgid "Source location" 247 | msgstr "" 248 | 249 | #. module: mrp_bom_current_stock 250 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__bom_id 251 | msgid "Starting Bill of Materials" 252 | msgstr "" 253 | 254 | #. module: mrp_bom_current_stock 255 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__location_id 256 | msgid "Starting location" 257 | msgstr "" 258 | 259 | #. module: mrp_bom_current_stock 260 | #: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty 261 | msgid "" 262 | "This should be the smallest quantity that this product can be produced in. " 263 | "If the BOM contains operations, make sure the work center capacity is " 264 | "accurate." 265 | msgstr "" 266 | 267 | #. module: mrp_bom_current_stock 268 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id 269 | msgid "Unit of Measure" 270 | msgstr "" 271 | 272 | #. module: mrp_bom_current_stock 273 | #: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id 274 | msgid "" 275 | "Unit of Measure (Unit of Measure) is the unit of measurement for the " 276 | "inventory control" 277 | msgstr "" 278 | 279 | #. module: mrp_bom_current_stock 280 | #. odoo-python 281 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 282 | msgid "UoM" 283 | msgstr "" 284 | 285 | #. module: mrp_bom_current_stock 286 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 287 | msgid "or" 288 | msgstr "" 289 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/i18n/tr.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_current_stock 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 18.0\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "PO-Revision-Date: 2025-09-08 09:43+0000\n" 10 | "Last-Translator: Betül Öğmen \n" 11 | "Language-Team: none\n" 12 | "Language: tr\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Generator: Weblate 5.10.4\n" 18 | 19 | #. module: mrp_bom_current_stock 20 | #. odoo-python 21 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 22 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 23 | msgid "BOM Current Stock Report" 24 | msgstr "Ürün Reçetesi Güncel Stok Raporu" 25 | 26 | #. module: mrp_bom_current_stock 27 | #: model:ir.actions.act_window,name:mrp_bom_current_stock.mrp_bom_current_stock_action 28 | #: model:ir.ui.menu,name:mrp_bom_current_stock.mrp_bom_current_stock_menu 29 | msgid "BoM Current Stock Explosion" 30 | msgstr "Ürün Reçetesi Güncel Stok Patlatma" 31 | 32 | #. module: mrp_bom_current_stock 33 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_level 34 | msgid "BoM Level" 35 | msgstr "Ürün Reçetesi Seviyesi" 36 | 37 | #. module: mrp_bom_current_stock 38 | #. odoo-python 39 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 40 | msgid "BoM Reference" 41 | msgstr "Ürün Reçetesi Referansı" 42 | 43 | #. module: mrp_bom_current_stock 44 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_line 45 | msgid "BoM line" 46 | msgstr "Ürün Reçetesi Satırı" 47 | 48 | #. module: mrp_bom_current_stock 49 | #: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_pdf 50 | msgid "BoM: Current Stock Report PDF" 51 | msgstr "Ürün Reçetesi: Güncel Stock Raporu PDF" 52 | 53 | #. module: mrp_bom_current_stock 54 | #: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_xlsx 55 | msgid "BoM: Current Stock Report XLSX" 56 | msgstr "Ürün Reçetesi: Güncel Stock Raporu XLSX" 57 | 58 | #. module: mrp_bom_current_stock 59 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 60 | msgid "Cancel" 61 | msgstr "İptal" 62 | 63 | #. module: mrp_bom_current_stock 64 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 65 | msgid "Close" 66 | msgstr "Kapat" 67 | 68 | #. module: mrp_bom_current_stock 69 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_uid 70 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_uid 71 | msgid "Created by" 72 | msgstr "Oluşturan" 73 | 74 | #. module: mrp_bom_current_stock 75 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_date 76 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_date 77 | msgid "Created on" 78 | msgstr "Oluşturuldu" 79 | 80 | #. module: mrp_bom_current_stock 81 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__display_name 82 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__display_name 83 | msgid "Display Name" 84 | msgstr "Görünüm Adı" 85 | 86 | #. module: mrp_bom_current_stock 87 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 88 | msgid "Explode" 89 | msgstr "Patlatıldı" 90 | 91 | #. module: mrp_bom_current_stock 92 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__explosion_id 93 | msgid "Explosion" 94 | msgstr "Patlama" 95 | 96 | #. module: mrp_bom_current_stock 97 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 98 | msgid "Explosion result" 99 | msgstr "Patlama Sonucu" 100 | 101 | #. module: mrp_bom_current_stock 102 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 103 | msgid "Export XLSX" 104 | msgstr "Dışa Aktarım XLSX" 105 | 106 | #. module: mrp_bom_current_stock 107 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__id 108 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__id 109 | msgid "ID" 110 | msgstr "" 111 | 112 | #. module: mrp_bom_current_stock 113 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_uid 114 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_uid 115 | msgid "Last Updated by" 116 | msgstr "Son Güncelleyen" 117 | 118 | #. module: mrp_bom_current_stock 119 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_date 120 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_date 121 | msgid "Last Updated on" 122 | msgstr "Son Güncelleme" 123 | 124 | #. module: mrp_bom_current_stock 125 | #. odoo-python 126 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 127 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 128 | msgid "Level" 129 | msgstr "Seviye" 130 | 131 | #. module: mrp_bom_current_stock 132 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__line_ids 133 | msgid "Line" 134 | msgstr "Satır" 135 | 136 | #. module: mrp_bom_current_stock 137 | #. odoo-python 138 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 139 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 140 | msgid "Location" 141 | msgstr "Konum" 142 | 143 | #. module: mrp_bom_current_stock 144 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 145 | msgid "Location:" 146 | msgstr "Konum:" 147 | 148 | #. module: mrp_bom_current_stock 149 | #: model:ir.model,name:mrp_bom_current_stock.model_report_mrp_bom_current_stock_report_mrpbom_current_stock_xlsx 150 | msgid "MRP BOM Current Stock XLSX Report" 151 | msgstr "MRP Bom Güncel Stok XLSX Raporu" 152 | 153 | #. module: mrp_bom_current_stock 154 | #: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock 155 | msgid "MRP Bom Route Current Stock" 156 | msgstr "Kök MRP Bom Güncel Stok" 157 | 158 | #. module: mrp_bom_current_stock 159 | #: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock_line 160 | msgid "MRP Bom Route Current Stock Line" 161 | msgstr "Kök MRP Bom Güncel Stok Satırı" 162 | 163 | #. module: mrp_bom_current_stock 164 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_id 165 | msgid "Parent BoM" 166 | msgstr "Üst BoM" 167 | 168 | #. module: mrp_bom_current_stock 169 | #. odoo-python 170 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 171 | msgid "Parent BoM Ref" 172 | msgstr "Üst BoM Referansı" 173 | 174 | #. module: mrp_bom_current_stock 175 | #. odoo-python 176 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 177 | msgid "Parent Product Ref" 178 | msgstr "Üst Ürün Referansı" 179 | 180 | #. module: mrp_bom_current_stock 181 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 182 | msgid "Print PDF" 183 | msgstr "PDF Yazdır" 184 | 185 | #. module: mrp_bom_current_stock 186 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 187 | msgid "Product" 188 | msgstr "Ürün" 189 | 190 | #. module: mrp_bom_current_stock 191 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_qty 192 | msgid "Product Quantity" 193 | msgstr "Ürün Miktarı" 194 | 195 | #. module: mrp_bom_current_stock 196 | #. odoo-python 197 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 198 | msgid "Product Reference" 199 | msgstr "Ürün Referansı" 200 | 201 | #. module: mrp_bom_current_stock 202 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_tmpl_id 203 | msgid "Product Template" 204 | msgstr "Ürün Şablonu" 205 | 206 | #. module: mrp_bom_current_stock 207 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_uom_id 208 | msgid "Product Unit of Measure" 209 | msgstr "Ürün Ölçü Birimi" 210 | 211 | #. module: mrp_bom_current_stock 212 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_id 213 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_id 214 | msgid "Product Variant" 215 | msgstr "Ürün Varyantı" 216 | 217 | #. module: mrp_bom_current_stock 218 | #. odoo-python 219 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 220 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 221 | msgid "Qty Available (Location)" 222 | msgstr "Kullanılabilir Miktar (Konum)" 223 | 224 | #. module: mrp_bom_current_stock 225 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__qty_available_in_source_loc 226 | msgid "Qty Available in Source" 227 | msgstr "Kaynakta Kullanılabilir Miktar" 228 | 229 | #. module: mrp_bom_current_stock 230 | #. odoo-python 231 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 232 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty 233 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 234 | msgid "Quantity" 235 | msgstr "Miktar" 236 | 237 | #. module: mrp_bom_current_stock 238 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 239 | msgid "Select product and location to explode" 240 | msgstr "Patlatmak için ürün ve konum seçin" 241 | 242 | #. module: mrp_bom_current_stock 243 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 244 | msgid "Set the source location for every component." 245 | msgstr "Her bileşen için kaynak konumunu ayarlayın." 246 | 247 | #. module: mrp_bom_current_stock 248 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__location_id 249 | msgid "Source location" 250 | msgstr "Kaynak Konumu" 251 | 252 | #. module: mrp_bom_current_stock 253 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__bom_id 254 | msgid "Starting Bill of Materials" 255 | msgstr "Ürün Reçetesi Başlangıcı" 256 | 257 | #. module: mrp_bom_current_stock 258 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__location_id 259 | msgid "Starting location" 260 | msgstr "Başlama konumu" 261 | 262 | #. module: mrp_bom_current_stock 263 | #: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty 264 | msgid "" 265 | "This should be the smallest quantity that this product can be produced in. " 266 | "If the BOM contains operations, make sure the work center capacity is " 267 | "accurate." 268 | msgstr "" 269 | "Bu, ürünün üretilebileceği en küçük miktar olmalıdır. Ürün reçetesi " 270 | "operasyon içeriyorsa, iş merkezi kapasitesinin doğru olduğundan emin olun." 271 | 272 | #. module: mrp_bom_current_stock 273 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id 274 | msgid "Unit of Measure" 275 | msgstr "Ölçü Birimi" 276 | 277 | #. module: mrp_bom_current_stock 278 | #: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id 279 | msgid "" 280 | "Unit of Measure (Unit of Measure) is the unit of measurement for the " 281 | "inventory control" 282 | msgstr "Ölçü Birimi (Ölçü Birimi), envanter kontrolü için ölçü birimidir" 283 | 284 | #. module: mrp_bom_current_stock 285 | #. odoo-python 286 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 287 | msgid "UoM" 288 | msgstr "Ölçü Birimi" 289 | 290 | #. module: mrp_bom_current_stock 291 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 292 | msgid "or" 293 | msgstr "veya" 294 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/i18n/it.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * mrp_bom_current_stock 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 16.0+e\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2023-05-30 07:11+0000\n" 10 | "PO-Revision-Date: 2023-05-30 07:11+0000\n" 11 | "Last-Translator: \n" 12 | "Language-Team: \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: \n" 16 | "Plural-Forms: \n" 17 | 18 | #. module: mrp_bom_current_stock 19 | #. odoo-python 20 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 21 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 22 | #, python-format 23 | msgid "BOM Current Stock Report" 24 | msgstr "Resoconto giacenza attuale DiBa" 25 | 26 | #. module: mrp_bom_current_stock 27 | #: model:ir.actions.act_window,name:mrp_bom_current_stock.mrp_bom_current_stock_action 28 | #: model:ir.ui.menu,name:mrp_bom_current_stock.mrp_bom_current_stock_menu 29 | msgid "BoM Current Stock Explosion" 30 | msgstr "Esploso giacenza attuale DiBa" 31 | 32 | #. module: mrp_bom_current_stock 33 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_level 34 | msgid "BoM Level" 35 | msgstr "Livello DiBa" 36 | 37 | #. module: mrp_bom_current_stock 38 | #. odoo-python 39 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 40 | #, python-format 41 | msgid "BoM Reference" 42 | msgstr "Riferimento DiBa" 43 | 44 | #. module: mrp_bom_current_stock 45 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_line 46 | msgid "BoM line" 47 | msgstr "Riga DiBa" 48 | 49 | #. module: mrp_bom_current_stock 50 | #: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_pdf 51 | msgid "BoM: Current Stock Report PDF" 52 | msgstr "DiBa: resoconto PDF giacenza attuale" 53 | 54 | #. module: mrp_bom_current_stock 55 | #: model:ir.actions.report,name:mrp_bom_current_stock.action_report_bom_current_stock_xlsx 56 | msgid "BoM: Current Stock Report XLSX" 57 | msgstr "DiBa: resoconto XLSX giacenza attuale" 58 | 59 | #. module: mrp_bom_current_stock 60 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 61 | msgid "Cancel" 62 | msgstr "Annulla" 63 | 64 | #. module: mrp_bom_current_stock 65 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 66 | msgid "Close" 67 | msgstr "Chiudi" 68 | 69 | #. module: mrp_bom_current_stock 70 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_uid 71 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_uid 72 | msgid "Created by" 73 | msgstr "Creato da" 74 | 75 | #. module: mrp_bom_current_stock 76 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__create_date 77 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__create_date 78 | msgid "Created on" 79 | msgstr "Creato il" 80 | 81 | #. module: mrp_bom_current_stock 82 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__display_name 83 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__display_name 84 | msgid "Display Name" 85 | msgstr "Nome visualizzato" 86 | 87 | #. module: mrp_bom_current_stock 88 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 89 | msgid "Explode" 90 | msgstr "Espandi" 91 | 92 | #. module: mrp_bom_current_stock 93 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__explosion_id 94 | msgid "Explosion" 95 | msgstr "Esploso" 96 | 97 | #. module: mrp_bom_current_stock 98 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 99 | msgid "Explosion result" 100 | msgstr "Risultato espolso" 101 | 102 | #. module: mrp_bom_current_stock 103 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 104 | msgid "Export XLSX" 105 | msgstr "Esporta XLSX" 106 | 107 | #. module: mrp_bom_current_stock 108 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__id 109 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__id 110 | msgid "ID" 111 | msgstr "ID" 112 | 113 | #. module: mrp_bom_current_stock 114 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock____last_update 115 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line____last_update 116 | msgid "Last Modified on" 117 | msgstr "Ultima modifica il" 118 | 119 | #. module: mrp_bom_current_stock 120 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_uid 121 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_uid 122 | msgid "Last Updated by" 123 | msgstr "Ultimo aggiornamento di" 124 | 125 | #. module: mrp_bom_current_stock 126 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__write_date 127 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__write_date 128 | msgid "Last Updated on" 129 | msgstr "Ultimo aggiornamento il" 130 | 131 | #. module: mrp_bom_current_stock 132 | #. odoo-python 133 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 134 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 135 | #, python-format 136 | msgid "Level" 137 | msgstr "Livello" 138 | 139 | #. module: mrp_bom_current_stock 140 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__line_ids 141 | msgid "Line" 142 | msgstr "Riga" 143 | 144 | #. module: mrp_bom_current_stock 145 | #. odoo-python 146 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 147 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 148 | #, python-format 149 | msgid "Location" 150 | msgstr "Ubicazione" 151 | 152 | #. module: mrp_bom_current_stock 153 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 154 | msgid "Location:" 155 | msgstr "Ubicazione:" 156 | 157 | #. module: mrp_bom_current_stock 158 | #: model:ir.model,name:mrp_bom_current_stock.model_report_mrp_bom_current_stock_report_mrpbom_current_stock_xlsx 159 | msgid "MRP BOM Current Stock XLSX Report" 160 | msgstr "Resoconto XLSX giacenza attuale DiBa MRP" 161 | 162 | #. module: mrp_bom_current_stock 163 | #: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock 164 | msgid "MRP Bom Route Current Stock" 165 | msgstr "Giacenza attuale rotta DiBa MRP" 166 | 167 | #. module: mrp_bom_current_stock 168 | #: model:ir.model,name:mrp_bom_current_stock.model_mrp_bom_current_stock_line 169 | msgid "MRP Bom Route Current Stock Line" 170 | msgstr "Riga giacenza attuale rotta DiBa MRP" 171 | 172 | #. module: mrp_bom_current_stock 173 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__bom_id 174 | msgid "Parent BoM" 175 | msgstr "DiBa padre" 176 | 177 | #. module: mrp_bom_current_stock 178 | #. odoo-python 179 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 180 | #, python-format 181 | msgid "Parent BoM Ref" 182 | msgstr "Riferimento DiBa padre" 183 | 184 | #. module: mrp_bom_current_stock 185 | #. odoo-python 186 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 187 | #, python-format 188 | msgid "Parent Product Ref" 189 | msgstr "Riferimento prodotto padre" 190 | 191 | #. module: mrp_bom_current_stock 192 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 193 | msgid "Print PDF" 194 | msgstr "Stampa PDF" 195 | 196 | #. module: mrp_bom_current_stock 197 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 198 | msgid "Product" 199 | msgstr "Prodotto" 200 | 201 | #. module: mrp_bom_current_stock 202 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_qty 203 | msgid "Product Quantity" 204 | msgstr "Quantità prodotto" 205 | 206 | #. module: mrp_bom_current_stock 207 | #. odoo-python 208 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 209 | #, python-format 210 | msgid "Product Reference" 211 | msgstr "Riferimento prodotto" 212 | 213 | #. module: mrp_bom_current_stock 214 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_tmpl_id 215 | msgid "Product Template" 216 | msgstr "Modello prodotto" 217 | 218 | #. module: mrp_bom_current_stock 219 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_uom_id 220 | msgid "Product Unit of Measure" 221 | msgstr "Unità di misura del prodotto" 222 | 223 | #. module: mrp_bom_current_stock 224 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_id 225 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__product_id 226 | msgid "Product Variant" 227 | msgstr "Variante prodotto" 228 | 229 | #. module: mrp_bom_current_stock 230 | #. odoo-python 231 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 232 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 233 | #, python-format 234 | msgid "Qty Available (Location)" 235 | msgstr "Qta. disponibile (ubicazione)" 236 | 237 | #. module: mrp_bom_current_stock 238 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__qty_available_in_source_loc 239 | msgid "Qty Available in Source" 240 | msgstr "Qta. disponibile in sorgente" 241 | 242 | #. module: mrp_bom_current_stock 243 | #. odoo-python 244 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 245 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty 246 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.report_mrpbom_current_stock_pdf 247 | #, python-format 248 | msgid "Quantity" 249 | msgstr "Quantità" 250 | 251 | #. module: mrp_bom_current_stock 252 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form 253 | msgid "Select product and location to explode" 254 | msgstr "Selezionare il prodotto e l'ubicazione da esplodere" 255 | 256 | #. module: mrp_bom_current_stock 257 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 258 | msgid "Set the source location for every component." 259 | msgstr "Impostare l'ubicazione di origine per ogni componente." 260 | 261 | #. module: mrp_bom_current_stock 262 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock_line__location_id 263 | msgid "Source location" 264 | msgstr "Ubicazione di origine" 265 | 266 | #. module: mrp_bom_current_stock 267 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__bom_id 268 | msgid "Starting Bill of Materials" 269 | msgstr "Distinta base di partenza" 270 | 271 | #. module: mrp_bom_current_stock 272 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__location_id 273 | msgid "Starting location" 274 | msgstr "Ubicazione di partenza" 275 | 276 | #. module: mrp_bom_current_stock 277 | #: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_qty 278 | msgid "" 279 | "This should be the smallest quantity that this product can be produced in. " 280 | "If the BOM contains operations, make sure the work center capacity is " 281 | "accurate." 282 | msgstr "" 283 | "Questa dovrebbe essere la quantità minima di produzione del prodotto. Se la " 284 | "DiBa contiene operazioni, assicurarsi che la capacità del centro di lavoro " 285 | "sia precisa." 286 | 287 | #. module: mrp_bom_current_stock 288 | #: model:ir.model.fields,field_description:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id 289 | msgid "Unit of Measure" 290 | msgstr "Unità di misura" 291 | 292 | #. module: mrp_bom_current_stock 293 | #: model:ir.model.fields,help:mrp_bom_current_stock.field_mrp_bom_current_stock__product_uom_id 294 | msgid "" 295 | "Unit of Measure (Unit of Measure) is the unit of measurement for the " 296 | "inventory control" 297 | msgstr "" 298 | "Unità di misura (Unità di misura) è l'unità di misura per il controllo di " 299 | "inventario" 300 | 301 | #. module: mrp_bom_current_stock 302 | #. odoo-python 303 | #: code:addons/mrp_bom_current_stock/reports/report_mrpcurrentstock_xlsx.py:0 304 | #, python-format 305 | msgid "UoM" 306 | msgstr "UdM" 307 | 308 | #. module: mrp_bom_current_stock 309 | #: model_terms:ir.ui.view,arch_db:mrp_bom_current_stock.mrp_bom_current_stock_view_form2 310 | msgid "or" 311 | msgstr "o" 312 | -------------------------------------------------------------------------------- /mrp_bom_matrix_report/static/description/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MRP BOM Matrix Report 7 | 361 | 362 | 363 |
364 |

MRP BOM Matrix Report

365 | 366 | 372 |

Beta License: LGPL-3 OCA/manufacture-reporting Translate me on Weblate Try me on Runboat

373 |

The Matrix Bill of Materials is a report that shows connections between 374 | all parents and all components.

375 |

This report helps to identify the products that are used in lots of 376 | assemblies or finished products.

377 |

If a raw material/assembly is used in many parent assemblies/finished 378 | products, it is likely that you’d want to make sure that you never run 379 | out of it.

380 |

Table of contents

381 |
382 | 392 |
393 |
394 |

Usage

395 |
    396 |
  • Go to Manufacturing > Reporting > BOM Matrix.
  • 397 |
398 |
399 |
400 |

Bug Tracker

401 |

Bugs are tracked on GitHub Issues. 402 | In case of trouble, please check there if your issue has already been reported. 403 | If you spotted it first, help us to smash it by providing a detailed and welcomed 404 | feedback.

405 |

Do not contact contributors directly about support or help with technical issues.

406 |
407 |
408 |

Credits

409 |
410 |

Authors

411 |
    412 |
  • ForgeFlow
  • 413 |
414 |
415 |
416 |

Contributors

417 | 422 |
423 |
424 |

Maintainers

425 |

This module is maintained by the OCA.

426 | 427 | Odoo Community Association 428 | 429 |

OCA, or the Odoo Community Association, is a nonprofit organization whose 430 | mission is to support the collaborative development of Odoo features and 431 | promote its widespread use.

432 |

This module is part of the OCA/manufacture-reporting project on GitHub.

433 |

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

434 |
435 |
436 |
437 | 438 | 439 | -------------------------------------------------------------------------------- /mrp_bom_current_stock/static/description/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | README.rst 7 | 361 | 362 | 363 |
364 | 365 | 366 | 367 | Odoo Community Association 368 | 369 |
370 |

MRP BoM Current Stock

371 | 377 |

Beta License: AGPL-3 OCA/manufacture-reporting Translate me on Weblate Try me on Runboat

378 |

This modules extend the Manufacturing App adding a report that explodes 379 | the bill of materials and show the stock available in the source 380 | location.

381 |

Table of contents

382 |
383 | 393 |
394 |
395 |

Usage

396 |

To use this module, you need to:

397 |
    398 |
  1. Go to Manufacturing > Reporting > BoM Current Stock Explosion.
  2. 399 |
  3. Select Product, BoM and location and click on Explode.
  4. 400 |
  5. Set the proper location (if desired) for all the components displayed 401 | if you haven’t done so in the related BoMs.
  6. 402 |
  7. Click Print Report.
  8. 403 |
404 |
405 |
406 |

Bug Tracker

407 |

Bugs are tracked on GitHub Issues. 408 | In case of trouble, please check there if your issue has already been reported. 409 | If you spotted it first, help us to smash it by providing a detailed and welcomed 410 | feedback.

411 |

Do not contact contributors directly about support or help with technical issues.

412 |
413 |
414 |

Credits

415 |
416 |

Authors

417 |
    418 |
  • ForgeFlow
  • 419 |
420 |
421 |
422 |

Contributors

423 | 428 |
429 |
430 |

Maintainers

431 |

This module is maintained by the OCA.

432 | 433 | Odoo Community Association 434 | 435 |

OCA, or the Odoo Community Association, is a nonprofit organization whose 436 | mission is to support the collaborative development of Odoo features and 437 | promote its widespread use.

438 |

This module is part of the OCA/manufacture-reporting project on GitHub.

439 |

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

440 |
441 |
442 |
443 |
444 | 445 | 446 | -------------------------------------------------------------------------------- /mrp_flattened_bom_xlsx/static/description/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Export Flattened BOM to Excel 7 | 361 | 362 | 363 |
364 |

Export Flattened BOM to Excel

365 | 366 | 372 |

Beta License: AGPL-3 OCA/manufacture-reporting Translate me on Weblate Try me on Runboat

373 |

This module extends the functionality of the MRP capabilities of Odoo, 374 | and allows you to export the flattened BOM to MS Excel .XLSX format.

375 |

A flattened bill of material removes the intermediate levels in the BOM 376 | and connect the lowest levels directly to the highest level.

377 |

A list of the sum of lowest levels will be shown for every BoM you 378 | export using this method.

379 |

It also maintains units correctly across all nested BOM’s and take units 380 | that have been defined in product Unit of Measure field.

381 |

Table of contents

382 |
383 | 393 |
394 |
395 |

Usage

396 |

To use this module, you need to:

397 |
    398 |
  1. Go to ‘Manufacturing / Products / Bill of Materials’

    399 |
  2. 400 |
  3. Select a BOM or more BOMS

    401 |

    (Could be interesting to modify quantities of these BOMs)

    402 |
  4. 403 |
  5. Go to ‘Print / Export Flattened BOM to Excel’.

    404 |
  6. 405 |
406 |
407 |
408 |

Bug Tracker

409 |

Bugs are tracked on GitHub Issues. 410 | In case of trouble, please check there if your issue has already been reported. 411 | If you spotted it first, help us to smash it by providing a detailed and welcomed 412 | feedback.

413 |

Do not contact contributors directly about support or help with technical issues.

414 |
415 |
416 |

Credits

417 |
418 |

Authors

419 |
    420 |
  • ForgeFlow
  • 421 |
422 |
423 |
424 |

Contributors

425 | 431 |
432 |
433 |

Maintainers

434 |

This module is maintained by the OCA.

435 | 436 | Odoo Community Association 437 | 438 |

OCA, or the Odoo Community Association, is a nonprofit organization whose 439 | mission is to support the collaborative development of Odoo features and 440 | promote its widespread use.

441 |

This module is part of the OCA/manufacture-reporting project on GitHub.

442 |

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

443 |
444 |
445 |
446 | 447 | 448 | --------------------------------------------------------------------------------