Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] mrp_bom_simple_report_with_sections_notes #1394

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions mrp_bom_simple_report_with_sections_notes/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
=============================================
MRP BoM Simple Report With Sections and Notes
=============================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:95a265acaa5c3209291d52f2c5768588412811d41d0cd2e234ec1a65b05a4e0c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-lightgray.png?logo=github
:target: https://github.com/OCA/manufacture/tree/16.0/mrp_bom_simple_report_with_sections_notes
:alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-mrp_bom_simple_report_with_sections_notes
: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&target_branch=16.0
:alt: Try me on Runboat

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

Adds a PDF report to print BoM(s) in a very simple way, with sections and notes.

.. figure:: https://raw.githubusercontent.com/OCA/manufacture/16.0/mrp_bom_simple_report_with_sections_notes/static/description/bom_simple_report_new_action.jpeg

.. figure:: https://raw.githubusercontent.com/OCA/manufacture/16.0/mrp_bom_simple_report_with_sections_notes/static/description/bom_simple_report_new_report.png

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/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/issues/new?body=module:%20mrp_bom_simple_report_with_sections_notes%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* GRAP

Contributors
~~~~~~~~~~~~

* Quentin Dupont (quentin.dupont@grap.coop)

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

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

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

.. |maintainer-quentinDupont| image:: https://github.com/quentinDupont.png?size=40px
:target: https://github.com/quentinDupont
:alt: quentinDupont

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-quentinDupont|

This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/16.0/mrp_bom_simple_report_with_sections_notes>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file.
28 changes: 28 additions & 0 deletions mrp_bom_simple_report_with_sections_notes/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop)
# @author: Quentin Dupont (quentin.dupont@grap.coop)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "MRP BoM Simple Report With Sections and Notes",
"summary": "Print simple report for your Bill of Materials with Sections and Notes",
"version": "16.0.1.0.0",
"category": "Manufacturing",
"author": "GRAP, Odoo Community Association (OCA)",
"maintainers": ["quentinDupont"],
"website": "https://github.com/OCA/manufacture",
"license": "AGPL-3",
"depends": [
"mrp_bom_widget_section_and_note_one2many",
],
"assets": {
"web.report_assets_common": [
"/mrp_bom_simple_report_with_sections_notes/"
"static/src/scss/mrp_bom_simple_report.scss"
],
},
"data": [
"report/report_simple_bom.xml",
"report/ir_actions_report.xml",
],
"installable": True,
}
51 changes: 51 additions & 0 deletions mrp_bom_simple_report_with_sections_notes/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_simple_report_with_sections_notes
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-13 10:53+0000\n"
"PO-Revision-Date: 2024-11-13 10:53+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: mrp_bom_simple_report_with_sections_notes
#: model_terms:ir.ui.view,arch_db:mrp_bom_simple_report_with_sections_notes.bom_simple_report_xml
msgid "<b>Quantity: </b>"
msgstr "<b>Quantité : </b>"

#. module: mrp_bom_simple_report_with_sections_notes
#: model_terms:ir.ui.view,arch_db:mrp_bom_simple_report_with_sections_notes.bom_simple_report_xml
msgid "<span>Bill of Material</span>"
msgstr "<span>Fiche Technique</span>"

#. module: mrp_bom_simple_report_with_sections_notes
#: model_terms:ir.ui.view,arch_db:mrp_bom_simple_report_with_sections_notes.bom_simple_report_xml
msgid "Component"
msgstr "Matière Première"

#. module: mrp_bom_simple_report_with_sections_notes
#: model_terms:ir.ui.view,arch_db:mrp_bom_simple_report_with_sections_notes.bom_simple_report_xml
msgid "Free comment"
msgstr "Commentaire libre"

#. module: mrp_bom_simple_report_with_sections_notes
#: model_terms:ir.ui.view,arch_db:mrp_bom_simple_report_with_sections_notes.bom_simple_report_xml
msgid "Quantity"
msgstr "Quantité"

