[MIG] stock_move_value_report: Migration to 16.0

This commit is contained in:
Vincent Van Rossem
2024-06-06 11:45:01 +02:00
parent b9121a6357
commit 3840c64e43
9 changed files with 113 additions and 90 deletions

View File

@@ -17,13 +17,13 @@ Stock Move Cost Value Report
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-reporting/tree/15.0/stock_move_value_report
:target: https://github.com/OCA/stock-logistics-reporting/tree/16.0/stock_move_value_report
:alt: OCA/stock-logistics-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-15-0/stock-logistics-reporting-15-0-stock_move_value_report
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-16-0/stock-logistics-reporting-16-0-stock_move_value_report
: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/stock-logistics-reporting&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-reporting&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -58,7 +58,7 @@ Then:
Or, you can either go to:
- *Inventory > Reporting > Stock Moves*, or
- *Inventory > Reporting > Product Moves*
- *Inventory > Reporting > Moves History*
Then:
#. Select records to print.
@@ -73,7 +73,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-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/stock-logistics-reporting/issues/new?body=module:%20stock_move_value_report%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_move_value_report%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.
@@ -106,6 +106,6 @@ 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/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/15.0/stock_move_value_report>`_ project on GitHub.
This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/16.0/stock_move_value_report>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Stock Move Cost Value Report",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Warehouse",
"website": "https://github.com/OCA/stock-logistics-reporting",
"author": "Tecnativa, Odoo Community Association (OCA)",

View File

@@ -17,7 +17,7 @@ Then:
Or, you can either go to:
- *Inventory > Reporting > Stock Moves*, or
- *Inventory > Reporting > Product Moves*
- *Inventory > Reporting > Moves History*
Then:
#. Select records to print.

View File

@@ -12,21 +12,21 @@
<table class="table table-sm">
<thead>
<tr>
<th><strong>Location</strong></th>
<th><strong>State</strong></th>
<th><strong>Date</strong></th>
<th class="text-start"><strong>Location</strong></th>
<th class="text-center"><strong>State</strong></th>
<th class="text-center"><strong>Date</strong></th>
</tr>
</thead>
<tbody>
<tr t-foreach="inventory.location_ids" t-as="location">
<td>
<td class="text-start">
<span t-field="location.name" />
</td>
<td>
<td class="text-center">
<span t-field="inventory.state" />
</td>
<td name="td_date">
<td class="text-center" name="td_date">
<span t-field="inventory.date" />
</td>
</tr>

View File

@@ -10,31 +10,31 @@
/>
<thead>
<tr>
<th name="th_product">
<th name="th_product" class="text-start">
<strong>Product</strong>
</th>
<th name="th_lot" t-if="has_serial_number">
<th name="th_lot" t-if="has_serial_number" class="text-center">
Lot/Serial Number
</th>
<th name="th_qty" class="text-center">
<strong>Quantity</strong>
</th>
<th name="th_value" class="text-right">
<th name="th_value" class="text-end">
<strong>Value</strong>
</th>
<th name="th_value_sbtl" class="text-right">
<th name="th_value_sbtl" class="text-end">
<strong>Subtotal</strong>
</th>
</tr>
</thead>
<tbody>
<tr t-foreach="move_lines" t-as="move_line">
<td>
<td class="text-start">
<span t-field="move_line.product_id" />
<span t-field="move_line.product_id.sudo().description" />
</td>
<t t-if="has_serial_number">
<td>
<td class="text-center">
<table width="100%">
<tr>
<td>
@@ -44,8 +44,8 @@
</t>
</td>
<td name="lot_qty">
<t t-if="move_line.product_qty">
<span t-field="move_line.product_qty" />
<t t-if="move_line.reserved_qty">
<span t-field="move_line.reserved_qty" />
</t>
</td>
</tr>
@@ -56,7 +56,7 @@
<span t-field="move_line.qty_done" />
<span t-field="move_line.product_uom_id" />
</td>
<td class="text-right">
<td class="text-end">
<t
t-set="valuation_layers"
t-value="move_line.move_id.stock_valuation_layer_ids"
@@ -70,7 +70,7 @@
t-options="{'widget': 'monetary', 'display_currency': currency_id}"
/>
</td>
<td class="text-right">
<td class="text-end">
<span
t-esc="cost * move_line.qty_done"
t-options="{'widget': 'monetary', 'display_currency': currency_id}"
@@ -91,7 +91,7 @@
>
<tr class="border-black">
<td><strong>Total</strong></td>
<td class="text-right">
<td class="text-end">
<t t-set="total" t-value="0" />
<t t-foreach="move_lines" t-as="move_line">
<t
@@ -213,7 +213,7 @@
<tr class="border-black">
<td><strong
>Total operations value balance</strong></td>
<td class="text-right">
<td class="text-end">
<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}"

View File

@@ -8,16 +8,16 @@
<div class="row">
<div class="col-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"
t-if="picking.move_ids and picking.move_ids[0].partner_id and picking.move_ids[0].partner_id.id != picking.partner_id.id"
>
<span><strong>Delivery Address:</strong></span>
<div
t-field="picking.move_lines[0].partner_id"
t-field="picking.move_ids[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"
t-if="picking.picking_type_id.code != 'internal' and (not picking.move_ids or not picking.move_ids[0].partner_id) and picking.picking_type_id.warehouse_id.partner_id"
>
<span><strong>Warehouse Address:</strong></span>
<div
@@ -61,26 +61,27 @@
<table class="table table-sm">
<thead>
<tr>
<th t-if="picking.origin"><strong
<th class="text-start" 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
<th class="text-center"><strong>State</strong></th>
<th class="text-center"><strong
>Commitment Date</strong></th>
<th name="td_sched_date_h" class="text-center"><strong
>Scheduled Date</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td t-if="picking.origin">
<td t-if="picking.origin" class="text-start">
<span t-field="picking.origin" />
</td>
<td>
<td class="text-center">
<span t-field="picking.state" />
</td>
<td>
<td class="text-center">
<span t-field="picking.date" />
</td>
<td name="td_sched_date">
<td class="text-center" name="td_sched_date">
<span t-field="picking.scheduled_date" />
</td>
</tr>

View File

@@ -10,25 +10,25 @@
<table class="table table-sm">
<thead>
<tr>
<th><strong>Location</strong></th>
<th t-if="scrap.origin"><strong
<th class="text-center"><strong>Location</strong></th>
<th t-if="scrap.origin" class="text-center"><strong
>Source Document</strong></th>
<th><strong>State</strong></th>
<th><strong>Date</strong></th>
<th class="text-center"><strong>State</strong></th>
<th class="text-center"><strong>Date</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<td class="text-start">
<span t-field="scrap.location_id.name" />
</td>
<td t-if="scrap.origin">
<td t-if="scrap.origin" class="text-center">
<span t-field="scrap.origin" />
</td>
<td>
<td class="text-center">
<span t-field="scrap.state" />
</td>
<td name="td_sched_date">
<td name="td_sched_date" class="text-center">
<span
t-esc="scrap.move_id and scrap.move_id.date"
/>

View File

@@ -1,44 +1,64 @@
<?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"
paperformat="base.paperformat_euro"
/>
<record id="action_report_stock_move_line_value" model="ir.actions.report">
<field name="name">Operations Cost Value Report</field>
<field name="model">stock.move.line</field>
<field name="report_type">qweb-pdf</field>
<field
name="report_name"
>stock_move_value_report.report_stock_move_line_value</field>
<field
name="report_file"
>stock_move_value_report.report_stock_move_line_value</field>
<field name="paperformat_id" ref="base.paperformat_euro" />
<field name="binding_model_id" ref="stock.model_stock_move_line" />
<field name="binding_type">report</field>
</record>
<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"
paperformat="base.paperformat_euro"
/>
<record id="action_report_stock_move_value" model="ir.actions.report">
<field name="name">Operations Cost Value Report</field>
<field name="model">stock.move</field>
<field name="report_type">qweb-pdf</field>
<field
name="report_name"
>stock_move_value_report.report_stock_move_value</field>
<field
name="report_file"
>stock_move_value_report.report_stock_move_value</field>
<field name="paperformat_id" ref="base.paperformat_euro" />
<field name="binding_model_id" ref="stock.model_stock_move" />
<field name="binding_type">report</field>
</record>
<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"
paperformat="base.paperformat_euro"
/>
<record id="action_report_stock_picking_value" model="ir.actions.report">
<field name="name">Picking Operations Cost Value</field>
<field name="model">stock.picking</field>
<field name="report_type">qweb-pdf</field>
<field
name="report_name"
>stock_move_value_report.report_stock_picking_value</field>
<field
name="report_file"
>stock_move_value_report.report_stock_picking_value</field>
<field name="paperformat_id" ref="base.paperformat_euro" />
<field name="binding_model_id" ref="stock.model_stock_picking" />
<field name="binding_type">report</field>
</record>
<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"
paperformat="base.paperformat_euro"
/>
<record id="action_report_stock_scrap_value" model="ir.actions.report">
<field name="name">Scrap Operations Cost Value</field>
<field name="model">stock.scrap</field>
<field name="report_type">qweb-pdf</field>
<field
name="report_name"
>stock_move_value_report.report_stock_scrap_value</field>
<field
name="report_file"
>stock_move_value_report.report_stock_scrap_value</field>
<field name="paperformat_id" ref="base.paperformat_euro" />
<field name="binding_model_id" ref="stock.model_stock_scrap" />
<field name="binding_type">report</field>
</record>
</odoo>

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@@ -9,10 +8,11 @@
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@ span.option {
span.pre {
white-space: pre }
span.problematic {
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -369,7 +369,7 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ebbb67db7c58015f463e18ae628cdf358196fa2923d740ad689ae8af262fe164
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-reporting/tree/15.0/stock_move_value_report"><img alt="OCA/stock-logistics-reporting" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-reporting-15-0/stock-logistics-reporting-15-0-stock_move_value_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-reporting&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-reporting/tree/16.0/stock_move_value_report"><img alt="OCA/stock-logistics-reporting" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-reporting-16-0/stock-logistics-reporting-16-0-stock_move_value_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-reporting&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to obtain a report with cost value of a given operation like
a picking, a scrap, an inventory or even a selection of moves or move lines.</p>
<p><strong>Table of contents</strong></p>
@@ -404,7 +404,7 @@ a picking, a scrap, an inventory or even a selection of moves or move lines.</p>
<p>Or, you can either go to:</p>
<ul class="simple">
<li><em>Inventory &gt; Reporting &gt; Stock Moves</em>, or</li>
<li><em>Inventory &gt; Reporting &gt; Product Moves</em></li>
<li><em>Inventory &gt; Reporting &gt; Moves History</em></li>
</ul>
<p>Then:
#. Select records to print.
@@ -417,7 +417,7 @@ be obtained. Keep in mind: only “done” operations will show cost value.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_move_value_report%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_move_value_report%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -441,11 +441,13 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/tree/15.0/stock_move_value_report">OCA/stock-logistics-reporting</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/tree/16.0/stock_move_value_report">OCA/stock-logistics-reporting</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>