Launchpad automatic translations update.
[odoo/odoo.git] / addons / procurement / procurement_view.xml
index a8afe30..518a890 100644 (file)
@@ -1,16 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
-       <data>
-               <!--
+    <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="type">tree</field>
             <field name="arch" type="xml">
-                <tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state in ('exception');black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state in ('ready')">
+                <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"/>
                 </tree>
             </field>
         </record>
+         <record id="procurement_tree_view_board" model="ir.ui.view">
+            <field name="name">procurement.order.tree.board</field>
+            <field name="model">procurement.order</field>
+            <field name="type">tree</field>
+            <field eval="20" name="priority"/>
+            <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="UOM"/>
+                    <field name="state" invisible = "1"/>
+                    <field name="message"/>
+                </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="product_id" on_change="onchange_product_id(product_id)"/>
                         <field name="location_id" domain="[('usage','=','internal')]"/>
                         <field name="product_qty"/>
-                        <field name="product_uom" widget="selection"/>
+                        <field name="product_uom"/>
 
                         <field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
-                        <field name="product_uos" widget="selection" groups="product.group_uos,base.group_extended"/>
+                        <field name="product_uos"  groups="product.group_uos,base.group_extended"/>
 
                         <separator colspan="4" string="Status"/>
                         <field colspan="4" name="message" readonly="1"/>
                         <field name="state" readonly="1"/>
                         <group col="7" colspan="2">
+                            <button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
                             <button name="button_confirm" states="draft" string="Confirm" icon="gtk-apply"/>
                             <button name="button_restart" states="exception" string="Retry" icon="gtk-convert"/>
-                            <button name="button_cancel" states="draft,exception,waiting" string="Cancel" icon="gtk-cancel"/>
                             <button name="button_check" states="confirmed" string="Run Procurement" icon="gtk-media-play"/>
                         </group>
                     </page>
                         <field name="move_id" groups="base.group_extended"/>
                         <field name="date_close"/>
                         <field name="close_move" groups="base.group_extended"/>
-                       <group colspan="4"  groups="base.group_extended">
-                               <separator colspan="4" string="Properties" />
-                               <field colspan="4" name="property_ids" nolabel="1"/>
-                        </group>
                     </page>
                     <page string="Notes">
                         <separator colspan="4" string="Note" />
             <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Search Procurement">
-                    <group col='10' colspan='4'>
-                       <filter icon="terp-check" string="Current" domain="[('state','in',('draft','confirmed'))]" name="current" help="Procurement Orders in draft or open state."/>
-                       <filter icon="terp-emblem-important" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/>
+                    <group>
+                       <filter icon="terp-emblem-important" string="Exceptions" name="exceptions" domain="[('state','=','exception')]" help="Procurement Exceptions"/>
+                       <filter icon="terp-emblem-important" string="To Fix" name="perm_exceptions" domain="[('state','=','exception'),('message', '!=', '')]" help="Permanent Procurement Exceptions"/>
+                       <filter icon="terp-emblem-important" string="Temporary" name="temp_exceptions" domain="[('state','=','exception'),('message', '=', '')]" help="Temporary Procurement Exceptions"/>
+                       <separator orientation="vertical"/>
                        <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
-                           domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed'))]"
+                           domain="['&amp;', ('date_planned','&lt;', current_date), ('state', 'in', ('draft', 'confirmed'))]"
                            help="Procurement started late" />
-                       <filter icon="terp-gtk-go-back-rtl" string="To Fix" domain="[('state', '=', 'exception'),('message','=','')]" help="Procurement Orders with exceptions and without message"/>
                        <separator orientation="vertical"/>
-                       <field name="name"/>
                        <field name="origin"/>
                        <field name="product_id" />
-                       <field name="date_planned" widget="date"/>
+                       <field name="date_planned"/>
                        <field name="state" />
                     </group>
                     <newline/>
-                    <group expand="0" string="Group By" colspan="4" col="8" groups="base.group_extended">
+                    <group expand="0" string="Group By" groups="base.group_extended">
                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
                         <filter string="Reason" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'name'}"/>
                         <filter string="Scheduled Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
-                       <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+                        <filter string="State" 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="context">{'search_default_current':1}</field>
             <field name="search_view_id" ref="view_procurement_filter"/>
-            <field name="context">{'search_default_Current':1}</field>
-            <field name="help">The procurement order will schedule a proposal for automatic procurement for the product concerned. This procurement will start a task, a purchase order form for the supplier or a production depending on the product configuration.</field>
+            <field name="context">{'search_default_current':1}</field>
+            <field name="help">A procurement order is used to record a need for a specific product at a specific location. A procurement order is usually created automatically from sales orders, a Pull Logistics rule or Minimum Stock Rules. When the procurement order is confirmed, it automatically creates the necessary operations to fullfil the need: purchase order proposition, manufacturing order, etc.</field>
         </record>
 
-        <record id="procurement_action3" model="ir.actions.act_window">
-            <field name="name">Procurements</field>
+        <record id="procurement_exceptions" 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="context">{'search_default_perm_exceptions':1}</field>
             <field name="search_view_id" ref="view_procurement_filter"/>
-            <field name="domain">[]</field>
-            <field name="context">{}</field>
+            <field name="help">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).</field>
         </record>
 
         <record id="procurement_action5" model="ir.actions.act_window">
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
             <field name="domain">[('state','=','exception')]</field>
