Skip to content

Commit

Permalink
Merge PR #126 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed Apr 22, 2024
2 parents 8c273a0 + e9d7ba7 commit a89d453
Show file tree
Hide file tree
Showing 17 changed files with 397 additions and 0 deletions.
96 changes: 96 additions & 0 deletions mrp_bom_structure_xlsx_level_1/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
==============================
MRP BOM Structure XLSX Level 1
==============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f00f052dac3bc38a1255b949018c78fd5035b447c35dac47bc11fd072dd88c67
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/manufacture-reporting/tree/17.0/mrp_bom_structure_xlsx_level_1
:alt: OCA/manufacture-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/manufacture-reporting-17-0/manufacture-reporting-17-0-mrp_bom_structure_xlsx_level_1
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture-reporting&target_branch=17.0
:alt: Try me on Runboat

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

This module extends the functionality of the MRP capabilities of Odoo,
and allows you to export to level 1 of the BoM structure to MS Excel
.XLSX format.

If you have a Bill of Materials (A) for which one of the Components also
has a Bill of Materials (B), the report will only display the Components
within the first level for the selected Bill of Materials (A), but not
the Components from the Bill of Materials (B).

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Go to 'Manufacturing / Products / Bill of Materials'
2. Select a BoM or more BoMs
3. Go to 'Print / Export BoM Structure (Level 1) to Excel'.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture-reporting/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/manufacture-reporting/issues/new?body=module:%20mrp_bom_structure_xlsx_level_1%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* ForgeFlow

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

- Jordi Ballester <[email protected]>
- Miquel Raïch <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Víctor Martínez

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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

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

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

{
"name": "MRP BOM Structure XLSX Level 1",
"version": "17.0.1.0.0",
"category": "Manufacturing",
"summary": "Export BOM Structure (Level 1) to Excel .XLSX",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/manufacture-reporting",
"license": "AGPL-3",
"depends": ["mrp_bom_structure_xlsx"],
"data": ["report/bom_structure_xlsx.xml"],
"installable": True,
}
46 changes: 46 additions & 0 deletions mrp_bom_structure_xlsx_level_1/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_structure_xlsx_level_1
#
# Translators:
# Rudolf Schnapka <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-28 05:21+0000\n"
"PO-Revision-Date: 2017-03-28 05:21+0000\n"
"Last-Translator: Rudolf Schnapka <[email protected]>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model,name:mrp_bom_structure_xlsx_level_1.model_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1
#, fuzzy
msgid "BOM Structure XLSX Level 1 Report"
msgstr "Exportiere SL-Hierarchie (Stufe 1) nach Excel"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model.fields,field_description:mrp_bom_structure_xlsx_level_1.field_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1__display_name
msgid "Display Name"
msgstr ""

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.actions.report,name:mrp_bom_structure_xlsx_level_1.bom_structure_xlsx_l1
#, fuzzy
msgid "Export BoM Structure (Level 1) to Excel"
msgstr "Exportiere SL-Hierarchie (Stufe 1) nach Excel"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model.fields,field_description:mrp_bom_structure_xlsx_level_1.field_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1__id
msgid "ID"
msgstr ""

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model.fields,field_description:mrp_bom_structure_xlsx_level_1.field_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1____last_update
msgid "Last Modified on"
msgstr ""
42 changes: 42 additions & 0 deletions mrp_bom_structure_xlsx_level_1/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_structure_xlsx_level_1
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-05-17 12:34+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model,name:mrp_bom_structure_xlsx_level_1.model_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1
msgid "BOM Structure XLSX Level 1 Report"
msgstr "Resoconto XLSX struttura DiBa"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model.fields,field_description:mrp_bom_structure_xlsx_level_1.field_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.actions.report,name:mrp_bom_structure_xlsx_level_1.bom_structure_xlsx_l1
msgid "Export BoM Structure (Level 1) to Excel"
msgstr "Esporta struttura DiBa (livello 1) in Excel"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model.fields,field_description:mrp_bom_structure_xlsx_level_1.field_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1__id
msgid "ID"
msgstr "ID"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model.fields,field_description:mrp_bom_structure_xlsx_level_1.field_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_structure_xlsx_level_1
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.model,name:mrp_bom_structure_xlsx_level_1.model_report_mrp_bom_structure_xlsx_l1_bom_structure_xlsx_l1
msgid "BOM Structure XLSX Level 1 Report"
msgstr ""

