Change the use of Inventory Adjustment, notable changes are:
- Removed filter field: When user creates a new inventory
adjustment, he can set one or multiple locations and/or products.
An inventory adjustment will worry only about defined
locations/products, but if neither product or location was set,
it'll manage all stock.
- Inventory Adjustment Lines have their own view instead of be
listed on the Inventory Adjustment form view.
Inventory adjustment lines have new color legend:
- Red: The quantity is outdated.
- Blue: There is difference between the on hand quantity and the
counted quantity.
New inventory lines created by the user are written in bold.
- User can't modify already existing inventory lines, except for the
counted quantity.
- When an inventory line is outdated, the user has the possibility
to select and update it, that'll recompute the on hand quantity.
- When an inventory adjustment is validated, it will take in account
only the difference between the theoretical quantity ('On Hand
Quantity') and the counted quantity to adjust the quants.
- When an inventory adjustment is canceled, it will keep its
inventory lines and won't regenerate them when re-started.
- When an Inventory Adjustment generates Account Moves, user can now
find them in a stat button in the Inventory Adjustment form view.
Also, made some changes in demo data to match new requirement.
Task #1935921
57 lines
3.4 KiB
XML
57 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<template id="report_inventory">
|
|
<t t-call="web.html_container">
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-call="web.external_layout">
|
|
<div class="page">
|
|
<br/>
|
|
<h2 t-field="o.name"/>
|
|
|
|
<div class="row mt32 mb32" id="informations">
|
|
<div t-if="o.date" class="col-auto mw-100 mb-2">
|
|
<strong>Date:</strong>
|
|
<p class="m-0" t-field="o.date"/>
|
|
</div>
|
|
</div>
|
|
|
|
<t t-set="locations" t-value="o.line_ids.mapped('location_id')"/>
|
|
<table class="table table-sm">
|
|
<thead>
|
|
<tr>
|
|
<th groups="stock.group_stock_multi_locations"><strong>Location</strong></th>
|
|
<th><strong>Product</strong></th>
|
|
<th groups="stock.group_production_lot"><strong>Lot/Serial Number</strong></th>
|
|
<th groups="stock.group_tracking_lot"><strong>Package</strong></th>
|
|
<th class="text-right"><strong>On Hand Quantity</strong></th>
|
|
<th class="text-right"><strong>Counted Quantity</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="locations" t-as="location">
|
|
<tr groups="stock.group_stock_multi_locations">
|
|
<td colspan="2"><strong t-esc="location.display_name"/></td>
|
|
<td groups="stock.group_production_lot"></td>
|
|
<td groups="stock.group_tracking_lot"></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr t-foreach="o.line_ids.filtered(lambda line: line.location_id.id == location.id)" t-as="line">
|
|
<td groups="stock.group_stock_multi_locations"></td>
|
|
<td><span t-field="line.product_id"/></td>
|
|
<td groups="stock.group_production_lot"><span t-field="line.prod_lot_id"/></td>
|
|
<td groups="stock.group_tracking_lot"><span t-field="line.package_id"/></td>
|
|
<td class="text-right"><span t-field="line.theoretical_qty"/> <span t-field="line.product_uom_id" groups="uom.group_uom"/></td>
|
|
<td class="text-right"><span t-field="line.product_qty"/> <span t-field="line.product_uom_id" groups="uom.group_uom"/></td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
</data>
|
|
</odoo>
|