Note this is specific to the view shown when clicking on "Reporting > Valuation", but this uses the same 'stock.quantity.history' wizard and related custom js as "Configuration > Locations > Current Stock" Minor UX updates to valuation report: - don't default groupby product - add filters incoming and outgoing (same logic as stock.move filters) - replace "Inventory at Date" with "Valuation at Date" where appropriate (but leave location current stock view untouched) - create separate view for the valuation report so remaining qty/value are displayed, but all other svl viewing actions (including the "Valuation at Date") will remain showing the original qty/value to support deeper analysis - don't sum unit_cost when groupby is applied in list view since the value won't make sense - add "reference" to svl which is = to stock.move.reference "valuation" part of b2b task: 2882539 Part-of: odoo/odoo#97109
35 lines
1.6 KiB
XML
35 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record model="ir.ui.view" id="view_stock_quant_tree_inherit">
|
|
<field name="name">stock.quant.tree.inherit</field>
|
|
<field name="model">stock.quant</field>
|
|
<field name="inherit_id" ref="stock.view_stock_quant_tree"></field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='product_uom_id']" position="after">
|
|
<field name="currency_id" invisible="1"/>
|
|
<field name="value" optional="hidden"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="view_stock_quant_tree_editable_inherit">
|
|
<field name="name">stock.quant.tree.editable.inherit</field>
|
|
<field name="model">stock.quant</field>
|
|
<field name="inherit_id" ref="stock.view_stock_quant_tree_editable"></field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='product_uom_id']" position="after">
|
|
<field name="currency_id" invisible="1"/>
|
|
<field name="cost_method" invisible="1"/>
|
|
<field name="value" optional="hidden" sum="Total Value"/>
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_view_orderpoints']" position="after">
|
|
<button name="%(stock_valuation_layer_report_action)d" title="Stock Valuation"
|
|
string="Valuation" type="action" class="btn-link" icon="fa-bar-chart"
|
|
context="{'search_default_product_id': product_id}"
|
|
attrs="{'invisible': [('cost_method', '!=', 'fifo')]}"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|