[FIX]crm: crm lead/opp merge, when opp has stage with state cancel, then it is less...
[odoo/odoo.git] / addons / procurement / procurement_view.xml
index 53b3b60..7471114 100644 (file)
@@ -19,7 +19,6 @@
                     <field name="procure_method"/>
                     <field name="state"/>
                     <field name="message"/>
-                    <field name="name" invisible="1"/>
                 </tree>
             </field>
         </record>
                         <button name="button_confirm" states="draft" string="Confirm" class="oe_highlight"/>
                         <button name="button_check" states="confirmed" string="Run Procurement" class="oe_highlight"/>
                         <button name="button_restart" states="exception" string="Retry" class="oe_highlight"/>
-                        <button name="button_cancel" states="draft,exception,waiting" string="Cancel"/>
+                        <button name="button_cancel" states="draft,exception,waiting" string="Cancel Procurement"/>
                         <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed" />
                     </header>
                     <sheet>
-                    <label for="name" class="oe_edit_only"/>
+                    <label for="product_id" class="oe_edit_only"/>
                     <h1>
-                        <field name="name" class="oe_inline"/>
-                        <label string="-" attrs="{'invisible':[('origin','=',False)]}"/>
-                        <field name="origin" class="oe_inline"/>
+                        <field name="product_id" on_change="onchange_product_id(product_id)"/>
                     </h1>
+                    <label for="product_qty" class="oe_edit_only"/>
+                    <h2>
+                        <div>
+                            <field name="product_qty" class="oe_inline"/>
+                            <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
+                        </div>
+                    </h2>
+                    <field name="name" placeholder="External note..."/>
                     <group>
                         <group>
                             <field name="date_planned"/>
                             <field name="priority"/>
                         </group>
                         <group>
-                            <field name="message"/>
                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
+                            <field name="origin" class="oe_inline" placeholder="e.g. SO005"/>
+                            <field name="message"/>
                         </group>
                     </group>
                     <notebook>
-                    <page string="Procurement Details">
-                        <group>
+                        <page string="Extra Information">
                             <group>
-                                <field name="product_id" on_change="onchange_product_id(product_id)"/>
-                                <label for="product_qty"/>
-                                <div>
-                                    <field name="product_qty" class="oe_inline"/>
-                                    <field name="product_uom" class="oe_inline"/>
-                                </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>
+                                <field name="location_id" domain="[('usage','=','internal')]"/>
                             </group>
                             <group>
-                               <field name="location_id" domain="[('usage','=','internal')]"/>
+                                <field name="move_id"/>
+                                <field name="date_close"/>
+                                <field name="close_move"/>
                             </group>
-                        </group>
-                    </page>
-                    <page string="Extra Information">
-                        <group>
-                            <field name="move_id"/>
-                            <field name="date_close"/>
-                            <field name="close_move"/>
-                        </group>
-                    </page>
-                    <page string="Notes">
-                        <field name="note"/>
-                    </page>
+                            <field name="note" placeholder="Internal note..."/>
+                        </page>
                     </notebook>
                     </sheet>
                     <div class="oe_chatter">
-                        <field name="message_ids" widget="mail_thread"/>
                         <field name="message_follower_ids" widget="mail_followers"/>
+                        <field name="message_ids" widget="mail_thread"/>
                     </div>
                 </form>
             </field>
             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 id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4" groups="stock.group_stock_manager"/>
             <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"/>
             <field name="res_model">stock.warehouse.orderpoint</field>
         </record>
 
+        <record model="ir.ui.view" id="product_template_form_view_procurement">
+            <field name="name">product.template.procurement</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='type']" position="after">
+                    <field name="procure_method"/>
+                    <field name="supply_method"/>
+                </xpath>
+            </field>
+        </record>
+
+        <record id="product_search_form_view_procurment" model="ir.ui.view">
+            <field name="name">product.search.procurment.form</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_search_form_view"/>
+            <field name="arch" type="xml">
+                <filter name="consumable" position="before">
+                   <filter string="Products" icon="terp-accessories-archiver" domain="[('type','=','product')]" help="Stockable products"/>
+                </filter>
+            </field>
+        </record>
+
         <record model="ir.ui.view" id="product_form_view_procurement_button">
             <field name="name">product.product.procurement</field>
             <field name="model">product.product</field>
                 </xpath>
                 <xpath expr="//group[@name='general']" position="after" >
                    <group name="procurement_help" class="oe_grey" col="1" groups="base.group_user">
-                       <p attrs="{'invisible': [('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_stock')]}">
-                           When you sell this service, nothing special will be trigered
+                       <p attrs="{'invisible': ['|','|',('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_stock')]}">
+                           When you sell this service, nothing special will be triggered
                            to deliver the customer, as you set the procurement method as
                            'Make to Stock'.
                        </p>
-                       <p attrs="{'invisible': [('type','&lt;&gt;','product'),('procure_method','&lt;&gt;','make_to_stock')]}">
+                       <p attrs="{'invisible': ['|','|',('type','&lt;&gt;','product'),('procure_method','&lt;&gt;','make_to_stock')]}">
                            When you sell this product, OpenERP will <b>use the available
                            inventory</b> for the delivery order.
                            <br/><br/>
                            will wait for new products. To fulfill the inventory, you should
                            create others rules like orderpoints.
                        </p>
-                       <p attrs="{'invisible': [('type','&lt;&gt;','consu'),('procure_method','&lt;&gt;','make_to_stock')]}">
+                       <p attrs="{'invisible': ['|','|',('type','&lt;&gt;','consu'),('procure_method','&lt;&gt;','make_to_stock')]}">
                            When you sell this product, a delivery order will be created.
                            OpenERP will consider that the <b>required quantities are always
                            available</b> as it's a consumable (as a result of this, the quantity
                 </xpath>
             </field>
         </record>
-        <record model="ir.ui.view" id="product_template_form_view_procurement">
-            <field name="name">product.template.procurement</field>
-            <field name="model">product.template</field>
-            <field name="inherit_id" ref="product.product_template_form_view"/>
-            <field name="arch" type="xml">
-                <xpath expr="//field[@name='type']" position="after">
-                    <field name="procure_method"/>
-                    <field name="supply_method"/>
-                </xpath>
-            </field>
-        </record>
+
     </data>
 </openerp>