stock_inventory_revaluation/views/stock_inventory_revaluation_views.xml

107 lines
5.1 KiB
XML
Executable File

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Sequence -->
<record id="seq_stock_inventory_revaluation" model="ir.sequence">
<field name="name">Stock Revaluation</field>
<field name="code">stock.inventory.revaluation</field>
<field name="prefix">REV/</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>
<!-- Form View -->
<record id="view_stock_inventory_revaluation_form" model="ir.ui.view">
<field name="name">stock.inventory.revaluation.form</field>
<field name="model">stock.inventory.revaluation</field>
<field name="arch" type="xml">
<form string="Inventory Revaluation">
<header>
<button name="action_validate" string="Validate" type="object" class="oe_highlight" invisible="state != 'draft'"/>
<field name="state" widget="statusbar" statusbar_visible="draft,done"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name"/>
</h1>
</div>
<group>
<group>
<field name="date" readonly="state == 'done'"/>
<field name="product_id" readonly="state == 'done'"/>
<field name="company_id" groups="base.group_multi_company" readonly="state == 'done'"/>
</group>
<group>
<field name="account_journal_id" readonly="state == 'done'"/>
<field name="account_id" readonly="state == 'done'"/>
<label for="normalization_adjustment"/>
<div class="o_row">
<field name="normalization_adjustment" readonly="state == 'done'"/>
<span class="text-muted" invisible="not normalization_adjustment">
(Resets value to zero before applying new value)
</span>
</div>
<separator string="Valuation Adjustment" colspan="2"/>
<field name="current_value" widget="monetary"/>
<field name="new_value" widget="monetary" readonly="state == 'done'"/>
<field name="new_unit_price" widget="monetary" readonly="state == 'done'"/>
<field name="extra_cost" widget="monetary" readonly="state == 'done'" decoration-danger="extra_cost &lt; 0" decoration-success="extra_cost &gt; 0"/>
</group>
</group>
<notebook>
<page string="Revaluation">
<group>
<field name="quantity"/>
<field name="current_value"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<!-- Tree View -->
<record id="view_stock_inventory_revaluation_tree" model="ir.ui.view">
<field name="name">stock.inventory.revaluation.tree</field>
<field name="model">stock.inventory.revaluation</field>
<field name="arch" type="xml">
<tree string="Inventory Revaluation">
<field name="name"/>
<field name="date"/>
<field name="product_id"/>
<field name="extra_cost"/>
<field name="state"/>
</tree>
</field>
</record>
<!-- Action -->
<record id="action_stock_inventory_revaluation" model="ir.actions.act_window">
<field name="name">Inventory Revaluation</field>
<field name="res_model">stock.inventory.revaluation</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new Inventory Revaluation
</p>
</field>
</record>
<!-- Menu -->
<menuitem id="menu_stock_inventory_revaluation"
name="Inventory Revaluation"
parent="stock.menu_stock_warehouse_mgmt"
action="action_stock_inventory_revaluation"
sequence="110"/>
</data>
</odoo>