Skip to content

Commit

Permalink
[16.0][IMP] mrp_production_report: Qty reserved and done in report
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredoavanzosc committed Jan 23, 2025
1 parent 302e5a0 commit efea1c1
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 69 deletions.
1 change: 0 additions & 1 deletion mrp_production_report/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from . import models
4 changes: 1 addition & 3 deletions mrp_production_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"author": "AvanzOSC,",
"license": "AGPL-3",
"summary": "BoM notes",
"depends": [
"mrp",
],
"depends": ["mrp", "mrp_workorder_sequence"],
"data": ["report/mrp_production_report.xml"],
"installable": True,
}
16 changes: 8 additions & 8 deletions mrp_production_report/i18n/ca_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-14 11:26+0000\n"
"PO-Revision-Date: 2024-11-14 11:26+0000\n"
"POT-Creation-Date: 2025-01-23 13:31+0000\n"
"PO-Revision-Date: 2025-01-23 13:31+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -36,16 +36,16 @@ msgid "<strong>Scheduled Date:</strong><br/>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Location"
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>Sequence</strong>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Lots"
msgid "Reserved"
msgstr ""

#. module: mrp_production_report
#: model:ir.model,name:mrp_production_report.model_stock_move
msgid "Stock Move"
msgstr "Moviment d'estoc"
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "done"
msgstr ""
51 changes: 51 additions & 0 deletions mrp_production_report/i18n/en_US.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_production_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-23 13:31+0000\n"
"PO-Revision-Date: 2025-01-23 13:31+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_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>BoM:</strong><br/>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>Date Start</strong>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>Lot/Serial Number:</strong><br/>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>Scheduled Date:</strong><br/>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>Sequence</strong>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Reserved"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "done"
msgstr ""
20 changes: 10 additions & 10 deletions mrp_production_report/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-14 11:27+0000\n"
"PO-Revision-Date: 2024-11-14 11:27+0000\n"
"POT-Creation-Date: 2025-01-23 13:32+0000\n"
"PO-Revision-Date: 2025-01-23 13:32+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -36,16 +36,16 @@ msgid "<strong>Scheduled Date:</strong><br/>"
msgstr "<strong>Fecha prevista:</strong><br/>"

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Location"
msgstr "Ubicación"
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>Sequence</strong>"
msgstr "<strong>Secuencia</strong>"

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Lots"
msgstr "Lotes"
msgid "Reserved"
msgstr "Reservado"

#. module: mrp_production_report
#: model:ir.model,name:mrp_production_report.model_stock_move
msgid "Stock Move"
msgstr "Movimiento de existencias"
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "done"
msgstr "Realizado"
16 changes: 8 additions & 8 deletions mrp_production_report/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-14 11:27+0000\n"
"PO-Revision-Date: 2024-11-14 11:27+0000\n"
"POT-Creation-Date: 2025-01-23 13:32+0000\n"
"PO-Revision-Date: 2025-01-23 13:32+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -36,16 +36,16 @@ msgid "<strong>Scheduled Date:</strong><br/>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Location"
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>Sequence</strong>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Lots"
msgid "Reserved"
msgstr ""

#. module: mrp_production_report
#: model:ir.model,name:mrp_production_report.model_stock_move
msgid "Stock Move"
msgstr "Mouvement de stock"
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "done"
msgstr ""
14 changes: 7 additions & 7 deletions mrp_production_report/i18n/mrp_production_report.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-14 11:26+0000\n"
"PO-Revision-Date: 2024-11-14 11:26+0000\n"
"POT-Creation-Date: 2025-01-23 13:31+0000\n"
"PO-Revision-Date: 2025-01-23 13:31+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -36,16 +36,16 @@ msgid "<strong>Scheduled Date:</strong><br/>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Location"
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder
msgid "<strong>Sequence</strong>"
msgstr ""

#. module: mrp_production_report
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "Lots"
msgid "Reserved"
msgstr ""

#. module: mrp_production_report
#: model:ir.model,name:mrp_production_report.model_stock_move
msgid "Stock Move"
#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components
msgid "done"
msgstr ""
1 change: 0 additions & 1 deletion mrp_production_report/models/__init__.py

This file was deleted.

18 changes: 0 additions & 18 deletions mrp_production_report/models/stock_move.py

This file was deleted.

58 changes: 45 additions & 13 deletions mrp_production_report/report/mrp_production_report.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_mrporder" inherit_id="mrp.report_mrporder">
<t t-call="web.internal_layout" position="attributes">
<attribute name="t-call">web.external_layout</attribute>
</t>
<xpath expr="//span[@t-field='o.product_qty']/.." position="after">
<div
t-if="o.lot_producing_id"
Expand Down Expand Up @@ -51,27 +54,56 @@
t-field="line2.date_planned_start"
/></td>
</xpath>

<xpath expr="//table/tr[1]/th[1]" position="before">
<th width="15%" class="text-center"><strong>Sequence</strong></th>
</xpath>
<xpath expr="//table/tr[2]/td[1]" position="before">
<td width="15%" class="text-center">
<span t-field="line2.sequence" />
<div
t-field="line2.sequence"
t-options="{'widget': 'barcode', 'width': 600, 'height': 100, 'img_style': 'width:100%;height:35px'}"
/>
</td>
</xpath>
</template>

<template
id="report_mrp_production_components"
inherit_id="mrp.report_mrp_production_components"
>
<th t-if="o.state in ('progress', 'to_close','done')" position="before">
<th name="th-lots" class="text-start">
Lots
</th>
<th name="th-location" class="text-start">
Location
</th>
<th t-if="o.state in ('progress', 'to_close','done')" position="replace" />
<xpath expr="//tbody//td[2]" position="replace" />
<th t-if="has_product_barcode" position="before">
<th t-if="o.state in ('progress', 'confirmed')">Reserved</th>
<th t-if="o.state == 'done'">done</th>
</th>
<xpath expr="//span[@t-field='raw_line.product_id']/.." position="after">
<td name="td-lots" class="text-start">
<span t-esc="raw_line._get_lots_mrp_production_report()" />
<th t-if="has_product_barcode" position="replace" />
<td t-if="has_product_barcode" position="before">
<td
t-if="o.state in ('confirmed','progress')"
style="text-align: left !important;"
>
<span t-field="raw_line.forecast_availability" />
</td>
<td name="td-location" class="text-start">
<span t-field="raw_line.location_id.name" />
<td t-if="o.state == 'done'" style="text-align: left !important;">
<span t-field="raw_line.quantity_done" />
<span t-field="raw_line.product_uom" groups="uom.group_uom" />
</td>
</xpath>
</td>
<td t-if="has_product_barcode" position="replace" />

<span t-field="raw_line.product_id" position="after">
<t t-foreach="raw_line.move_line_ids" t-as="move_line">
<br />
<span t-if="move_line.lot_id" t-field="move_line.lot_id" />
//
<span t-if="move_line.location_id" t-field="move_line.location_id" />
//
<span t-field="move_line.qty_done" />
</t>
</span>

</template>
</odoo>

0 comments on commit efea1c1

Please sign in to comment.