mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-21 10:12:03 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="action_variant_generate_stock_request_orders" model="ir.actions.server">
|
||||
<field name="name">Request Stock</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="state">code</field>
|
||||
<field
|
||||
name="groups_id"
|
||||
eval="[(4, ref('stock_request.group_stock_request_user')),
|
||||
(4, ref('stock_request.group_stock_request_manager'))]"
|
||||
/>
|
||||
<field name="model_id" ref="product.model_product_product" />
|
||||
<field name="binding_model_id" ref="product.model_product_product" />
|
||||
<field name="code">
|
||||
action = records.env['stock.request.order']._create_from_product_multiselect(records)
|
||||
</field>
|
||||
</record>
|
||||
<record
|
||||
id="action_template_generate_stock_request_orders"
|
||||
model="ir.actions.server"
|
||||
>
|
||||
<field name="name">Request Stock</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="state">code</field>
|
||||
<field
|
||||
name="groups_id"
|
||||
eval="[(4, ref('stock_request.group_stock_request_user')),
|
||||
(4, ref('stock_request.group_stock_request_manager'))]"
|
||||
/>
|
||||
<field name="model_id" ref="product.model_product_template" />
|
||||
<field name="binding_model_id" ref="product.model_product_template" />
|
||||
<field name="code">
|
||||
action = records.env['stock.request.order']._create_from_product_multiselect(records)
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Copyright 2018 Creu Blanca
|
||||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
||||
-->
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.stock_request</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div
|
||||
class="app_settings_block"
|
||||
data-string="Stock Request"
|
||||
string="Stock Request"
|
||||
data-key="stock_request"
|
||||
groups="stock_request.group_stock_request_manager"
|
||||
>
|
||||
<h2>Orders & Configuration</h2>
|
||||
<div class="row mt16 o_settings_container" id="stock_request">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_stock_request_order" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Enable Orders"
|
||||
for="group_stock_request_order"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Activates Stock Request Orders
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="stock_request_allow_virtual_loc" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Allow All Locations Types"
|
||||
for="stock_request_allow_virtual_loc"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
By default only internal and transit locations are allowed in
|
||||
Stock Request and Orders.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_stock_request_submit" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Enable Submitted State"
|
||||
for="module_stock_request_purchase"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Add State to Stock Request and Stock Request Orders if
|
||||
activated.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="stock_request_check_available_first" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Check available stock first"
|
||||
for="stock_request_check_available_first"
|
||||
/>
|
||||
<div
|
||||
class="text-muted"
|
||||
>By default, available stock is not used</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Purchases</h2>
|
||||
<div
|
||||
class="row mt16 o_settings_container"
|
||||
id="stock_request_purchase"
|
||||
>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_stock_request_purchase" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Enable Stock Requests for Purchases"
|
||||
for="module_stock_request_purchase"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Use Purchases with Stock Requests
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Manufacturing</h2>
|
||||
<div class="row mt16 o_settings_container" id="stock_request_mrp">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_stock_request_mrp" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Enable Stock Requests for Manufacturing"
|
||||
for="module_stock_request_mrp"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Use Manufacturing Orders with Stock Requests
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Kanban</h2>
|
||||
<div
|
||||
class="row mt16 o_settings_container"
|
||||
id="stock_request_purchase"
|
||||
>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_stock_request_kanban" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Enable Stock Requests Kanban cards"
|
||||
for="module_stock_request_purchase"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Use Kanban cards for consumable products
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Analytic</h2>
|
||||
<div
|
||||
class="row mt16 o_settings_container"
|
||||
id="stock_request_analytic"
|
||||
>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_stock_request_analytic" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
string="Enable Analytic Accounting in Stock Requests"
|
||||
for="module_stock_request_analytic"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Analytic accounting in Stock Requests
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_stock_request_config" model="ir.actions.act_window">
|
||||
<field name="name">Settings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.config.settings</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">inline</field>
|
||||
<field name="context">{'module' : 'stock_request'}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_stock_move_operations" model="ir.ui.view">
|
||||
<field name="name">stock.move.operations.form</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_operations" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="move_line_ids" position="after">
|
||||
<newline />
|
||||
<field name="allocation_ids" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_move_form" model="ir.ui.view">
|
||||
<field name="name">stock.move.form</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<group name="linked_group" position="after">
|
||||
<newline />
|
||||
<group name="allocations" string="Stock Request Allocations">
|
||||
<field name="allocation_ids" />
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_picking_form" model="ir.ui.view">
|
||||
<field name="name">stock.picking.form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||
<field eval="12" name="priority" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_stock_request"
|
||||
class="oe_stat_button"
|
||||
icon="fa-chain"
|
||||
attrs="{'invisible':[('stock_request_ids', '=', [])]}"
|
||||
>
|
||||
<field
|
||||
name="stock_request_count"
|
||||
widget="statinfo"
|
||||
string="Stock Requests"
|
||||
/>
|
||||
<field name="stock_request_ids" invisible="1" />
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2017 ForgeFlow
|
||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_stock_request_allocation_tree" model="ir.ui.view">
|
||||
<field name="name">stock.request.allocation.tree</field>
|
||||
<field name="model">stock.request.allocation</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="stock_request_id" />
|
||||
<field name="stock_move_id" />
|
||||
<field name="product_id" />
|
||||
<field name="requested_product_uom_qty" />
|
||||
<field
|
||||
name="product_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
groups="uom.group_uom"
|
||||
/>
|
||||
<field name="requested_product_qty" />
|
||||
<field name="allocated_product_qty" />
|
||||
<field name="open_product_qty" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_stock_request_allocation_form" model="ir.ui.view">
|
||||
<field name="name">stock.request.allocation.form</field>
|
||||
<field name="model">stock.request.allocation</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock Request Allocations">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="stock_request_id" />
|
||||
<field name="stock_move_id" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="product_id" />
|
||||
<field name="requested_product_uom_qty" />
|
||||
<field
|
||||
name="product_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
groups="uom.group_uom"
|
||||
/>
|
||||
<field name="requested_product_qty" />
|
||||
<field name="allocated_product_qty" />
|
||||
<field name="open_product_qty" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<menuitem
|
||||
id="menu_stock_request_root"
|
||||
name="Stock Requests"
|
||||
groups="stock_request.group_stock_request_user,stock_request.group_stock_request_manager"
|
||||
web_icon="stock_request,static/description/icon.png"
|
||||
sequence="100"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_stock_request_operations"
|
||||
parent="menu_stock_request_root"
|
||||
name="Operations"
|
||||
sequence="10"
|
||||
/>
|
||||
<menuitem
|
||||
id="stock_request_order_menu"
|
||||
name="Stock Request Orders"
|
||||
parent="menu_stock_request_operations"
|
||||
action="stock_request_order_action"
|
||||
groups="group_stock_request_order"
|
||||
sequence="20"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_stock_request"
|
||||
action="action_stock_request_form"
|
||||
name="Stock Requests"
|
||||
parent="menu_stock_request_operations"
|
||||
sequence="30"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_stock_request_master_data"
|
||||
parent="menu_stock_request_root"
|
||||
name="Master Data"
|
||||
sequence="100"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_stock_request_config"
|
||||
name="Settings"
|
||||
parent="menu_stock_request_root"
|
||||
sequence="999"
|
||||
action="action_stock_request_config"
|
||||
groups="base.group_system"
|
||||
/>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="stock_request_order_tree">
|
||||
<field name="name">stock.request.order.tree</field>
|
||||
<field name="model">stock.request.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="allow_virtual_location" invisible="1" />
|
||||
<field name="warehouse_id" groups="stock.group_stock_multi_locations" />
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="stock_request_order_form">
|
||||
<field name="name">stock.request.order.form</field>
|
||||
<field name="model">stock.request.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<field name="allow_virtual_location" invisible="1" />
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="warehouse_id" invisible="1" />
|
||||
<field name="location_id" invisible="1" />
|
||||
<field name="procurement_group_id" invisible="1" />
|
||||
<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"
|
||||
/>
|
||||
<field name="state" widget="statusbar" />
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<field
|
||||
name="picking_ids"
|
||||
invisible="1"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<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"
|
||||
groups="stock.group_stock_user"
|
||||
widget="statinfo"
|
||||
string="Transfers"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_stock_requests"
|
||||
class="oe_stat_button"
|
||||
icon="fa-chain"
|
||||
attrs="{'invisible': [('state', '=', 'draft')]}"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field
|
||||
name="stock_request_count"
|
||||
widget="statinfo"
|
||||
string="Stock Requests"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Stock request Order" />
|
||||
<h1>
|
||||
<field name="name" readonly="1" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="expected_date" />
|
||||
<field name="picking_policy" />
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="warehouse_id"
|
||||
widget="selection"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
/>
|
||||
<field
|
||||
name="location_id"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
/>
|
||||
<field name="route_ids" invisible="1" />
|
||||
<field
|
||||
name="route_id"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
domain="[('id','in',route_ids)]"
|
||||
/>
|
||||
<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>
|
||||
<notebook>
|
||||
<page name="items" string="Items">
|
||||
<field
|
||||
name="stock_request_ids"
|
||||
context="{
|
||||
'default_expected_date':expected_date,
|
||||
'default_picking_policy': picking_policy,
|
||||
'default_warehouse_id': warehouse_id,
|
||||
'default_location_id': location_id,
|
||||
'default_procurement_group_id': procurement_group_id,
|
||||
'default_company_id': company_id,
|
||||
'default_state': state,
|
||||
}"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
>
|
||||
<tree editable="bottom">
|
||||
<field name="name" readonly="1" />
|
||||
<field name="product_id" />
|
||||
<field name="allowed_uom_categ_id" invisible="1" />
|
||||
<field
|
||||
name="product_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
groups="uom.group_uom"
|
||||
/>
|
||||
<field name="product_uom_id" invisible="1" />
|
||||
<field
|
||||
name="route_id"
|
||||
options="{'no_create': True}"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
/>
|
||||
<field name="route_ids" invisible="1" />
|
||||
<field name="product_uom_qty" />
|
||||
<field name="qty_in_progress" />
|
||||
<field name="qty_done" />
|
||||
<field name="expected_date" invisible="1" />
|
||||
<field name="picking_policy" invisible="1" />
|
||||
<field
|
||||
name="allow_virtual_location"
|
||||
invisible="1"
|
||||
/>
|
||||
<field name="warehouse_id" invisible="1" />
|
||||
<field name="location_id" invisible="1" />
|
||||
<field name="procurement_group_id" invisible="1" />
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</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 model="ir.ui.view" id="stock_request_order_search">
|
||||
<field name="name">stock.request.order.search</field>
|
||||
<field name="model">stock.request.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Stock Requests Order Search">
|
||||
<field name="name" string="Stock Request Orders" />
|
||||
<field name="state" />
|
||||
<field name="warehouse_id" />
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
<separator />
|
||||
<filter string="Draft" name="draft" domain="[('state','=','draft')]" />
|
||||
<filter
|
||||
string="In Progress"
|
||||
name="open"
|
||||
domain="[('state','=','open')]"
|
||||
/>
|
||||
<filter string="Finished" name="done" domain="[('state','=','done')]" />
|
||||
<filter
|
||||
string="Cancelled"
|
||||
name="cancel"
|
||||
domain="[('state','=','cancel')]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Warehouse"
|
||||
name="warehouse"
|
||||
domain="[]"
|
||||
context="{'group_by':'warehouse_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Location"
|
||||
name="location"
|
||||
domain="[]"
|
||||
context="{'group_by':'location_id'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="stock_request_order_action">
|
||||
<field name="name">Stock Request Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">stock.request.order</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,261 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2017 ForgeFlow
|
||||
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
|
||||
decoration-muted="state == 'cancel'"
|
||||
decoration-bf="message_needaction==True"
|
||||
>
|
||||
<field name="message_needaction" invisible="1" />
|
||||
<field name="allow_virtual_location" 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="uom.group_uom"
|
||||
/>
|
||||
<field
|
||||
name="product_uom_id"
|
||||
readonly="True"
|
||||
groups="!uom.group_uom"
|
||||
force_save="1"
|
||||
/>
|
||||
<field name="product_uom_qty" />
|
||||
<field name="qty_in_progress" />
|
||||
<field name="qty_done" />
|
||||
<field name="qty_cancelled" />
|
||||
<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="allow_virtual_location" invisible="1" />
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
<field name="product_id" />
|
||||
<separator />
|
||||
<filter
|
||||
name="current_requests"
|
||||
string="Current requests"
|
||||
domain="['|', ('expected_date', '>', (datetime.date.today() - relativedelta(months=1)).strftime('%Y-%m-01')), ('state', '!=', 'done')]"
|
||||
/>
|
||||
<separator />
|
||||
<filter string="Draft" name="draft" domain="[('state','=','draft')]" />
|
||||
<filter
|
||||
string="In Progress"
|
||||
name="open"
|
||||
domain="[('state','=','open')]"
|
||||
/>
|
||||
<filter string="Finished" name="done" domain="[('state','=','done')]" />
|
||||
<filter
|
||||
string="Cancelled"
|
||||
name="cancel"
|
||||
domain="[('state','=','cancel')]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
name="warehouse"
|
||||
string="Warehouse"
|
||||
domain="[]"
|
||||
context="{'group_by':'warehouse_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="location"
|
||||
string="Location"
|
||||
domain="[]"
|
||||
context="{'group_by':'location_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="status"
|
||||
string="Status"
|
||||
domain="[]"
|
||||
context="{'group_by':'state'}"
|
||||
/>
|
||||
<filter
|
||||
name="route"
|
||||
string="Route"
|
||||
domain="[]"
|
||||
context="{'group_by':'route_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="product"
|
||||
string="Product"
|
||||
domain="[]"
|
||||
context="{'group_by':'product_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">
|
||||
<field name="company_id" invisible="1" />
|
||||
<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">
|
||||
<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"
|
||||
groups="stock.group_stock_user"
|
||||
widget="statinfo"
|
||||
string="Transfers"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Stock Request" />
|
||||
<h1>
|
||||
<field name="name" readonly="1" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field
|
||||
name="order_id"
|
||||
readonly="1"
|
||||
groups="stock_request.group_stock_request_order"
|
||||
/>
|
||||
<field name="product_id" />
|
||||
<field name="expected_date" />
|
||||
<field name="picking_policy" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="allow_virtual_location" invisible="1" />
|
||||
<field
|
||||
name="warehouse_id"
|
||||
widget="selection"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
/>
|
||||
<field
|
||||
name="location_id"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"
|
||||
/>
|
||||
<field
|
||||
name="route_id"
|
||||
options="{'no_create': True}"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
/>
|
||||
<field name="route_ids" invisible="1" />
|
||||
<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="allowed_uom_categ_id" invisible="1" />
|
||||
<label for="product_uom_qty" />
|
||||
<div>
|
||||
<field name="product_uom_qty" class="oe_inline" />
|
||||
<field
|
||||
name="product_uom_id"
|
||||
class="oe_inline"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
groups="uom.group_uom"
|
||||
/>
|
||||
<field name="product_uom_id" invisible="1" />
|
||||
</div>
|
||||
<field
|
||||
name="qty_in_progress"
|
||||
attrs="{'invisible': [('state', '=', 'draft')]}"
|
||||
/>
|
||||
<field
|
||||
name="qty_done"
|
||||
attrs="{'invisible': [('state', '=', 'draft')]}"
|
||||
/>
|
||||
<field
|
||||
name="qty_cancelled"
|
||||
attrs="{'invisible': [('state', '=', 'draft')]}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<!--Empty notebook to inherit pages from other related modules-->
|
||||
</notebook>
|
||||
</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_mode">tree,form,pivot</field>
|
||||
<field name="context">{
|
||||
'search_default_current_requests': 1,
|
||||
'pivot_column_groupby': ['location_id'], 'pivot_row_groupby': ['product_id'], 'pivot_measures': ['product_uom_qty', 'qty_done'],
|
||||
'search_default_draft': 1, 'search_default_open': 1
|
||||
}</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>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue