[IMP] crm: search view of lead+Opp.

bzr revid: hmo@tinyerp.com-20100208131607-w3l61f3kc47cc3lo
This commit is contained in:
Harry (Open ERP) 2010-02-08 18:46:07 +05:30
parent 4b230a7a79
commit f18ed41f4f
2 changed files with 68 additions and 62 deletions

View File

@ -156,37 +156,40 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Leads">
<group col="3" colspan="1">
<filter icon="gtk-home" string=" Today "
separator="1"
domain="[('date::date','=',time.strftime('%%Y-%%m-%%d'))]"
help="Todays's Leads"
/>
<filter icon="gtk-media-rewind" string=" 7 Days "
separator="1" help="Leads during last 7 days"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
</group>
<separator orientation="vertical"/>
<group col="6" colspan="2">
<field name="name" select="1"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]" help="My Leads"
default="1"
/>
</field>
<field name="state" select="1">
<filter icon="gtk-new" domain="[('state','in',('draft', 'open'))]" help="Current Leads" default="1"/>
<filter icon="gtk-yes" domain="[('state','=','open')]" help="Open Leads"/>
</field>
<field name="section_id" select="1" default="context.get('section_id', False)" widget="selection" string="Section">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section"
/>
</field>
</group>
<group colspan="4">
<group col="3" colspan="1">
<filter icon="gtk-home" string=" Today "
separator="1"
domain="[('date::date','=',time.strftime('%%Y-%%m-%%d'))]"
help="Todays's Leads"
/>
<filter icon="gtk-media-rewind" string=" 7 Days "
separator="1" help="Leads during last 7 days"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
</group>
<separator orientation="vertical"/>
<group col="6" colspan="2">
<field name="name" select="1"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]" help="My Leads"
default="1"
/>
</field>
<field name="state" select="1">
<filter icon="gtk-new" domain="[('state','in',('draft', 'open'))]" help="Current Leads" default="1"/>
<filter icon="gtk-yes" domain="[('state','=','open')]" help="Open Leads"/>
</field>
<field name="section_id" select="1" default="context.get('section_id', False)" widget="selection" string="Section">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section"
/>
</field>
</group>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20">
<filter string="By Status" icon="terp-crm" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="By Lead Source" icon="terp-crm" domain="[]" context="{'group_by':'categ_id'}"/>

View File

@ -190,37 +190,40 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Opportunities">
<group col="3" colspan="1">
<filter icon="gtk-home" string=" Today "
separator="1"
domain="[('date::date','=',time.strftime('%%Y-%%m-%%d'))]"
help="Todays's Opportunities"
/>
<filter icon="gtk-media-rewind" string=" 7 Days "
separator="1" help="Opportunities during last 7 days"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
</group>
<separator orientation="vertical"/>
<group col="6" colspan="2">
<field name="name" select="1" string="Opportunity"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My Opportunities" default="1"
/>
</field>
<field name="partner_id" select="1"/>
<field name="state" select="1">
<filter icon="gtk-index" domain="[('state','in',('open','draft'))]" help="Current " default="1"/>
</field>
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection" string="Section">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section"/>
</field>
</group>
<group expand="1" string="Group By..." colspan="4" col="20">
<group colspan="4">
<group col="3" colspan="1">
<filter icon="gtk-home" string=" Today "
separator="1"
domain="[('date::date','=',time.strftime('%%Y-%%m-%%d'))]"
help="Todays's Opportunities"
/>
<filter icon="gtk-media-rewind" string=" 7 Days "
separator="1" help="Opportunities during last 7 days"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
</group>
<separator orientation="vertical"/>
<group col="6" colspan="2">
<field name="name" select="1" string="Opportunity"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My Opportunities" default="1"
/>
</field>
<field name="partner_id" select="1"/>
<field name="state" select="1">
<filter icon="gtk-index" domain="[('state','in',('open','draft'))]" help="Current " default="1"/>
</field>
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection" string="Section">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section"/>
</field>
</group>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4">
<filter string="By Stage" icon="terp-crm" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="By Partner" icon="terp-crm" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="By Responsible" icon="terp-crm" domain="[]" context="{'group_by':'user_id'}"/>