[IMP]: mrp: Added late button in search view + group by routing
authorrpa (Open ERP) <rpa@openerp.co.in>
Wed, 17 Feb 2010 12:28:27 +0000 (17:58 +0530)
committerrpa (Open ERP) <rpa@openerp.co.in>
Wed, 17 Feb 2010 12:28:27 +0000 (17:58 +0530)
bzr revid: rpa@openerp.co.in-20100217122827-bw40ga8y1rtyr5eu

addons/mrp/mrp_view.xml

index b79a627..98caa2f 100644 (file)
             <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Search Production">
-                   <group col='8' colspan='4'>
-                       <filter icon="terp-mrp" string="Ready" domain="[('state','=','ready')]" help="Manufacturing Orders which are ready to produce"/>
-                       <filter icon="terp-mrp" string="In Production" domain="[('state','=','in_production')]" help="Manufacturing Orders which are in production"/>
+                   <group col='9' colspan='4'>
+                       <filter icon="terp-mrp" string="Ready"
+                               domain="[('state','=','ready')]"
+                               help="Manufacturing Orders which are ready to produce" />
+                       <filter icon="terp-mrp" string="In Production"
+                               domain="[('state','=','in_production')]"
+                               help="Manufacturing Orders which are in production" />
+                       <filter icon="terp-mrp" string="Late"
+                               domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
+                               help="Production started late" />
+
                        <separator orientation="vertical"/>
                        <field name="name" select='1'/>
                        <field name="product_id" select='1'/>
                        <field name="routing_id" select='1'/>
                        <field name="origin" select='1'/>
                     </group>
-                    <group expand="context.get('report',False)" string="Group By" colspan="4" col="8">
+                    <group expand="1" string="Group By" colspan="4" col="8">
                         <filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
                         <filter string="State" icon="terp-mrp" domain="[]" context="{'group_by':'state'}"/>
-                        <filter string="Scheduled Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
+                        <filter string="Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
+                        <filter string="Routing" icon="terp-mrp" domain="[]" context="{'group_by':'routing_id'}"/>
                     </group>
                </search>
             </field>
                     <group col='10' colspan='4'>
                        <filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/>
                        <filter icon="terp-mrp" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/>
+                       <filter icon="terp-mrp" string="Late"
+                               domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
+                               help="Procurement started late" />
                        <separator orientation="vertical"/>
                        <field name="name"/>
                        <field name="origin"/>