odoo/addons/stock/views/stock_quant_views.xml

255 lines
13 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="quant_search_view" model="ir.ui.view">
<field name="name">stock.quant.search</field>
<field name="model">stock.quant</field>
<field eval="10" name="priority"/>
<field name="arch" type="xml">
<search string="Inventory Valuation">
<field name="product_id"/>
<field name="location_id"/>
<field name="package_id" groups="stock.group_tracking_lot"/>
<field name="lot_id" groups="stock.group_production_lot"/>
<field name="owner_id" groups="stock.group_tracking_owner"/>
<group expand='0' string='Filters'>
<filter name="stockable" string="Stockable" domain="[('product_id.type', '=', 'product')]"/>
<separator/>
<filter name='internal_loc' string="Internal Locations" domain="[('location_id.usage','=', 'internal')]"/>
<filter name='transit_loc' string="Transit Locations" domain="[('location_id.usage' ,'=', 'transit')]"/>
<separator/>
<filter name="negative" string="Negative" domain="[('qty', '&lt;', 0.0)]"/>
<filter name="positive" string="Positive" domain="[('qty', '&gt;', 0.0)]"/>
</group>
<group expand='0' string='Group by...'>
<filter string='Location' name="locationgroup" domain="[]" context="{'group_by': 'location_id'}"/>
<filter string='Product' name="productgroup" context="{'group_by': 'product_id'}"/>
<filter string='Owner' context="{'group_by': 'owner_id'}" groups="stock.group_tracking_owner"/>
<filter string='Lot/Serial Number' context="{'group_by': 'lot_id'}" groups="stock.group_production_lot"/>
<filter string='Package' domain="[]" context="{'group_by': 'package_id'}" groups="stock.group_tracking_lot"/>
<filter string='Company' domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_stock_quant_form">
<field name="name">stock.quant.form</field>
<field name="model">stock.quant</field>
<field eval="10" name="priority"/>
<field name="arch" type="xml">
<form string="Inventory Valuation" create="false" edit="false" delete="false">
<group>
<group>
<field name="product_id"/>
<field name="qty"/>
<field name="product_uom_id" groups="product.group_uom"/>
<field name="lot_id" groups="stock.group_production_lot"/>
<field name="package_id" groups="stock.group_tracking_lot"/>
<field name="location_id"/>
<field name="owner_id" groups="stock.group_tracking_owner"/>
</group>
<group>
<field name="in_date"/>
<field name="reservation_id"/>
<field name="propagated_from_id"/>
<field name="inventory_value"/>
</group>
</group>
<group>
<field name="history_ids" string="History">
<tree readonly="1" default_order="date">
<field name="picking_id"/>
<button type="object" name="show_picking" icon="fa-list-alt" attrs="{'invisible': [('picking_id', '=', False)]}"/>
<field name="product_uom_qty"/>
<field name="date"/>
<field name="location_id" groups="stock.group_stock_multi_locations" string="Source Location Zone"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations" string="Destination Location Zone"/>
<field name="state" invisible="1"/>
</tree>
</field>
</group>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_stock_quant_tree">
<field name="name">stock.quant.tree</field>
<field name="model">stock.quant</field>
<field eval="10" name="priority"/>
<field name="arch" type="xml">
<tree string="Inventory Valuation" create="0" delete="0">
<field name="product_id"/>
<field name="qty"/>
<field name="product_uom_id" groups="product.group_uom"/>
<field name="location_id"/>
<field name="owner_id" groups="stock.group_tracking_owner"/>
<field name="lot_id" groups="stock.group_production_lot"/>
<field name="package_id" groups="stock.group_tracking_lot"/>
<field name="packaging_type_id" invisible="1"/>
<field name="in_date"/>
<field name="inventory_value" sum="Total"/>
<field name="reservation_id" invisible='1'/>
<field name="propagated_from_id" invisible='1'/>
<field name='company_id' groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_stock_quant_graph_value">
<field name="name">stock.quant.graph</field>
<field name="model">stock.quant</field>
<field eval="12" name="priority"/>
<field name="arch" type="xml">
<graph string="Inventory Valuation" type="pie">
<field name="product_id" type="row"/>
<field name="qty" type="measure"/>
<field name="inventory_value" type="measure"/>
</graph>
</field>
</record>
<record model="ir.ui.view" id="view_stock_quant_pivot">
<field name="name">stock.quant.pivot</field>
<field name="model">stock.quant</field>
<field name="arch" type="xml">
<pivot string="Inventory">
<field name="location_id" type="row"/>
<field name="qty" type="measure"/>
<field name="inventory_value" type="measure"/>
</pivot>
</field>
</record>
<record model="ir.actions.act_window" id="quantsact"> <!-- Menu + python -->
<field name="name">Inventory Valuation</field>
<field name="res_model">stock.quant</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,pivot</field>
<field name="context">{'search_default_internal_loc': 1, 'search_default_stockable': 1, 'group_by': ['product_id', 'location_id']}</field>
<field name="help">This analysis gives you a fast overview on the current stock level of your products and their current inventory value.</field>
</record>
<record model="ir.actions.act_window" id="product_template_open_quants"> <!-- Not used -->
<field name="name">Stock On Hand</field>
<field name="context">{'search_default_internal_loc': 1, 'search_default_productgroup':1, 'search_default_locationgroup':1}</field>
<field name="domain">[('product_id.product_tmpl_id', '=', active_id)]</field>
<field name="res_model">stock.quant</field>
</record>
<record model="ir.actions.act_window" id="product_open_quants"> <!-- product_view + python -->
<field name="name">Stock On Hand</field>
<field name="context">{'search_default_internal_loc': 1, 'search_default_locationgroup':1}</field>
<field name="domain">[('product_id', '=', active_id)]</field>
<field name="res_model">stock.quant</field>
</record>
<record model="ir.actions.act_window" id="location_open_quants"> <!-- Used in location -->
<field name="context">{'search_default_productgroup': 1}</field>
<field name="domain">[('location_id', 'child_of', active_ids)]</field>
<field name="name">Current Stock</field>
<field name="res_model">stock.quant</field>
</record>
<menuitem id="menu_quants" name="Inventory Valuation" parent="stock.menu_warehouse_report" sequence="120" action="quantsact"/>
<record id="quant_package_search_view" model="ir.ui.view">
<field name="name">stock.quant.package.search</field>
<field name="model">stock.quant.package</field>
<field eval="10" name="priority"/>
<field name="arch" type="xml">
<search string="Package">
<field name="name" string="Package Name"/>
<field name="location_id"/>
<field name="packaging_id"/>
<group expand='0' string='Group by...'>
<!-- FORWARD-PORT UP TO v11 -->
<filter string='Packaging' domain="[]" context="{'group_by' : 'packaging_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_quant_package_form">
<field name="name">stock.quant.package.form</field>
<field name="model">stock.quant.package</field>
<field eval="10" name="priority"/>
<field name="arch" type="xml">
<form string="Package">
<header>
<button name="unpack" string="Unpack" type="object" groups="base.group_no_one"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="action_view_related_picking"
string="Package Transfers" type="object"
widget="statinfo" icon="fa-dropbox"/>
<button name="get_content_package" type="object" string="View Contained Packages content" icon="fa-cogs" attrs="{'invisible': [('children_ids','=',[])]}"/>
</div>
<div class="oe_title">
<label for="name" string="Package Reference" class="oe_edit_only"/>
<h1><field name="name" class="oe_inline"/></h1>
</div>
<group>
<group>
<field name="packaging_id"/>
<field name='company_id' groups="base.group_multi_company"/>
<field name='owner_id' groups="stock.group_tracking_owner"/>
</group>
<group>
<field name="location_id"/>
<field name="parent_id"/>
</group>
</group>
<notebook>
<page string="Content">
<separator string="Bulk Content" />
<field name="quant_ids">
<tree string="Quants">
<field name="product_id"/>
<field name="qty"/>
<field name="location_id"/>
<field name="in_date"/>
</tree>
</field>
<separator string="Contained Packages"/>
<field name="children_ids">
<tree string="Contained Packages">
<field name="display_name"/>
<field name="packaging_id"/>
<field name="location_id"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_quant_package_tree">
<field name="name">stock.quant.package.tree</field>
<field name="model">stock.quant.package</field>
<field eval="10" name="priority"/>
<field name="arch" type="xml">
<tree string="Package">
<field name="display_name"/>
<field name="packaging_id"/>
<field name="location_id"/>
<field name="company_id"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_package_view">
<field name="context">{}</field>
<field name="name">Packages</field>
<field name="res_model">stock.quant.package</field>
<field name="help" type="html">
<p>Packages are usually created by pack operations made on transfers and can contains several different products. You can then reuse a package to move its whole content somewhere else, or to pack it into another bigger package. A package can also be unpacked, allowing the disposal of its former content as single units again.
</p>
</field>
</record>
<menuitem id="menu_package" name="Packages" parent="menu_stock_inventory_control" action="action_package_view" groups="stock.group_tracking_lot" sequence="102"/>
<menuitem id="menu_packagings" name="Package Types" parent="stock.menu_packages_config" action="product.action_packaging_view" groups="product.group_stock_packaging"/>
</odoo>