mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
@@ -8,7 +8,11 @@
|
||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||
"category": "Warehouse",
|
||||
"depends": ["stock"],
|
||||
"data": ["views/stock_picking_form_view.xml", "views/stock_move_tree_view.xml"],
|
||||
"data": [
|
||||
"views/report_stock_picking.xml",
|
||||
"views/stock_move_tree_view.xml",
|
||||
"views/stock_picking_form_view.xml",
|
||||
],
|
||||
"license": "LGPL-3",
|
||||
"installable": True,
|
||||
"maintainers": ["yajo"],
|
||||
|
||||
@@ -1 +1 @@
|
||||
Add packaging fields in the stock moves
|
||||
Add packaging fields in the stock moves and their reports.
|
||||
|
||||
44
stock_move_packaging_qty/views/report_stock_picking.xml
Normal file
44
stock_move_packaging_qty/views/report_stock_picking.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Moduon Team S.L.
|
||||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) -->
|
||||
<data>
|
||||
<template id="report_picking" inherit_id="stock.report_picking">
|
||||
<xpath expr="//span[@t-field='ml.product_uom_id']" position="after">
|
||||
<div
|
||||
t-if="ml.move_id.product_packaging_id"
|
||||
class="text-secondary"
|
||||
groups="product.group_stock_packaging"
|
||||
>
|
||||
<t
|
||||
t-set="ml_packaging_qty"
|
||||
t-value="(ml.qty_done if o.state == 'done' else ml.reserved_uom_qty) / ml.move_id.product_packaging_id.qty"
|
||||
/>
|
||||
<span t-field="ml.move_id.product_packaging_id" />:
|
||||
<span t-out="ml_packaging_qty" />
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="report_delivery_document" inherit_id="stock.report_delivery_document">
|
||||
<!-- DOCS https://github.com/orgs/OCA/discussions/111 -->
|
||||
<xpath
|
||||
expr="//table[@name='stock_move_table']/tbody//td[
|
||||
1 + count(
|
||||
//table[@name='stock_move_table']
|
||||
//th[@name='th_sm_ordered']
|
||||
/preceding-sibling::*
|
||||
)
|
||||
]"
|
||||
position="inside"
|
||||
>
|
||||
<div
|
||||
t-if="move.product_packaging_id"
|
||||
class="text-secondary"
|
||||
groups="product.group_stock_packaging"
|
||||
>
|
||||
<span t-field="move.product_packaging_id" />:
|
||||
<span t-field="move.product_packaging_qty" />
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
Reference in New Issue
Block a user