mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[MIG] stock_picking_report_valued_sale_mrp: Migration to 15.0
This commit is contained in:
@@ -14,14 +14,14 @@ Valued picking linked with MRP Kits
|
||||
: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/13.0/stock_picking_report_valued_sale_mrp
|
||||
:target: https://github.com/OCA/stock-logistics-reporting/tree/15.0/stock_picking_report_valued_sale_mrp
|
||||
: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-13-0/stock-logistics-reporting-13-0-stock_picking_report_valued_sale_mrp
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-15-0/stock-logistics-reporting-15-0-stock_picking_report_valued_sale_mrp
|
||||
: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/13.0
|
||||
:alt: Try me on Runbot
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/stock-logistics-reporting&target_branch=15.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
@@ -69,7 +69,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_picking_report_valued_sale_mrp%0Aversion:%2013.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_picking_report_valued_sale_mrp%0Aversion:%2015.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.
|
||||
|
||||
@@ -88,6 +88,7 @@ Contributors
|
||||
|
||||
* David Vidal
|
||||
* Carlos Roca
|
||||
* Ernesto Tejeda
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
@@ -110,6 +111,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-chienandalu|
|
||||
|
||||
This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_picking_report_valued_sale_mrp>`_ project on GitHub.
|
||||
This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/15.0/stock_picking_report_valued_sale_mrp>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Valued picking linked with MRP Kits",
|
||||
"summary": "Allow to summarize the picking related with the selled kits",
|
||||
"version": "13.0.1.0.3",
|
||||
"version": "15.0.1.0.0",
|
||||
"development_status": "Beta",
|
||||
"category": "Warehouse Management",
|
||||
"website": "https://github.com/OCA/stock-logistics-reporting",
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
|
||||
* David Vidal
|
||||
* Carlos Roca
|
||||
* Ernesto Tejeda
|
||||
|
||||
@@ -1,23 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<template
|
||||
id="valued_report_picking"
|
||||
inherit_id="stock_picking_report_valued.valued_report_picking"
|
||||
id="stock_report_delivery_document_inherit_mrp"
|
||||
inherit_id="mrp.stock_report_delivery_document_inherit_mrp"
|
||||
>
|
||||
<!-- disable printing of kits in a separate table -->
|
||||
<xpath
|
||||
expr="//t[@t-if="move_line.picking_id.state != 'done'"]/.."
|
||||
expr="//table[@name='stock_move_line_table']/tbody/t[@t-set='has_kits']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="t-value">env["stock.move.line"]</attribute>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//t[@name='no_package_move_lines']/t[@t-set='has_kits']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="t-value">env["stock.move.line"]</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
<template
|
||||
id="valued_mrp_report_picking"
|
||||
inherit_id="stock.report_delivery_document"
|
||||
>
|
||||
<!-- show only one row for kit products -->
|
||||
<xpath
|
||||
expr="//tr[@t-foreach='package_move_lines']/t[@t-call='stock.stock_report_delivery_has_serial_move_line']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-if"
|
||||
>o.valued and o.sale_id and o.move_line_ids and (move_line.phantom_line or not move_line.phantom_product_id)</attribute>
|
||||
>not move_line.phantom_product_id or move_line.phantom_line</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//tr[@t-as='move_line']" position="attributes">
|
||||
<xpath
|
||||
expr="//tr[@t-foreach='move_lines']/t[@t-call='stock.stock_report_delivery_has_serial_move_line']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-foreach"
|
||||
>o.move_line_ids.filtered(lambda x: not x.phantom_product_id or x.phantom_line)</attribute>
|
||||
name="t-if"
|
||||
>not move_line.phantom_product_id or move_line.phantom_line</attribute>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//tr[@t-foreach='o.move_line_ids']/t[@t-call='stock.stock_report_delivery_has_serial_move_line']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-if"
|
||||
>not move_line.phantom_product_id or move_line.phantom_line</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
<template
|
||||
id="valued_report_picking_has_serial_move_line"
|
||||
inherit_id="stock_picking_report_valued.valued_report_picking_has_serial_move_line"
|
||||
>
|
||||
<!-- Show valued fields for only one of the components of a kit -->
|
||||
<xpath expr="//td[@name='move_line_lot_qty_done']" position="attributes">
|
||||
<attribute
|
||||
name="t-if"
|
||||
add="not (o.valued or o.sale_id or o.move_line_ids or is_outgoing or (move_line.phantom_line or not move_line.phantom_product_id))"
|
||||
separator=" "
|
||||
/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//span[@t-field="move_line.sale_price_unit"]/../.."
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="t-if">
|
||||
o.valued and o.sale_id and o.move_line_ids and is_outgoing and (move_line.phantom_line or not move_line.phantom_product_id)
|
||||
</attribute>
|
||||
</xpath>
|
||||
<!-- Show the rest of the fields in a special way for the rows corresponding to kits -->
|
||||
<xpath expr="//span[@t-field='move_line.product_id']" position="attributes">
|
||||
<attribute name="t-if">not move_line.phantom_line</attribute>
|
||||
</xpath>
|
||||
@@ -28,24 +79,19 @@
|
||||
/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//span[@t-field='move_line.move_id.description_picking']"
|
||||
expr="//t[@t-value='move_line.move_id.description_picking']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="t-if">not move_line.phantom_line</attribute>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//span[@t-field='move_line.move_id.description_picking']"
|
||||
position="before"
|
||||
>
|
||||
<span
|
||||
t-esc="move_line.sale_line.product_id.sudo()._get_description(o.picking_type_id)"
|
||||
t-if="move_line.phantom_line"
|
||||
<attribute
|
||||
name="t-value"
|
||||
add="if not move_line.phantom_line else move_line.sale_line.product_id.sudo()._get_description(o.picking_type_id)"
|
||||
separator=" "
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='move_line.qty_done']/.." position="attributes">
|
||||
<xpath expr="//td[@name='move_line_lot_qty_done']" position="attributes">
|
||||
<attribute name="t-if">not move_line.phantom_line</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='move_line.qty_done']/.." position="after">
|
||||
<xpath expr="//td[@name='move_line_lot_qty_done']" position="after">
|
||||
<td class="text-center" t-if="move_line.phantom_line">
|
||||
<span t-field="move_line.phantom_delivered_qty" />
|
||||
<span t-field="move_line.sale_line.product_uom" />
|
||||
@@ -78,5 +124,4 @@
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||
<title>Valued picking linked with MRP Kits</title>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -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/13.0/stock_picking_report_valued_sale_mrp"><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_picking_report_valued_sale_mrp"><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><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/15.0/stock_picking_report_valued_sale_mrp"><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-15-0/stock-logistics-reporting-15-0-stock_picking_report_valued_sale_mrp"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/webui/builds.html?repo=OCA/stock-logistics-reporting&target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module extends the functionality of <cite>stock_picking_report_valued</cite> with
|
||||
compatibility of MRP kits. Now we’ll be able to correctly summarize the picking
|
||||
value related to the selled kit with a relations of components and serials/lots
|
||||
@@ -420,7 +420,7 @@ the order we’ll have an incorrect reference as well.</li>
|
||||
<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_picking_report_valued_sale_mrp%0Aversion:%2013.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_picking_report_valued_sale_mrp%0Aversion:%2015.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">
|
||||
@@ -437,6 +437,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||
<li>David Vidal</li>
|
||||
<li>Carlos Roca</li>
|
||||
<li>Ernesto Tejeda</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -450,7 +451,7 @@ mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/chienandalu"><img alt="chienandalu" src="https://github.com/chienandalu.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_picking_report_valued_sale_mrp">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/15.0/stock_picking_report_valued_sale_mrp">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>
|
||||
|
||||
@@ -70,6 +70,6 @@ class TestStockPickingValuedMrp(TestStockPickingValued):
|
||||
self.assertAlmostEqual(self.order_out_picking.amount_tax, 14.95)
|
||||
self.assertAlmostEqual(self.order_out_picking.amount_total, 164.45)
|
||||
# Run the report to detect hidden errors
|
||||
self.env.ref("stock.action_report_delivery").render_qweb_html(
|
||||
self.env.ref("stock.action_report_delivery")._render_qweb_html(
|
||||
self.order_out_picking.ids
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user