[IMP] mrp_operations: improved search views.

bzr revid: tpa@tinyerp.com-20120720122200-50kzd3ej03pv32np
This commit is contained in:
Turkesh Patel (Open ERP)
2012-07-20 17:52:00 +05:30
parent 55998561c5
commit 0e1fe0e39a
2 changed files with 32 additions and 54 deletions
+23 -35
View File
@@ -118,41 +118,29 @@
</record>
<record id="view_mrp_production_workcenter_form_view_filter" model="ir.ui.view">
<field name="name">mrp.production.workcenter.line.select</field>
<field name="model">mrp.production.workcenter.line</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Work Orders">
<group>
<field name="name" string="Work Orders"/>
<separator orientation="vertical"/>
<field name="date_planned"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new" string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-check" string="In Progress" name="Current"
domain="[('state','=','startworking')]"/>
<filter icon="terp-gtk-media-pause" string="Pending"
domain="[('state','=','pause')]"/>
<filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
domain="['&amp;', ('date_planned','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
help="Production started late"/>
<separator orientation="vertical"/>
<field name="workcenter_id" widget="selection"/>
<field name="production_id"/>
<field name="state"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Work Center" icon="terp-go-home" domain="[]" context="{'group_by':'workcenter_id'}"/>
<filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
<separator orientation="vertical"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
</group>
</search>
</field>
<field name="name">mrp.production.workcenter.line.select</field>
<field name="model">mrp.production.workcenter.line</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Work Orders">
<field name="name" string="Work Orders"/>
<field name="date_planned"/>
<field name="workcenter_id"/>
<field name="production_id"/>
<field name="state"/>
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]"/>
<filter icon="terp-check" string="In Progress" name="Current" domain="[('state','=','startworking')]"/>
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pause')]"/>
<filter icon="terp-gnome-cpu-frequency-applet+" string="Late" domain="['&amp;', ('date_planned','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
help="Production started late"/>
<group expand="0" string="Group By...">
<filter string="Work Center" icon="terp-go-home" domain="[]" context="{'group_by':'workcenter_id'}"/>
<filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
</group>
</search>
</field>
</record>
<record id="workcenter_line_calendar" model="ir.ui.view">
@@ -46,32 +46,22 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search">
<group>
<field name="date"/>
<separator orientation="vertical"/>
<filter string="Current" icon="terp-check" domain="[('state','not in',('draft','cancel','done'))]"/>
<filter icon="terp-check" string="Started" domain="[('state','=','startworking')]"/>
<filter icon="terp-camera_test" string="Done" domain="[('state','=','done')]"/>
<separator orientation="vertical"/>
<field name="product_id" />
<field name="workcenter_id"/>
</group>
<newline/>
<group expand="1" string="Group By...">
<field name="date"/>
<field name="product_id" />
<field name="workcenter_id"/>
<filter string="Current" icon="terp-check" domain="[('state','not in',('draft','cancel','done'))]"/>
<filter icon="terp-check" string="Started" domain="[('state','=','startworking')]"/>
<filter icon="terp-camera_test" string="Done" domain="[('state','=','done')]"/>
<group expand="1" string="Group By...">
<filter string="Product" name="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}" />
<filter string="Work Center" name="Workcenter" icon="terp-go-home" context="{'group_by':'workcenter_id'}" />
<separator orientation="vertical"/>
<filter string="Production" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'production_id'}"/>
<separator orientation="vertical"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Planned Day"/>
<separator orientation="vertical"/>
<filter string="Month" name="terp-go-month" icon="terp-go-month" context="{'group_by':'month'}" help="Planned Month"/>
<separator orientation="vertical"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Planned Year"/>
</group>
</search>
</group>
</search>
</field>
</record>
<record id="action_report_mrp_workorder" model="ir.actions.act_window">