mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
0
stock_move_value_report/__init__.py
Normal file
0
stock_move_value_report/__init__.py
Normal file
24
stock_move_value_report/__manifest__.py
Normal file
24
stock_move_value_report/__manifest__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright 2019 Tecnativa - David Vidal
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "Stock Move Cost Value Report",
|
||||
"version": "11.0.1.0.0",
|
||||
"category": "Warehouse",
|
||||
"website": "https://github.com/OCA/stock-logistics-reporting",
|
||||
"author": "Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
"installable": True,
|
||||
"depends": [
|
||||
"stock_account",
|
||||
],
|
||||
"data": [
|
||||
'report/stock_value_report.xml',
|
||||
'report/stock_move_line_value_report.xml',
|
||||
'report/stock_move_value_report.xml',
|
||||
'report/stock_picking_value_report.xml',
|
||||
'report/stock_scrap_value_report.xml',
|
||||
'report/stock_inventory_value_report.xml',
|
||||
],
|
||||
}
|
||||
153
stock_move_value_report/i18n/es.po
Normal file
153
stock_move_value_report/i18n/es.po
Normal file
@@ -0,0 +1,153 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_move_value_report
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-30 09:19+0000\n"
|
||||
"PO-Revision-Date: 2019-10-30 09:19+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: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<span><strong>Customer Address:</strong></span>"
|
||||
msgstr "<span><strong>Dirección del Cliente:</strong></span>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<span><strong>Delivery Address:</strong></span>"
|
||||
msgstr "<span><strong>Dirección de Envío:</strong></span>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<span><strong>Partner Address:</strong></span>"
|
||||
msgstr "<span><strong>Dirección de la empresa:</strong></span>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<span><strong>Warehouse Address:</strong></span>"
|
||||
msgstr "<span><strong>Dirección de almacén:</strong></span>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<strong>Commitment Date</strong>"
|
||||
msgstr "<strong>Fecha de compromiso</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_inventory_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "<strong>Date</strong>"
|
||||
msgstr "<strong>Fecha</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_inventory_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "<strong>Location</strong>"
|
||||
msgstr "<strong>Ubicación</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<strong>Order (Origin)</strong>"
|
||||
msgstr "<strong>Pedido (Origen)</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "<strong>Product</strong>"
|
||||
msgstr "<strong>Producto</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "<strong>Quantity</strong>"
|
||||
msgstr "<strong>Cantidad</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<strong>Scheduled Date</strong>"
|
||||
msgstr "<strong>Fecha planificada</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "<strong>Source Document</strong>"
|
||||
msgstr "<strong>Documento de Origen</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_inventory_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "<strong>State</strong>"
|
||||
msgstr "<strong>Estado</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "<strong>Subtotal</strong>"
|
||||
msgstr "<strong>Subtotal</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "<strong>Total operations value balance</strong>"
|
||||
msgstr "<strong>Balance total de operaciones</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value_total
|
||||
msgid "<strong>Total</strong>"
|
||||
msgstr "<strong>Total</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "<strong>Value</strong>"
|
||||
msgstr "<strong>Valor</strong>"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_inventory_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "Inventory"
|
||||
msgstr "Inventario"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_inventory_value
|
||||
msgid "Inventory Operations Cost Value"
|
||||
msgstr "Valor de Coste de Operaciones de Iventario"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "Lot/Serial Number"
|
||||
msgstr "Lote/Número de serie"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_move_line_value
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_move_value
|
||||
msgid "Operations Cost Value Report"
|
||||
msgstr "Informe de Valor de Coste de Operaciones"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "Picking"
|
||||
msgstr "Albarán"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_picking_value
|
||||
msgid "Picking Operations Cost Value"
|
||||
msgstr "Valor de Coste de Operaciones de Albarán"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "Scrap"
|
||||
msgstr "Desecho"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_scrap_value
|
||||
msgid "Scrap Operations Cost Value"
|
||||
msgstr "Valor de Coste de Operaciones de Desecho"
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "Selected operations cost value"
|
||||
msgstr "Valor de Coste de Operaciones Seleccionadas"
|
||||
153
stock_move_value_report/i18n/stock_move_value_report.pot
Normal file
153
stock_move_value_report/i18n/stock_move_value_report.pot
Normal file
@@ -0,0 +1,153 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_move_value_report
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-30 09:21+0000\n"
|
||||
"PO-Revision-Date: 2019-10-30 09:21+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: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<span><strong>Customer Address:</strong></span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<span><strong>Delivery Address:</strong></span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<span><strong>Partner Address:</strong></span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<span><strong>Warehouse Address:</strong></span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<strong>Commitment Date</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_inventory_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "<strong>Date</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_inventory_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "<strong>Location</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<strong>Order (Origin)</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "<strong>Product</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "<strong>Quantity</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
msgid "<strong>Scheduled Date</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "<strong>Source Document</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_inventory_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_picking_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "<strong>State</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "<strong>Subtotal</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "<strong>Total operations value balance</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value_total
|
||||
msgid "<strong>Total</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "<strong>Value</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_inventory_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "Inventory"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_inventory_value
|
||||
msgid "Inventory Operations Cost Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.stock_move_lines_value
|
||||
msgid "Lot/Serial Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_move_line_value
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_move_value
|
||||
msgid "Operations Cost Value Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "Picking"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_picking_value
|
||||
msgid "Picking Operations Cost Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_scrap_value_document
|
||||
msgid "Scrap"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.actions.report,name:stock_move_value_report.action_report_stock_scrap_value
|
||||
msgid "Scrap Operations Cost Value"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_move_value_report
|
||||
#: model:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "Selected operations cost value"
|
||||
msgstr ""
|
||||
3
stock_move_value_report/readme/CONTRIBUTORS.rst
Normal file
3
stock_move_value_report/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* David Vidal
|
||||
3
stock_move_value_report/readme/DESCRIPTION.rst
Normal file
3
stock_move_value_report/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
This module allows to obtain a report with the cost value of a given
|
||||
operation set like a picking, a scrap, an inventory or even a selection of
|
||||
moves or move lines.
|
||||
16
stock_move_value_report/readme/USAGE.rst
Normal file
16
stock_move_value_report/readme/USAGE.rst
Normal file
@@ -0,0 +1,16 @@
|
||||
To print the report you can either go to:
|
||||
|
||||
- *Inventory > Transfrers*
|
||||
- *Inventory > Inventory Adjustments*
|
||||
- *Inventory > Scraps*
|
||||
- *Inventory > Reporting > Stock Moves*
|
||||
- *Inventory > Reporting > Product Moves*
|
||||
|
||||
And then:
|
||||
|
||||
#. Switch to list view.
|
||||
#. Select records to print.
|
||||
#. And then *Print > Operations Cost Value Report*
|
||||
|
||||
A pdf preport with the operations linked to these records and their cost will
|
||||
be obtained. Keep in mind that only done operations will have a cost value.
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_stock_inventory_value_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<h1 class="mt0 pull-left">Inventory <t t-esc="inventory.name"/></h1>
|
||||
<div class="clearfix"/>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Location</strong></th>
|
||||
<th><strong>State</strong></th>
|
||||
<th><strong>Date</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="inventory.location_id.name"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="inventory.state"/>
|
||||
</td>
|
||||
|
||||
<td name="td_date">
|
||||
<span t-field="inventory.date"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value">
|
||||
<t t-set="move_lines" t-value="inventory.mapped('move_ids.move_line_ids')"/>
|
||||
<t t-set="currency_id" t-value="inventory.company_id.currency_id"/>
|
||||
</t>
|
||||
<br/>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value_total">
|
||||
<t t-set="move_lines" t-value="inventory.mapped('move_ids.move_line_ids')"/>
|
||||
<t t-set="currency_id" t-value="inventory.company_id.currency_id"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="report_stock_inventory_value">
|
||||
<t t-foreach="docs" t-as="inventory">
|
||||
<t t-call="stock_move_value_report.report_stock_inventory_value_document"/>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
166
stock_move_value_report/report/stock_move_line_value_report.xml
Normal file
166
stock_move_value_report/report/stock_move_line_value_report.xml
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="stock_move_lines_value">
|
||||
<table class="table table-condensed mt4 mb0">
|
||||
<t t-set="has_serial_number" t-value="move_lines.mapped('lot_id')" groups="stock.group_production_lot"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th name="th_product">
|
||||
<strong>Product</strong>
|
||||
</th>
|
||||
<th name="th_lot" t-if="has_serial_number">
|
||||
Lot/Serial Number
|
||||
</th>
|
||||
<th name="th_qty" class="text-center">
|
||||
<strong>Quantity</strong>
|
||||
</th>
|
||||
<th name="th_value" class="text-right">
|
||||
<strong>Value</strong>
|
||||
</th>
|
||||
<th name="th_value_sbtl" class="text-right">
|
||||
<strong>Subtotal</strong>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="move_lines" t-as="move_line">
|
||||
<td>
|
||||
<span t-field="move_line.product_id"/>
|
||||
<span t-field="move_line.product_id.sudo().description"/>
|
||||
</td>
|
||||
<t t-if="has_serial_number">
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="move_line.lot_id"/>
|
||||
<t t-if="not move_line.lot_id">
|
||||
<span t-field="move_line.lot_name"/>
|
||||
</t>
|
||||
</td>
|
||||
<td name="lot_qty">
|
||||
<t t-if="move_line.product_qty">
|
||||
<span t-field="move_line.product_qty"/>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</t>
|
||||
<td class="text-center">
|
||||
<span t-field="move_line.qty_done"/>
|
||||
<span t-field="move_line.product_uom_id"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="move_line.move_id.price_unit" t-options="{'widget': 'monetary', 'display_currency': currency_id}"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-esc="move_line.move_id.price_unit * move_line.qty_done" t-options="{'widget': 'monetary', 'display_currency': currency_id}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
<template id="stock_move_lines_value_total">
|
||||
<div class="clearfix">
|
||||
<div id="total" class="row">
|
||||
<div class="col-xs-4 pull-right">
|
||||
<table class="table table-condensed" style="min-width: 250px;max-width: 400px;page-break-inside: avoid;">
|
||||
<tr class="border-black">
|
||||
<td><strong>Total</strong></td>
|
||||
<td class="text-right">
|
||||
<span t-esc="sum([x.move_id.price_unit * x.qty_done for x in move_lines])" t-options="{'widget': 'monetary', 'display_currency': currency_id}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="report_stock_move_value_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<h2 class="mb48">Selected operations cost value</h2>
|
||||
<t t-set="ml_from_pickings" t-value="move_lines_ids.filtered('move_id.picking_id')"/>
|
||||
<t t-set="ml_from_inventories" t-value="move_lines_ids.filtered('move_id.inventory_id')"/>
|
||||
<t t-set="ml_from_scraps" t-value="move_lines_ids.filtered('move_id.scrapped')"/>
|
||||
<!-- ML From Pickings -->
|
||||
<t t-if="ml_from_pickings">
|
||||
<t t-set="pickings" t-value="ml_from_pickings.mapped('move_id.picking_id')"/>
|
||||
<t t-foreach="pickings" t-as="picking">
|
||||
<t t-set="picking_move_lines" t-value="ml_from_pickings.filtered(lambda x: x.picking_id == picking)"/>
|
||||
<h4><span>[<t t-esc="picking.date"/>]</span> Picking <t t-esc="picking.name"/>: <t t-esc="picking.location_id.name"/> → <t t-esc="picking.location_dest_id.name"/></h4>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value">
|
||||
<t t-set="move_lines" t-value="picking_move_lines"/>
|
||||
<t t-set="currency_id" t-value="picking.company_id.currency_id"/>
|
||||
</t>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value_total">
|
||||
<t t-set="move_lines" t-value="picking_move_lines"/>
|
||||
<t t-set="currency_id" t-value="picking.company_id.currency_id"/>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
<!-- ML From Inventories -->
|
||||
<t t-if="ml_from_inventories">
|
||||
<t t-set="inventories" t-value="ml_from_inventories.mapped('move_id.inventory_id')"/>
|
||||
<t t-foreach="inventories" t-as="inventory">
|
||||
<t t-set="inventory_move_lines" t-value="ml_from_inventories.filtered(lambda x: x.move_id.inventory_id == inventory)"/>
|
||||
<h4><span>[<t t-esc="inventory.date"/>]</span> Inventory <t t-esc="inventory.name"/>: <t t-esc="inventory.location_id.name"/></h4>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value">
|
||||
<t t-set="move_lines" t-value="inventory_move_lines"/>
|
||||
<t t-set="currency_id" t-value="inventory.company_id.currency_id"/>
|
||||
</t>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value_total">
|
||||
<t t-set="move_lines" t-value="inventory_move_lines"/>
|
||||
<t t-set="currency_id" t-value="inventory.company_id.currency_id"/>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
<!-- ML From Scraps -->
|
||||
<t t-if="ml_from_scraps">
|
||||
<t t-set="scraps" t-value="move_lines_ids.mapped('move_id.scrap_ids').filtered(lambda x: x.move_id in ml_from_scraps.mapped('move_id'))"/>
|
||||
<t t-foreach="scraps" t-as="scrap">
|
||||
<t t-set="scrap_move_lines" t-value="scrap.move_id.move_line_ids"/>
|
||||
<h4><span>[<t t-esc="scrap.move_id.date"/>]</span> Scrap <t t-esc="scrap.name"/>: <t t-esc="scrap.location_id.name"/> → <t t-esc="scrap.scrap_location_id.name"/></h4>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value">
|
||||
<t t-set="move_lines" t-value="scrap_move_lines"/>
|
||||
<t t-set="currency_id" t-value="res_company.currency_id"/>
|
||||
</t>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value_total">
|
||||
<t t-set="move_lines" t-value="scrap_move_lines"/>
|
||||
<t t-set="currency_id" t-value="res_company.currency_id"/>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
<!-- Total all moves -->
|
||||
<div class="clearfix">
|
||||
<div id="total" class="row">
|
||||
<div class="col-xs-4 pull-right">
|
||||
<table class="table table-condensed" style="min-width: 250px;max-width: 400px;page-break-inside: avoid;">
|
||||
<tr class="border-black">
|
||||
<td><strong>Total operations value balance</strong></td>
|
||||
<td class="text-right">
|
||||
<strong t-esc="sum([x.move_id.price_unit * x.qty_done for x in move_lines_ids])" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="report_stock_move_line_value">
|
||||
<t t-call="stock_move_value_report.report_stock_move_value_document">
|
||||
<t t-set="move_lines_ids" t-value="docs"/>
|
||||
<t t-set="currency_id" t-value="res_company.currency_id"/>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
11
stock_move_value_report/report/stock_move_value_report.xml
Normal file
11
stock_move_value_report/report/stock_move_value_report.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_stock_move_value">
|
||||
<t t-call="stock_move_value_report.report_stock_move_value_document">
|
||||
<t t-set="move_lines_ids" t-value="docs.mapped('move_line_ids')"/>
|
||||
<t t-set="currency_id" t-value="res_company.currency_id"/>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_stock_picking_value_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div t-if="picking.move_lines and picking.move_lines[0].partner_id and picking.move_lines[0].partner_id.id != picking.partner_id.id">
|
||||
<span><strong>Delivery Address:</strong></span>
|
||||
<div t-field="picking.move_lines[0].partner_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
|
||||
</div>
|
||||
<div t-if="picking.picking_type_id.code != 'internal' and (not picking.move_lines or not picking.move_lines[0].partner_id) and picking.picking_type_id.warehouse_id.partner_id">
|
||||
<span><strong>Warehouse Address:</strong></span>
|
||||
<div t-field="picking.picking_type_id.warehouse_id.partner_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-5 col-xs-offset-1">
|
||||
<div t-if="picking.picking_type_id.code=='incoming' and picking.partner_id">
|
||||
<span><strong>Partner Address:</strong></span>
|
||||
</div>
|
||||
<div t-if="picking.picking_type_id.code=='internal' and picking.partner_id">
|
||||
<span><strong>Warehouse Address:</strong></span>
|
||||
</div>
|
||||
<div t-if="picking.picking_type_id.code=='outgoing' and picking.partner_id">
|
||||
<span><strong>Customer Address:</strong></span>
|
||||
</div>
|
||||
<div t-if="picking.partner_id" name="partner_header">
|
||||
<div t-field="picking.partner_id"
|
||||
t-options='{"widget": "contact", "fields": ["name", "phone"], "no_marker": True, "phone_icons": True}'/>
|
||||
<p t-if="picking.sudo().partner_id.vat"><t t-esc="picking.company_id.country_id.vat_label or 'TIN'"/>: <span t-field="picking.sudo().partner_id.vat"/></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<h1 t-field="picking.name" class="mt0 pull-left"/>
|
||||
<div class="clearfix"/>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th t-if="picking.origin"><strong>Order (Origin)</strong></th>
|
||||
<th><strong>State</strong></th>
|
||||
<th><strong>Commitment Date</strong></th>
|
||||
<th name="td_sched_date_h"><strong>Scheduled Date</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td t-if="picking.origin">
|
||||
<span t-field="picking.origin"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="picking.state"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="picking.date"/>
|
||||
</td>
|
||||
<td name="td_sched_date">
|
||||
<span t-field="picking.scheduled_date"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<h4>[<t t-esc="picking.location_id.name"/> → <t t-esc="picking.location_dest_id.name"/>]</h4>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value">
|
||||
<t t-set="move_lines" t-value="picking.move_line_ids"/>
|
||||
<t t-set="currency_id" t-value="picking.company_id.currency_id"/>
|
||||
</t>
|
||||
<br/>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value_total">
|
||||
<t t-set="move_lines" t-value="picking.move_line_ids"/>
|
||||
<t t-set="currency_id" t-value="picking.company_id.currency_id"/>
|
||||
</t>
|
||||
<p t-esc="picking.note"/>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="report_stock_picking_value">
|
||||
<t t-foreach="docs" t-as="picking">
|
||||
<t t-call="stock_move_value_report.report_stock_picking_value_document"/>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
58
stock_move_value_report/report/stock_scrap_value_report.xml
Normal file
58
stock_move_value_report/report/stock_scrap_value_report.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_stock_scrap_value_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<h1 class="mt0 pull-left">Scrap <t t-esc="scrap.name"/></h1>
|
||||
<div class="clearfix"/>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Location</strong></th>
|
||||
<th t-if="scrap.origin"><strong>Source Document</strong></th>
|
||||
<th><strong>State</strong></th>
|
||||
<th><strong>Date</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="scrap.location_id.name"/>
|
||||
</td>
|
||||
<td t-if="scrap.origin">
|
||||
<span t-field="scrap.origin"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="scrap.state"/>
|
||||
</td>
|
||||
<td name="td_sched_date">
|
||||
<span t-esc="scrap.move_id and scrap.move_id.date"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value">
|
||||
<t t-set="move_lines" t-value="scrap.mapped('move_id.move_line_ids')"/>
|
||||
<t t-set="currency_id" t-value="res_company.currency_id"/>
|
||||
</t>
|
||||
<br/>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value_total">
|
||||
<t t-set="move_lines" t-value="scrap.mapped('move_id.move_line_ids')"/>
|
||||
<t t-set="currency_id" t-value="res_company.currency_id"/>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="report_stock_scrap_value">
|
||||
<t t-foreach="docs" t-as="scrap">
|
||||
<t t-call="stock_move_value_report.report_stock_scrap_value_document"/>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
49
stock_move_value_report/report/stock_value_report.xml
Normal file
49
stock_move_value_report/report/stock_value_report.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<report
|
||||
string="Operations Cost Value Report"
|
||||
id="action_report_stock_move_line_value"
|
||||
model="stock.move.line"
|
||||
report_type="qweb-pdf"
|
||||
name="stock_move_value_report.report_stock_move_line_value"
|
||||
file="stock_move_value_report.report_stock_move_line_value"
|
||||
/>
|
||||
|
||||
<report
|
||||
string="Operations Cost Value Report"
|
||||
id="action_report_stock_move_value"
|
||||
model="stock.move"
|
||||
report_type="qweb-pdf"
|
||||
name="stock_move_value_report.report_stock_move_value"
|
||||
file="stock_move_value_report.report_stock_move_value"
|
||||
/>
|
||||
|
||||
<report
|
||||
string="Picking Operations Cost Value"
|
||||
id="action_report_stock_picking_value"
|
||||
model="stock.picking"
|
||||
report_type="qweb-pdf"
|
||||
name="stock_move_value_report.report_stock_picking_value"
|
||||
file="stock_move_value_report.report_stock_picking_value"
|
||||
/>
|
||||
|
||||
<report
|
||||
string="Scrap Operations Cost Value"
|
||||
id="action_report_stock_scrap_value"
|
||||
model="stock.scrap"
|
||||
report_type="qweb-pdf"
|
||||
name="stock_move_value_report.report_stock_scrap_value"
|
||||
file="stock_move_value_report.report_stock_scrap_value"
|
||||
/>
|
||||
|
||||
<report
|
||||
string="Inventory Operations Cost Value"
|
||||
id="action_report_stock_inventory_value"
|
||||
model="stock.inventory"
|
||||
report_type="qweb-pdf"
|
||||
name="stock_move_value_report.report_stock_inventory_value"
|
||||
file="stock_move_value_report.report_stock_inventory_value"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user