Skip to content

Commit

Permalink
[MIG] stock_move_value_report: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vvrossem authored and OCA-git-bot committed Aug 22, 2024
1 parent d2d51f2 commit 842ccf6
Show file tree
Hide file tree
Showing 9 changed files with 113 additions and 90 deletions.
12 changes: 6 additions & 6 deletions stock_move_value_report/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -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.
Expand All @@ -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.

Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion stock_move_value_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
2 changes: 1 addition & 1 deletion stock_move_value_report/readme/USAGE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions stock_move_value_report/report/stock_inventory_value_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
24 changes: 12 additions & 12 deletions stock_move_value_report/report/stock_move_line_value_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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"
Expand All @@ -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}"
Expand All @@ -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
Expand Down Expand Up @@ -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}"
Expand Down
23 changes: 12 additions & 11 deletions stock_move_value_report/report/stock_picking_value_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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>
Expand Down
16 changes: 8 additions & 8 deletions stock_move_value_report/report/stock_scrap_value_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
92 changes: 56 additions & 36 deletions stock_move_value_report/report/stock_value_report.xml
Original file line number Diff line number Diff line change
@@ -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>
Loading

0 comments on commit 842ccf6

Please sign in to comment.