#. module: mrp_bom_simple_report_with_sections_notes
#: model:ir.actions.report,name:mrp_bom_simple_report_with_sections_notes.mrp_bom_simple_report_action_sections_notes
msgid "Simple Bill of Material With Sections and Notes"
msgstr "Fiche technique simple avec sections et notes"

#. module: mrp_bom_simple_report_with_sections_notes
#: model_terms:ir.ui.view,arch_db:mrp_bom_simple_report_with_sections_notes.bom_simple_report_xml
msgid "UoM"
msgstr "UdM"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Quentin Dupont (quentin.dupont@grap.coop)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Adds a PDF report to print BoM(s) in a very simple way, with sections and notes.

.. figure:: ../static/description/bom_simple_report_new_action.jpeg

.. figure:: ../static/description/bom_simple_report_new_report.png
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2024 - Today: GRAP (http://www.grap.coop)
@author: Quentin DUPONT (quentin.dupont@grap.coop)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record
id="mrp_bom_simple_report_action_sections_notes"
model="ir.actions.report"
>
<field name="model">mrp.bom</field>
<field name="name">Simple Bill of Material With Sections and Notes</field>
<field name="report_type">qweb-pdf</field>
<field
name="report_name"
>mrp_bom_simple_report_with_sections_notes.bom_simple_report_xml</field>
<field name="attachment_use">False</field>
<field name="binding_model_id" ref="mrp.model_mrp_bom" />
<field name="binding_type">report</field>
<field name="paperformat_id" ref="product.paperformat_label_sheet" />
</record>

</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
@author: Quentin DUPONT (quentin.dupont@grap.coop)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<template id="bom_simple_report_xml">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="bom">
<!-- One page per BoM -->
<div
class="page bom-simple-report-page middle-font-size"
style="page-break-before:always;"
>
<span>Bill of Material</span>
<h3 class="title-h3"><b><span t-esc="bom.display_name" /></b></h3>
<span class="bom.product_qty"><b>Quantity: </b><span
t-esc="bom.product_qty"
/> <span t-esc="bom.product_uom_id.name" /></span>
<br /><br />
<table class="table table-sm table-bordered">
<thead>
<tr class="bom_to_prepare_thead th-colored">
<th
name="th_bom_line_product"
class="text-left"
>Component</th>
<th
name="th_bom_line_qty"
class="text-center width-qty-and-unit"
>Quantity</th>
<th
name="th_bom_line_uom"
class="text-left width-qty-and-unit"
>UoM</th>
<th
name="th_bom_line_free_comment"
class="text-center width-free-comment"
>Free comment</th>
</tr>
</thead>
<tbody class="bom_to_prepare_tbody">
<t t-foreach="bom.bom_line_with_sectionnote_ids" t-as="bom_line">
<!-- SECTIONS -->
<tr t-if="bom_line.display_type == 'line_section'">
<td
colspan="100%"
name="td_bom_line_name"
class="text-left line_section"
>
<span t-esc="bom_line.name" />
</td>
</tr>
<!-- NOTES -->
<tr t-elif="bom_line.display_type == 'line_note'">
<td
colspan="100%"
name="td_bom_line_name"
class="text-left line_note"
>
<span t-field="bom_line.name" />
</td>
</tr>
<!-- COMPONENTS -->
<tr t-else="">
<td name="td_bom_line_product" class="text-left">
<span t-esc="bom_line.display_name" />
</td>
<td
name="td_bom_line_qty"
class="text-center width-qty-and-unit"
>
<span t-esc="bom_line.product_qty" />
</td>
<td name="td_bom_line_uom" class="text-left width-qty-and-unit">
<span t-esc="bom_line.product_uom_id.name" />
</td>
<td
name="td_bom_line_free_comment"
class="width-free-comment"
/>
</tr>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>

</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading