flectra/addons/stock/views/stock_move_views.xml

549 lines
32 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
2018-01-16 11:34:37 +01:00
<flectra>
<record id="stock_move_tree" model="ir.ui.view">
<field name="name">Stock Moves</field>
<field name="model">stock.move</field>
<field name="arch" type="xml">
<tree decoration-muted="state == 'cancel'" string="Moves" create="false">
<field name="product_id"/>
<field name="product_uom_qty"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
<field name="picking_id"/>
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="date" string="Date" groups="base.group_no_one"/>
<field name="date_expected" string="Date Expected"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_move_pivot" model="ir.ui.view">
<field name="name">stock.move.pivot</field>
<field name="model">stock.move</field>
<field name="arch" type="xml">
<pivot string="Stock Moves Analysis">
<field name="product_id" type="row"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations" type="row"/>
<field name="product_uom_qty" type="measure"/>
</pivot>
</field>
</record>
<record id="view_move_graph" model="ir.ui.view">
<field name="name">stock.move.graph</field>
<field name="model">stock.move</field>
<field name="arch" type="xml">
<graph string="Stock Moves Analysis">
<field name="product_id"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations" type="row"/>
<field name="product_uom_qty" type="measure"/>
</graph>
</field>
</record>
<record id="view_move_tree" model="ir.ui.view">
<field name="name">stock.move.tree</field>
<field name="model">stock.move</field>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<tree decoration-muted="state == 'cancel'" decoration-danger="(state not in ('cancel','done')) and date > current_date" string="Moves" create="0">
<field name="date" groups="base.group_no_one"/>
<field name="reference"/>
<field name="picking_type_id" invisible="1"/>
<field name="create_date" invisible="1" groups="base.group_no_one"/>
<field name="product_id"/>
<field name="location_id" groups="stock.group_stock_multi_locations" string="From"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations" string="To"/>
<field name="product_uom_qty"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_move_kandan" model="ir.ui.view">
<field name="name">stock.move.kanban</field>
<field name="model">stock.move</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="name"/>
<field name="product_id"/>
<field name="date"/>
<field name="priority"/>
<field name="state"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title"><span><field name="name"/></span></strong>
</div>
<field name="state" widget="kanban_label_selection" options="{'classes': {'draft': 'default', 'cancel': 'danger', 'assigned': 'success', 'confirmed': 'default'}}"/>
</div>
<div class="o_kanban_record_body">
<field name="product_id"/>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left"/>
<div class="oe_kanban_bottom_right">
<span><field name="product_uom_qty"/></span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_move_picking_tree" model="ir.ui.view">
<field name="name">stock.move.tree</field>
<field name="model">stock.move</field>
<field eval="12" name="priority"/>
<field name="arch" type="xml">
<tree decoration-muted="scrapped == True" string="Stock Moves" editable="bottom">
<field name="product_id"/>
<field name="name" invisible="1"/>
<field name="product_uom_qty"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
<field name="location_id" invisible="1"/>
<field name="create_date" invisible="1" />
<field name="date_expected" invisible="1" />
<field name="picking_type_id" invisible="1"/>
<field name="scrapped" invisible="1"/>
<field name="availability" invisible="1"/>
<field name="reserved_availability" invisible="1"/>
<field name="location_dest_id" invisible="1"/>
<field name="state"/>
</tree>
</field>
</record>
<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="priority">1000</field>
<field name="arch" type="xml">
<form string="Move Detail">
<field name="state" invisible="1"/>
<field name="location_id" invisible="1"/>
<field name="location_dest_id" invisible="1"/>
<field name="picking_id" invisible="1"/>
<field name="is_locked" invisible="1"/>
<group>
<group>
<field name="product_id" readonly="1"/>
<label for="product_uom_qty"/>
<div class="o_row">
<span><field name="product_uom_qty" readonly="1" nolabel="1"/></span>
<span><field name="product_uom" readonly="1" nolabel="1"/></span>
</div>
<label for="quantity_done"/>
<div class="o_row">
<span><field name="quantity_done" readonly="1" nolabel="1"/></span>
<span attrs="{'invisible': [('state', '=', 'done')]}"> / </span>
<span><field name="reserved_availability" nolabel="1" attrs="{'invisible': [('state', '=', 'done')]}" /></span>
<span><field name="product_uom" readonly="1" nolabel="1"/></span>
</div>
</group>
</group>
<field name="move_line_ids" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}" context="{'tree_view_ref': 'stock.view_stock_move_line_operation_tree', 'default_product_uom_id': product_uom, 'default_picking_id': picking_id, 'default_move_id': id, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}"/>
<footer class="oe_edit_only">
<button string="Confirm" special="save" class="oe_highlight"/>
<button string="Discard" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="view_stock_move_nosuggest_operations" model="ir.ui.view">
<field name="name">stock.move.operations.nosuggest.form</field>
<field name="model">stock.move</field>
<field name="priority">1000</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="stock.view_stock_move_operations"/>
<field name="arch" type="xml">
<field name="move_line_ids" position="replace">
<field name="move_line_nosuggest_ids" attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}" context="{'tree_view_ref': 'stock.view_stock_move_line_operation_tree','default_picking_id': picking_id, 'default_move_id': id, 'default_product_id': product_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}"/>
</field>
</field>
</record>
<record id="view_stock_move_line_operation_tree" model="ir.ui.view">
<field name="name">stock.move.line.operations.tree</field>
<field name="model">stock.move.line</field>
<field name="priority">1000</field>
<field name="arch" type="xml">
<tree editable="bottom" decoration-muted="state == 'done' and is_locked == True" decoration-success="product_uom_qty==qty_done" decoration-danger="qty_done &gt; product_uom_qty and state != 'done'">
<field name="picking_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="in_entire_package" invisible="1"/>
<field name="location_id" attrs="{'readonly': [('in_entire_package', '=', True)]}" invisible="not context.get('show_source_location')" domain="[('id', 'child_of', parent.location_id)]" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" attrs="{'readonly': [('in_entire_package', '=', True)]}" invisible="not context.get('show_destination_location')" domain="[('id', 'child_of', parent.location_dest_id)]" groups="stock.group_stock_multi_locations"/>
<field name="lot_id" attrs="{'readonly': [('in_entire_package', '=', True)]}" invisible="not context.get('show_lots_m2o')" domain="[('product_id', '=', parent.product_id)]" groups="stock.group_production_lot" context="{'default_product_id': parent.product_id, 'active_picking_id': picking_id}"/>
<field name="lot_name" attrs="{'readonly': [('in_entire_package', '=', True)]}" invisible="not context.get('show_lots_text')" groups="stock.group_production_lot"/>
<field name="package_id" attrs="{'readonly': [('in_entire_package', '=', True)]}" invisible="not context.get('show_package')" groups="stock.group_tracking_lot" domain="[('location_id', '=', location_id)]"/>
<field name="result_package_id" attrs="{'readonly': [('in_entire_package', '=', True)]}" groups="stock.group_tracking_lot" domain="['|', '|', ('location_id', '=', False), ('location_id', '=', location_dest_id), ('id', '=', package_id)]"/>
<field name="owner_id" groups="stock.group_tracking_owner"/>
<field name="is_initial_demand_editable" invisible="1"/>
<field name="product_uom_qty" invisible="not context.get('show_reserved_quantity')" readonly="1"/>
<field name="state" invisible="1"/>
<field name="is_locked" invisible="1"/>
<field name="qty_done" attrs="{'readonly': ['|','|', ('is_initial_demand_editable', '=', True), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True), ('in_entire_package', '=', True)]}"/>
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" attrs="{'readonly': ['|', ('product_uom_qty', '!=', 0.0), ('in_entire_package', '=', True)]}" string="Unit of Measure" groups="product.group_uom"/>
</tree>
</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 eval="1" name="priority"/>
<field name="arch" type="xml">
<form string="Stock Moves" create="0" edit="0">
<header>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" />
</header>
<sheet>
<div class="oe_button_box" name="button_box">
</div>
<group>
<group name="main_grp" colspan="2">
<group name="main_grp_col1">
<field name="reference"/>
<field name="location_id"/>
<field name="location_dest_id"/>
</group>
<group name="main_grp_col2">
<field name="product_id"/>
<label for="product_uom_qty"/>
<div class="o_row">
<field name="product_uom_qty"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
</div>
<field name="name" invisible="1"/>
<field name="date_expected" invisible="1"/>
<field name="date" attrs="{'invisible': [('state', '!=', 'done')]}"/>
</group>
</group>
<group name="origin_grp" string="Origin">
<field name="origin"/>
<field name="group_id"/>
<field name="procure_method" attrs="{'readonly': [('state', '!=', 'draft')]}" groups="stock.group_adv_location"/>
</group>
<group name="linked_group" string="Linked Moves" groups="base.group_no_one" colspan="2">
<field name="move_orig_ids" string="Origin Moves" readonly="1">
<tree>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="product_uom_qty"/>
<field name="product_uom"/>
<field name="state"/>
</tree>
</field>
<field name="move_dest_ids" string="Destination Moves" readonly="1">
<tree>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="product_uom_qty"/>
<field name="product_uom"/>
<field name="state"/>
</tree>
</field>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_move_picking_form" model="ir.ui.view">
<field name="name">stock.move.form</field>
<field name="model">stock.move</field>
<field eval="20" name="priority"/>
<field name="arch" type="xml">
<form string="Stock Moves">
<header>
<field name="state" widget="statusbar"/>
</header>
<field name="scrapped" invisible="1"/>
<group>
<group string="#Products">
<field name="product_id"/>
<field name="picking_type_id" invisible="1"/>
<field name="group_id" invisible="1"/>
<label for="product_uom_qty"/>
<div>
<field name="product_uom_qty"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit Of Measure" groups="product.group_uom" class="oe_inline"/>
</div>
<field name="product_tmpl_id" invisible="1"/>
</group>
<group string="Locations" groups="base.group_no_one">
<field name="name"/>
<field name="location_id"/>
<field name="location_dest_id"/>
</group>
</group>
<group>
<group string="Conditions">
<field name="procure_method" attrs="{'readonly': [('state', '!=', 'draft')]}" groups="stock.group_adv_location"/>
<field name="create_date" invisible="1"/>
<field name="date_expected"/>
<field name="move_dest_ids" groups="base.group_no_one" readonly="1"/>
</group>
<group name="quants_grp" string="Reserved" attrs="{'invisible': [('state', '=', 'draft')]}">
<field name="string_availability_info"/>
</group>
</group>
</form>
</field>
</record>
<record id="view_move_search" model="ir.ui.view">
<field name="name">stock.move.search</field>
<field name="model">stock.move</field>
<field eval="3" name="priority"/>
<field name="arch" type="xml">
<search string="Stock Moves">
<field name="origin" filter_domain="['|', '|', ('origin', 'ilike', self), ('name', 'ilike', self), ('picking_id', 'ilike', self)]" string="Reference"/>
<field name="date" groups="base.group_no_one"/>
<filter string="Ready" name="ready" domain="[('state','=','assigned')]" help="Stock moves that are Available (Ready to process)"/>
<filter string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
<filter string="Done" name="done" domain="[('state','=','done')]" help="Stock moves that have been processed"/>
<separator/>
<filter string="Today" domain="[('date','&lt;=', datetime.datetime.combine(context_today(), datetime.time(23,59,59))), ('date','&gt;=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" help="Orders processed today or scheduled for today"/>
<separator/>
<filter string="Incoming" name="incoming" domain="[('location_id.usage', 'not in', ('internal', 'transit')), ('location_dest_id.usage', 'in', ('internal', 'transit'))]"/>
<filter string="Outgoing" name="outgoing" domain="[('location_id.usage', 'in', ('internal', 'transit')), ('location_dest_id.usage', 'not in', ('internal', 'transit'))]"/>
<field name="product_id"/>
<field name="name" string="Location" filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
<field name="partner_id" string="Partner" filter_domain="[('picking_id.partner_id','child_of',self)]"/>
<group expand="0" string="Group By">
<filter string="Product" name="by_product" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Picking" name="groupby_picking_id" domain="[]" context="{'group_by':'picking_id'}"/>
<filter string="Source" name="groupby_location_id" domain="[]" context="{'group_by':'location_id'}" groups="stock.group_stock_multi_locations"/>
<filter string="Destination" name="groupby_dest_location_id" domain="[]" context="{'group_by':'location_dest_id'}" groups="stock.group_stock_multi_locations"/>
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Creation" name="groupby_create_date" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
<filter string="Scheduled" name="groupby_date" domain="[]" context="{'group_by':'date_expected'}"/>
</group>
</search>
</field>
</record>
<record id="act_product_stock_move_open" model="ir.actions.act_window">
<field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
<field name="name">Moves</field>
<field name="res_model">stock.move</field>
<field name="view_id" ref="stock.view_move_tree"/>
</record>
<record id="stock_move_action" model="ir.actions.act_window">
<field name="name">Stock Moves</field>
<field name="res_model">stock.move</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_move_search"/>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a stock movement.
</p><p>
This menu gives you the full traceability of inventory
operations on a specific product. You can filter on the product
to see all the past or future movements for the product.
</p>
</field>
</record>
<record model="ir.actions.act_window.view" id="action_stock_move_tree_all">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_move_tree"/>
<field name="act_window_id" ref="stock_move_action"/>
</record>
<record model="ir.actions.act_window.view" id="action_stock_move_form_all">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_move_form"/>
<field name="act_window_id" ref="stock_move_action"/>
</record>
<record model="ir.actions.act_window.view" id="action_stock_move_pivot_all">
<field name="sequence" eval="3"/>
<field name="view_mode">pivot</field>
<field name="view_id" ref="view_move_pivot"/>
<field name="act_window_id" ref="stock_move_action"/>
</record>
<record model="ir.actions.act_window.view" id="action_stock_move_graph_all">
<field name="sequence" eval="3"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_move_graph"/>
<field name="act_window_id" ref="stock_move_action"/>
</record>
<record model="ir.actions.act_window.view" id="action_stock_move_graph_all">
<field name="sequence" eval="4"/>
<field name="view_mode">kanban</field>
<field name="view_id" ref="view_move_kandan"/>
<field name="act_window_id" ref="stock_move_action"/>
</record>
<!--
Receipt Picking (By Stock Move)
From stock_partial_move_view
-->
<record id="view_move_tree_receipt_picking" model="ir.ui.view">
<field name="name">stock.move.tree2</field>
<field name="model">stock.move</field>
<field name="priority" eval="6"/>
<field name="arch" type="xml">
<tree decoration-muted="state == 'cancel'" default_order='date_expected, picking_id, sequence' string="Moves">
<field name="date_expected" widget='date'/>
<field name="date" widget="date"/>
<field name="picking_id" string="Reference" invisible="1"/>
<field name="sequence" invisible="1"/>
<field name="origin"/>
<field name="product_id"/>
<field name="product_uom_qty"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
<field name="location_id" invisible="1"/>
<field name="location_dest_id" invisible="1"/>
<field name="create_date" invisible="1"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="stock_move_view_kanban" model="ir.ui.view">
<field name="name">stock.move.kanban2</field>
<field name="model">stock.move</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="row mb4">
<div class="col-xs-8">
<strong><span><field name="product_id"/></span></strong>
</div>
<div class="col-xs-4">
<span class="pull-right text-right">
<field name="state" widget="kanban_label_selection" options="{'classes': {'draft': 'default', 'cancel': 'danger',
'assigned': 'success', 'confirmed': 'default'}}"/>
</span>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<strong><span><field name="priority" widget="priority"/></span></strong>
</div>
<div class="col-xs-8">
<span class="pull-right">
<i class="fa fa-clock-o"/> <field name="date"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- test -->
<record id="view_move_tree_receipt_picking_board" model="ir.ui.view">
<field name="name">stock.move.tree3</field>
<field name="model">stock.move</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<tree string="Moves">
<field name="picking_id" string="Reference"/>
<field name="product_id"/>
<field name="product_uom_qty"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
<field name="date" groups="base.group_no_one"/>
</tree>
</field>
</record>
<record id="view_stock_move_kanban" model="ir.ui.view">
<field name="name">stock.move.kanban</field>
<field name="model">stock.move</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="product_id"/>
<field name="state"/>
<field name="product_uom_qty"/>
<field name="priority"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="row mb4">
<div class="col-xs-6">
<strong><field name="product_id"/></strong>
</div>
<div class="col-xs-6 pull-right text-right">
<strong>Qty: </strong><field name="product_uom_qty"/>
</div>
</div>
<div class="row">
<div class="col-xs-6 text-muted">
<field name="priority" widget="priority"/>
</div>
<div class="col-xs-6">
<span class="pull-right">
<field name="state" widget="kanban_label_selection" options="{'classes': {'draft': 'info', 'cancel': 'default',
'assigned': 'success', 'done': 'success'}}"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="action_receipt_picking_move" model="ir.actions.act_window">
<field name="name">Incoming Products</field>
<field name="res_model">stock.move</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form</field>
<field name="domain" eval="[('picking_id.picking_type_id.code','=','incoming'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('view_move_tree_receipt_picking')}),
(0, 0, {'view_mode': 'kanban', 'view_id': ref('stock_move_view_kanban')})]"/>
<field name="context">{'product_receive': True, 'search_default_future': True}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to register a product receipt.
</p><p>
Here you can receive individual products, no matter what
purchase order or picking order they come from. You will find
the list of all products you are waiting for. Once you receive
an order, you can filter based on the name of the vendor or
the purchase order reference. Then you can confirm all products
received using the buttons on the right of each line.
</p>
</field>
</record>
<menuitem action="stock_move_action" id="stock_move_menu" parent="stock.menu_warehouse_report" sequence="140" groups="base.group_no_one"/>
2018-01-16 11:34:37 +01:00
</flectra>