[IMP] crm : Removed all filters related to a date field and added the related date field in the search view.

bzr revid: mdi@tinyerp.com-20120522061002-ux5oppi3a52srv1e
This commit is contained in:
Divyesh Makwana (Open ERP)
2012-05-22 11:40:02 +05:30
parent 970a4ef2e8
commit 67d5ab5ae0
5 changed files with 14 additions and 87 deletions
+1 -8
View File
@@ -337,14 +337,6 @@
name="pending"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')), ('create_date','&gt;=', time.strftime('%%Y-%%m-%%d 00:00:00'))]"
help="Todays' Leads" />
<filter icon="terp-go-week" string="7 Days"
help="Leads creating during last 7 days"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')),('create_date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d 00:00:00'))]"
/>
<separator orientation="vertical"/>
<field name="name" string="Lead / Customer"
filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
@@ -372,6 +364,7 @@
<field name="country_id" context="{'invisible_country': False}">
<filter string="Show countries" icon="terp-personal+" context="{'invisible_country': False}" help="Show countries"/>
</field>
</field name="create_date"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
+2 -25
View File
@@ -188,19 +188,6 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Phonecalls">
<filter icon="terp-go-today" string="Today"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')),
('date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
name="today"
help="Todays's Phonecalls"
/>
<filter icon="terp-go-week"
string="7 Days"
help="Phonecalls during last 7 days"
domain="[('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="partner_id"/>
<field name="user_id">
@@ -215,6 +202,7 @@
icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
<field name="date"/>
</field>
<newline/>
<group expand="0" string="Group By...">
@@ -239,18 +227,6 @@
<field name="arch" type="xml">
<search string="Scheduled Phonecalls">
<filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')),
('date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
name="today"
help="Todays's Phonecalls"
/>
<filter icon="terp-go-week"
string="7 Days"
help="Phonecalls during last 7 days"
domain="[('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
/>
<separator orientation="vertical"/>
<field name="name"/>
@@ -267,6 +243,7 @@
icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
<field name="date"/>
</field>
<newline/>
<group expand="0" string="Group By...">
+11 -32
View File
@@ -69,17 +69,11 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Cases by Team and Type">
<group>
<filter string="This Year" icon="terp-go-year"
domain="[('name','=',time.localtime()[0])]"
help="Cases by Team and Type for this year" />
<filter string="This Month" icon="terp-go-month"
domain="[('month','=',time.localtime()[1])]"
help="Cases by Team and Type for this month" />
<separator orientation="vertical"/>
<field name="section_id"
widget="selection" />
<field name="category2_id"/>
<group>
<field name="name"/>
<field name="month"/>
<field name="section_id" widget="selection" />
<field name="category2_id"/>
<field name="nbr"/>
<field name="state"/>
</group>
@@ -163,13 +157,8 @@
<field name="arch" type="xml">
<search string="Cases by Team and Stage">
<group>
<filter string="This Year" icon="terp-go-year"
domain="[('name','=',time.localtime()[0])]"
help="Cases by Team and Stage for this year" />
<filter string="This Month" icon="terp-go-month"
domain="[('month','=',time.localtime()[1])]"
help="Cases by Team and Stage for this month" />
<separator orientation="vertical"/>
<field name="name"/>
<field name="month"/>
<field name="section_id" widget="selection"/>
<field name="nbr"/>
<field name="state"/>
@@ -239,13 +228,8 @@
<field name="arch" type="xml">
<search string="Cases by Section, Category and Stage">
<group>
<filter string="This Year" icon="terp-go-year"
domain="[('name','=',time.localtime()[0])]"
help="Cases by Section, Category and Stage for this year" />
<filter string="This Month" icon="terp-go-month"
domain="[('month','=',time.localtime()[1])]"
help="Cases by Section, Category and Stage for this month" />
<separator orientation="vertical"/>
<field name="name"/>
<field name="month"/>
<field name="section_id" widget="selection"/>
<field name="nbr"/>
<field name="state"/>
@@ -332,13 +316,8 @@
<field name="arch" type="xml">
<search string="Search Cases by User">
<group>
<filter string="This Year" icon="terp-go-year"
domain="[('name','=',time.localtime()[0])]"
help="Cases by User for this year" />
<filter string="This Month" icon="terp-go-month"
domain="[('month','=',time.localtime()[1])]"
help="Cases by User for this month" />
<separator orientation="vertical"/>
<field name="name"/>
<field name="month"/>
<field name="section_id" widget="selection"/>
<field name="nbr"/>
<field name="state"/>
@@ -72,17 +72,6 @@
<field name="arch" type="xml">
<search string="Leads Analysis">
<group>
<filter string="Year" icon="terp-go-year" name="year"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Leads/Opportunities created in current year"/>
<separator orientation="vertical" />
<filter string="Month" icon="terp-go-month" name="this_month"
domain="[('create_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Leads/Opportunities created in current month"/>
<filter icon="terp-go-month" string="Month-1"
domain="[('create_date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Leads/Opportunities created in last month"/>
<separator orientation="vertical" />
<filter icon="terp-personal"
name="lead"
string="Lead"
@@ -52,17 +52,6 @@
<field name="arch" type="xml">
<search string="Search">
<group>
<filter string="Year" icon="terp-go-year" name="year"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Phone calls made in current year"/>
<separator orientation="vertical" />
<filter string="Month" icon="terp-go-month" name="This Month"
domain="[('create_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Phone calls made in current month"/>
<filter icon="terp-go-month" string="Month-1"
domain="[('create_date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Phone calls made in last month"/>
<separator orientation="vertical" />
<filter icon="terp-gtk-go-back-rtl"
string="Todo"
domain="[('state','in',('draft','open'))]"