mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[MIG] stock_move_value_report: Migration to 13.0
This commit is contained in:
committed by
Vincent Van Rossem
parent
1e3fa8ae0d
commit
cb9c8bbfa0
@@ -14,13 +14,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/12.0/stock_move_value_report
|
||||
:target: https://github.com/OCA/stock-logistics-reporting/tree/13.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-12-0/stock-logistics-reporting-12-0-stock_move_value_report
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-13-0/stock-logistics-reporting-13-0-stock_move_value_report
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/151/12.0
|
||||
:target: https://runbot.odoo-community.org/runbot/151/13.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -60,7 +60,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 smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_move_value_report%0Aversion:%2012.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:%2013.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.
|
||||
|
||||
@@ -93,6 +93,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/12.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/13.0/stock_move_value_report>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "Stock Move Cost Value Report",
|
||||
"version": "12.0.1.1.0",
|
||||
"version": "13.0.1.0.0",
|
||||
"category": "Warehouse",
|
||||
"website": "https://github.com/OCA/stock-logistics-reporting",
|
||||
"author": "Tecnativa, " "Odoo Community Association (OCA)",
|
||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
"installable": True,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_move_value_report
|
||||
# * stock_move_value_report
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: <>\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -149,4 +149,3 @@ msgstr ""
|
||||
#: model_terms:ir.ui.view,arch_db:stock_move_value_report.report_stock_move_value_document
|
||||
msgid "Selected operations cost value"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<tr t-foreach="inventory.location_ids" t-as="location">
|
||||
<td>
|
||||
<span t-field="inventory.location_id.name" />
|
||||
<span t-field="location.name" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="inventory.state" />
|
||||
|
||||
@@ -57,14 +57,22 @@
|
||||
<span t-field="move_line.product_uom_id" />
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<t
|
||||
t-set="valuation_layers"
|
||||
t-value="move_line.move_id.stock_valuation_layer_ids"
|
||||
/>
|
||||
<t
|
||||
t-set="cost"
|
||||
t-value="sum(valuation_layers.mapped(lambda svl: svl.unit_cost if svl.quantity > 0 else -svl.unit_cost))"
|
||||
/>
|
||||
<span
|
||||
t-field="move_line.move_id.price_unit"
|
||||
t-esc="cost"
|
||||
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-esc="cost * move_line.qty_done"
|
||||
t-options="{'widget': 'monetary', 'display_currency': currency_id}"
|
||||
/>
|
||||
</td>
|
||||
@@ -76,7 +84,7 @@
|
||||
<template id="stock_move_lines_value_total">
|
||||
<div class="clearfix">
|
||||
<div id="total" class="row">
|
||||
<div class="col-4 float-right">
|
||||
<div class="col-4 ml-auto">
|
||||
<table
|
||||
class="table table-sm"
|
||||
style="min-width: 250px;max-width: 400px;page-break-inside: avoid;"
|
||||
@@ -84,8 +92,23 @@
|
||||
<tr class="border-black">
|
||||
<td><strong>Total</strong></td>
|
||||
<td class="text-right">
|
||||
<t t-set="total" t-value="0" />
|
||||
<t t-foreach="move_lines" t-as="move_line">
|
||||
<t
|
||||
t-set="valuation_layers"
|
||||
t-value="move_line.move_id.stock_valuation_layer_ids"
|
||||
/>
|
||||
<t
|
||||
t-set="cost"
|
||||
t-value="sum(valuation_layers.mapped(lambda svl: svl.unit_cost if svl.quantity > 0 else -svl.unit_cost))"
|
||||
/>
|
||||
<t
|
||||
t-set="total"
|
||||
t-value="total + cost * move_line.qty_done"
|
||||
/>
|
||||
</t>
|
||||
<span
|
||||
t-esc="sum([x.move_id.price_unit * x.qty_done for x in move_lines])"
|
||||
t-esc="total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': currency_id}"
|
||||
/>
|
||||
</td>
|
||||
@@ -160,7 +183,9 @@
|
||||
/>
|
||||
<h4><span>[<t t-esc="inventory.date" />]</span> Inventory <t
|
||||
t-esc="inventory.name"
|
||||
/>: <t t-esc="inventory.location_id.name" /></h4>
|
||||
/>: <t
|
||||
t-esc="', '.join([x.name for x in inventory.location_ids])"
|
||||
/></h4>
|
||||
<t t-call="stock_move_value_report.stock_move_lines_value">
|
||||
<t t-set="move_lines" t-value="inventory_move_lines" />
|
||||
<t
|
||||
@@ -217,7 +242,7 @@
|
||||
<!-- Total all moves -->
|
||||
<div class="clearfix">
|
||||
<div id="total" class="row">
|
||||
<div class="col-4 float-right">
|
||||
<div class="col-4 ml-auto">
|
||||
<table
|
||||
class="table table-sm"
|
||||
style="min-width: 250px;max-width: 400px;page-break-inside: avoid;"
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" 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" 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" href="https://github.com/OCA/stock-logistics-reporting/tree/12.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" href="https://translation.odoo-community.org/projects/stock-logistics-reporting-12-0/stock-logistics-reporting-12-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" href="https://runbot.odoo-community.org/runbot/151/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" 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" 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" href="https://github.com/OCA/stock-logistics-reporting/tree/13.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" href="https://translation.odoo-community.org/projects/stock-logistics-reporting-13-0/stock-logistics-reporting-13-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" href="https://runbot.odoo-community.org/runbot/151/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>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.</p>
|
||||
@@ -408,7 +408,7 @@ be obtained. Keep in mind that only done operations will have a 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 smashing 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:%2012.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:%2013.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">
|
||||
@@ -436,7 +436,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<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/12.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/13.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>
|
||||
|
||||
Reference in New Issue
Block a user