Files
stock-logistics-warehouse/stock_request/views/stock_request_views.xml
2020-01-28 16:51:45 +01:00

144 lines
6.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Eficent
License LGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_stock_request_tree" model="ir.ui.view">
<field name="name">stock.request.tree</field>
<field name="model">stock.request</field>
<field name="arch" type="xml">
<tree string="Stock Requests" decoration-muted="state == 'cancel'" decoration-bf="message_needaction==True">
<field name="message_needaction" invisible="1"/>
<field name="name"/>
<field name="warehouse_id" groups="stock.group_stock_multi_locations"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="route_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
<field name="product_id"/>
<field name="product_uom_id"
options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
<field name="product_uom_qty"/>
<field name="qty_in_progress" />
<field name="qty_done" />
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="stock_request_search">
<field name="name">stock.request.search</field>
<field name="model">stock.request</field>
<field name="arch" type="xml">
<search string="Stock Requests Search">
<field name="name" string="Stock Requests"/>
<field name="warehouse_id"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="product_id"/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group expand="0" string="Group By">
<filter string="Warehouse" domain="[]" context="{'group_by':'warehouse_id'}"/>
<filter string="Location" domain="[]" context="{'group_by':'location_id'}"/>
</group>
</search>
</field>
</record>
<record id="view_stock_request_form" model="ir.ui.view">
<field name="name">stock.request.form</field>
<field name="model">stock.request</field>
<field name="arch" type="xml">
<form string="Stock Requests">
<header>
<button name="action_confirm"
string="Confirm" type="object"
attrs="{'invisible': [('state', 'not in', ['draft'])]}"/>
<button name="action_cancel" states="draft,open"
type="object" string="Cancel"/>
<button name="action_draft" states="cancel" type="object"
string="Set to Draft"/>
<button name="action_done"
string="Done" type="object"
attrs="{'invisible': [('state', 'not in', ['open'])]}"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<field name="picking_ids" invisible="1"/>
<button type="object"
name="action_view_transfer"
class="oe_stat_button"
icon="fa-truck"
attrs="{'invisible': [('picking_count', '=', 0)]}"
groups="stock.group_stock_user">
<field name="picking_count" widget="statinfo"
string="Transfers"/>
</button>
</div>
<div class="oe_title">
<label string="Stock Request " />
<h1>
<field name="name" readonly="1"/>
</h1>
</div>
<group>
<group>
<field name="product_id"/>
<field name="expected_date"/>
<field name="picking_policy"/>
</group>
<group>
<field name="warehouse_id" widget="selection" groups="stock.group_stock_multi_locations"/>
<field name="product_uom_id"
options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="route_id"
options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
<field name="procurement_group_id"
groups="stock.group_adv_location"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
</group>
<group name="quantities">
<field name="product_uom_qty"/>
<field name="qty_in_progress" />
<field name="qty_done" />
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="action_stock_request_form" model="ir.actions.act_window">
<field name="name">Stock Requests</field>
<field name="res_model">stock.request</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_stock_request_tree"/>
<field name="search_view_id" ref="stock_request_search" />
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a Stock Request.
</p>
</field>
</record>
<menuitem
id="menu_stock_request_root"
name="Stock Requests"
groups="stock_request.group_stock_request_user,stock_request.group_stock_request_manager"
sequence="100"/>
<menuitem
id="menu_stock_request"
action="action_stock_request_form"
name="Stock Requests" parent="menu_stock_request_root"
sequence="10"/>
</odoo>