#. module: mrp_bom_structure_xlsx_level_1
#: model:ir.actions.report,name:mrp_bom_structure_xlsx_level_1.bom_structure_xlsx_l1
msgid "Export BoM Structure (Level 1) to Excel"
msgstr ""
3 changes: 3 additions & 0 deletions mrp_bom_structure_xlsx_level_1/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions mrp_bom_structure_xlsx_level_1/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Jordi Ballester \<<[email protected]>\>
- Miquel Raïch \<<[email protected]>\>
- [Tecnativa](https://www.tecnativa.com):
- Víctor Martínez
7 changes: 7 additions & 0 deletions mrp_bom_structure_xlsx_level_1/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This module extends the functionality of the MRP capabilities of Odoo,
and allows you to export to level 1 of the BoM structure to MS Excel
.XLSX format.

If you have a Bill of Materials (A) for which one of the Components also has a Bill of Materials (B),
the report will only display the Components within the first level for the selected Bill of Materials (A),
but not the Components from the Bill of Materials (B).
5 changes: 5 additions & 0 deletions mrp_bom_structure_xlsx_level_1/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To use this module, you need to:

1. Go to 'Manufacturing / Products / Bill of Materials'
2. Select a BoM or more BoMs
3. Go to 'Print / Export BoM Structure (Level 1) to Excel'.
2 changes: 2 additions & 0 deletions mrp_bom_structure_xlsx_level_1/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import bom_structure_xlsx
28 changes: 28 additions & 0 deletions mrp_bom_structure_xlsx_level_1/report/bom_structure_xlsx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2018-24 ForgeFlow S.L. (https://www.forgeflow.com))
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).


from odoo import models


class BomStructureXlsxL1(models.AbstractModel):
_name = "report.mrp_bom_structure_xlsx_l1.bom_structure_xlsx_l1"
_description = "BOM Structure XLSX Level 1 Report"
_inherit = "report.mrp_bom_structure_xlsx.bom_structure_xlsx"

def print_bom_children(self, ch, sheet, row, level):
i, j = row, level
j += 1
sheet.write(i, 1, "> " * j)
sheet.write(i, 2, ch.product_id.default_code or "")
sheet.write(i, 3, ch.product_id.display_name or "")
sheet.write(
i,
4,
ch.product_uom_id._compute_quantity(ch.product_qty, ch.product_id.uom_id)
or "",
)
sheet.write(i, 5, ch.product_id.uom_id.name or "")
sheet.write(i, 6, ch.bom_id.code or "")
i += 1
return i
18 changes: 18 additions & 0 deletions mrp_bom_structure_xlsx_level_1/report/bom_structure_xlsx.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018-24 ForgeFlow S.L. (https://www.forgeflow.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="bom_structure_xlsx_l1" model="ir.actions.report">
<field name="name">Export BoM Structure (Level 1) to Excel</field>
<field name="model">mrp.bom</field>
<field name="type">ir.actions.report</field>
<field name="binding_model_id" ref="mrp.model_mrp_bom" />
<field
name="report_name"
>mrp_bom_structure_xlsx_l1.bom_structure_xlsx_l1</field>
<field name="report_type">xlsx</field>
<field
name="report_file"
>mrp_bom_structure_xlsx_l1.bom_structure_xlsx_l1</field>
</record>
</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions mrp_bom_structure_xlsx_level_1/static/description/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">Export BOM Structure (Level 1) to Excel</h2>
<p>
This module extends the functionality of the MRP capabilities of Odoo,
and allows you to export to level 1 of the BOM structure to MS Excel .XLSX format.
</p>
</div>
</div>
</section>

<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">Installation</h2>
</div>
<div class="oe_span6">
<p class="oe_mt32">No additional installation instructions are required.</p>
</div>
</div>
</section>

<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">Configuration</h2>
</div>
<div class="oe_span6">
<p class="oe_mt32">This module does not require any additional configuration.</p>
</div>
</div>
</section>

<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">Usage</h2>
</div>
<div class="oe_span6">
<p class="oe_mt32">
In the Bill of Materials form or list views, press 'Print > Export BOM
Structure to Excel (Level 1)'.
</p>
</div>
</div>
</section>

<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">Known issues / Roadmap</h2>
</div>
<div class="oe_span6">
<p class="oe_mt32">No issues have been identified.</p>
</div>
</div>
</section>

<section class="oe_container oe_dark">
<div class="oe_row">
<div class="oe_span12">
<h2 class="oe_slogan">Credits</h2>
</div>
<div class="oe_span12">
<h3>Contributors</h3>
<ul>
<li>Jordi Ballester Alomar &lt;<a
href="mailto:[email protected]">[email protected]</a>&gt;</li>
</ul>
</div>
<div class="oe_span12">
<h3>Maintainer</h3>
<p>
This module is maintained by the OCA.<br/>
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.<br/>
To contribute to this module, please visit <a href="http://odoo-community.org">http://odoo-community.org</a>.<br/>
<a href="http://odoo-community.org"><img class="oe_picture oe_centered" src="http://odoo-community.org/logo.png"></a>
</p>
</div>
</div>
</section>
2 changes: 2 additions & 0 deletions mrp_bom_structure_xlsx_level_1/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import test_mrp_bom_structure_xlsx_level_1
Loading

0 comments on commit a89d453

Please sign in to comment.