<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="['&', ('date_planned::date','<', 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="['&', ('date_planned::date','<', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
+ help="Procurement started late" />
<separator orientation="vertical"/>
<field name="name"/>
<field name="origin"/>