LaOcaCoop/laosa#313 Add module stock_inventory_cost_info_sum

This commit is contained in:
Luis 2022-07-11 17:52:20 +02:00
parent 79abf4b1db
commit 3ddb55fba8
6 changed files with 94 additions and 0 deletions

View file

@ -0,0 +1,14 @@
<odoo>
<!-- Add action entry in the Action Menu for calculate adjustment cost in Inventories -->
<record id="action_product_calculate_theoritical_price2" model="ir.actions.server">
<field name="name">Recalculate Adjustment Cost</field>
<field name="model_id" ref="stock.model_stock_inventory"/>
<field name="binding_model_id" ref="stock.model_stock_inventory"/>
<field name="state">code</field>
<field name="code">
records._compute_adjustment_cost_sum()
</field>
</record>
</odoo>

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2022 Criptomart
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record model="ir.ui.view" id="stock_inventory_form_view">
<field name="name">stock.inventory.form (in stock_inventory_cost_info_sum)</field>
<field name="model">stock.inventory</field>
<field name="inherit_id" ref="stock.view_inventory_form"/>
<field name="arch" type="xml">
<field name="date" position="after" >
<field name="adjustment_cost_sum"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="stock_inventory_tree_view">
<field name="name">stock.inventory.tree (in stock_inventory_cost_info_sum)</field>
<field name="model">stock.inventory</field>
<field name="inherit_id" ref="stock.view_inventory_tree"/>
<field name="arch" type="xml">
<field name="state" position="after" >
<field name="currency_id" invisible="1"/>
<field name="adjustment_cost_sum" sum="Total" />
</field>
</field>
</record>
</odoo>