-            <field name="help"> For each customer order line or raw materials in a manufacturing order, there is a procurement form . In normal system use, procurement orders are automatically generated by OpenERP. But if there are configuration problems, the system can remain blocked by a procurement without generating a corresponding document. It is a procurement exception. Some problems are link to timing and will be correct automatically by the system. If there is no procurement rule, the exception must be corrected manually.</field>
-        </record>
-
-        <record id="procurement_action4" model="ir.actions.act_window">
-            <field name="name">Procurement Exceptions to Fix</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'), ('message', '&lt;&gt;', '')]</field>
-            <field name="filter" eval="True"/>
-        </record>
-
-        <record id="procurement_action11" model="ir.actions.act_window">
-            <field name="name">Temporary 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'), ('message', '=', '')]</field>
         </record>
 
         <!-- Order Point -->
             <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Minimum Stock Rules Search">
-                    <group col="10" colspan="4">
+                    <group>
                         <field name="name"/>
                         <field name="warehouse_id" widget="selection"/>
                         <field name="location_id"/>
                         <field name="product_id"/>
                     </group>
                     <newline/>
-                    <group expand="0" string="Group By..." colspan="4" col="10">
+                    <group expand="0" string="Group By...">
                         <filter string="Warehouse" icon="terp-go-home" domain="[]"  context="{'group_by':'warehouse_id'}"/>
                         <filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
                     </group>
                         <field name="procurement_id" readonly="1"/>
                         <field name="active" />
                     </group>
+                    <group col="4" colspan="4" groups="base.group_extended">
+                        <separator string="Procurement Orders to Process" colspan="4" />
+                        <field name="procurement_draft_ids" colspan="4" nolabel="1"/>
+                    </group>
                 </form>
             </field>
         </record>
             <field name="view_type">form</field>
             <field name="view_id" ref="view_warehouse_orderpoint_tree"/>
             <field name="search_view_id" ref="warehouse_orderpoint_search" />
+            <field name="help">You can define your minimum stock rules, so that OpenERP will automatically create draft manufacturing orders or purchase quotations according to the stock level. Once the virtual stock of a product (= stock on hand minus all confirmed orders and reservations) is below the minimum quantity, OpenERP will generate a procurement request to increase the stock up to the maximum quantity.</field>
         </record>
 
-        <act_window domain="[('warehouse_id', '=', active_id)]" id="act_stock_warehouse_2_stock_warehouse_orderpoint" name="Minimum Stock Rules" res_model="stock.warehouse.orderpoint" src_model="stock.warehouse"/>
+        <act_window
+        context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
+        id="act_stock_warehouse_2_stock_warehouse_orderpoint"
+        name="Minimum Stock Rules"
+        res_model="stock.warehouse.orderpoint"
+        src_model="stock.warehouse"
+        groups="stock.group_stock_user"/>
 
         <!-- add product_uom to context to be the default value when adding new orderpoints -->
         <act_window
-            context="{'product_uom': locals().has_key('uom_id') and uom_id}"
-            domain="[('product_id', '=', active_id)]"
+            context="{'product_uom': locals().has_key('uom_id') and uom_id,'search_default_product_id': [active_id], 'default_product_id': active_id}"
             id="act_product_product_2_stock_warehouse_orderpoint"
             name="Minimum Stock Rules"
             res_model="stock.warehouse.orderpoint"
-            src_model="product.product"/>
+            src_model="product.product"
+            groups="stock.group_stock_user"/>
 
         <act_window
-            context="{'product_uom': locals().has_key('uom_id') and uom_id}"
-            domain="[('procurement_id', '=', active_id)]"
+            context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
             id="act_procurement_2_stock_warehouse_orderpoint"
             name="Minimum Stock Rules"
             res_model="stock.warehouse.orderpoint"
-            src_model="procurement.order"/>
+            src_model="procurement.order"
+            groups="stock.group_stock_user"/>
+
+        <!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it.  -->
+        <menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
+            <menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
+            <menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
+        <menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
+            <menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="menu_stock_procurement" sequence="10"/>
+
+
+        <record id="product_normal_form_view" model="ir.ui.view">
+            <field name="name">product.normal.form.orderpoint.inherit</field>
+            <field name="model">product.product</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="arch" type="xml">
+                  <group name="misc" position="after">
+                      <group col="2" colspan="2" attrs="{'invisible':[('type', '=', 'service')]}">
+                          <separator string="Minimum Stock Rules" colspan="2"/>
+                          <field name="orderpoint_ids" context="{'default_product_uom': uom_id}" nolabel="1">
+                              <tree string="Minimum Stock Rule" editable="bottom">
+                                  <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
+                                  <field name="location_id" groups="base.group_extended"/>
+                                  <field name="product_min_qty"/>
+                                  <field name="product_max_qty"/>
+                                  <field name="product_uom" groups="base.group_extended"/>
+                              </tree>
+                          </field>
+                      </group>
+                  </group>
+            </field>
+        </record>
 
-<!--        <act_window-->
-<!--            domain="[('id', '=', product_id)]"-->
-<!--            id="act_product_product_2_stock_warehouse_orderpoint"-->
-<!--            name="Product"-->
-<!--            res_model="product.product"-->
-<!--            src_model="procurement.order"/>-->
 
     </data>
 </openerp>