odoo/addons/procurement/procurement_view.xml

195 lines
10 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--
Procurement
-->
<record id="procurement_tree_view" model="ir.ui.view">
<field name="name">procurement.order.tree</field>
<field name="model">procurement.order</field>
<field name="arch" type="xml">
<tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state == 'exception';black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state == 'ready'">
<field name="date_planned" widget="date"/>
<field name="origin"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="procurement_form_view" model="ir.ui.view">
<field name="name">procurement.order.form</field>
<field name="model">procurement.order</field>
<field name="arch" type="xml">
<form string="Procurement" version="7.0">
<header>
<button name="run" states="confirmed,exception" string="Run Procurement" class="oe_highlight" type="object"/>
<button name="check" states="running" string="Check Procurement" class="oe_highlight" type="object"/>
<button name="cancel" states="exception,confirmed,running" string="Cancel Procurement" type="object"/>
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,running,done" />
</header>
<sheet>
<group>
<group>
<field name="product_id" on_change="onchange_product_id(product_id)"/>
<label for="product_qty"/>
<div>
<div>
<field name="product_qty" class="oe_inline"/>
<field name="product_uom" class="oe_inline" groups="product.group_uom"/>
</div>
</div>
<label for="product_uos_qty" groups="product.group_uos"/>
<div groups="product.group_uos">
<field name="product_uos_qty" class="oe_inline"/>
<field name="product_uos" class="oe_inline"/>
</div>
</group>
<newline/>
<group>
<field name="rule_id"/>
<field name="date_planned"/>
<field name="priority"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group>
<field name="group_id"/>
<field name="origin" class="oe_inline" placeholder="e.g. SO005"/>
</group>
</group>
<notebook>
<page string="Extra Information">
<label for="name" class="oe_edit_only"/>
<field name="name" placeholder="External note..."/>
<label for="message" class="oe_edit_only"/>
<field name="message"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="do_view_procurements" model="ir.actions.act_window">
<field name="name">Procurement for Groups </field>
<field name="res_model">procurement.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('group_id','=',active_id)]</field>
</record>
<!--
<record id="do_view_pickings" model="ir.actions.act_window">
<field name="name">Pickings for Groups </field>
<field name="res_model">stock.picking</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('group_id','=',active_id)]</field>
</record>
<button name="%(do_view_pickings)d" string="View all procurements" type="action" />
-->
<record id="procurement_group_form_view" model="ir.ui.view">
<field name="name">procurement.group.form</field>
<field name="model">procurement.group</field>
<field name="arch" type="xml">
<form string="Procurement group" version="7.0">
<sheet>
<div class="oe_right oe_button_box">
<button name="%(do_view_procurements)d" string="View all procurements" type="action" />
</div>
<group>
<field name="name"/>
<field name="move_type"/>
<field name="partner_id"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_procurement_filter" model="ir.ui.view">
<field name="name">procurement.order.select</field>
<field name="model">procurement.order</field>
<field name="arch" type="xml">
<search string="Search Procurement">
<field name="origin" string="Procurement"/>
<field name="date_planned"/>
<filter icon="terp-emblem-important" string="Exceptions" name="exceptions" domain="[('state','=','exception')]" help="Procurement Exceptions"/>
<separator/>
<filter icon="terp-gnome-cpu-frequency-applet+" string="Late" domain="['&amp;', ('date_planned','&lt;', current_date), ('state', '=', 'confirmed')]" help="Procurement started late" />
<field name="product_id" />
<field name="state" />
<group expand="0" string="Group By">
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record id="procurement_action" model="ir.actions.act_window">
<field name="name">Procurement Orders</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">procurement.order</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_procurement_filter"/>
<field name="context">{'search_default_current':1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a procurement order.
</p><p>
A procurement order is used to record a need for a specific
product at a specific location. Procurement orders are usually
created automatically from sales orders, pull logistic rules or
minimum stock rules.
</p><p>
When the procurement order is confirmed, it automatically
creates the necessary operations to fullfil the need: purchase
order proposition, manufacturing order, etc.
</p>
</field>
</record>
<record id="procurement_exceptions" model="ir.actions.act_window">
<field name="name">Procurements</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">procurement.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{}</field>
<field name="search_view_id" ref="view_procurement_filter"/>
<field name="help" type="html">
<p>
Procurement Orders represent the need for a certain quantity of products, at a given time, in a given location. Sales Orders are one typical source of Procurement Orders (but these are distinct documents). Depending on the procurement parameters and the product configuration, the procurement engine will attempt to satisfy the need by reserving products from stock, ordering products from a supplier, or passing a manufacturing order, etc. A Procurement Exception occurs when the system cannot find a way to fulfill a procurement. Some exceptions will resolve themselves automatically, but others require manual intervention (those are identified by a specific error message).
</p>
</field>
</record>
<record id="procurement_action5" model="ir.actions.act_window">
<field name="name">Procurement Exceptions</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">procurement.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','exception')]</field>
</record>
</data>
</openerp>