[IMP] *: adaptation of search views
It is now possible to easily filter data using periods of time (e.g. Creation Date: This Week). This adds greater flexibility to the search view and has made some old filters become useless. In this commit, we alter the search views in order to profit of the new framework possibilities.
This commit is contained in:
committed by
Adrien Dieudonne
parent
097464de6f
commit
f9874b2b04
@@ -74,9 +74,7 @@
|
||||
<filter string="To Invoice" name="toinvoice" domain="[('state','=','draft')]" help = "Draft Invoices"/>
|
||||
<filter string="Invoiced" name="current" domain="[('state','not in', ('draft','cancel'))]"/>
|
||||
<separator/>
|
||||
<filter string="This Month" name="this_month" domain="[('date', '>=', context_today().strftime('%%Y-%%m-01'))]"/>
|
||||
<filter string="Last Month" name="last_month" domain="['&', ('date', '>=', (context_today() - relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date', '<', context_today().strftime('%%Y-%%m-01'))]"/>
|
||||
<separator/>
|
||||
<filter string="Date" name="date_filter" date="date"/>
|
||||
<filter string="Customer" name="customer" domain="['|', ('type','=','out_invoice'),('type','=','out_refund')]"/>
|
||||
<filter string="Vendor" name="supplier" domain="['|', ('type','=','in_invoice'),('type','=','in_refund')]"/>
|
||||
<separator/>
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
<filter string="Won" name="won"
|
||||
domain="['&', ('stage_id.probability', '=', 100), ('stage_id.on_change', '=', 1)]"/>
|
||||
<separator/>
|
||||
<filter string="This Month" name="this_month" domain="[('date', '>=', context_today().strftime('%%Y-%%m-01'))]"/>
|
||||
<filter string="Last Month" name="last_month" domain="['&', ('date', '>=', (context_today() - relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date', '<', context_today().strftime('%%Y-%%m-01'))]"/>
|
||||
<filter string="Date" name="filter_date" date="date"/>
|
||||
<field name="team_id" context="{'invisible_team': False}"/>
|
||||
<field name="author_id" string="Created By"/>
|
||||
<group expand="1" string="Group By">
|
||||
|
||||
@@ -101,8 +101,9 @@
|
||||
<field name="team_id" context="{'invisible_team': False}"/>
|
||||
<field name="user_id" string="Salesperson"/>
|
||||
<separator/>
|
||||
<filter string="This Month" name="this_month" domain="[('date_closed', '>=', context_today().strftime('%%Y-%%m-01'))]"/>
|
||||
<filter string="Last Month" name="last_month" domain="['&', ('date_closed', '>=', (context_today() - relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date_closed', '<', context_today().strftime('%%Y-%%m-01'))]"/>
|
||||
<filter string="Creation Date" name="filter_create_date" date="create_date"/>
|
||||
<filter string="Expected Closing" name="filter_date_deadline" date="date_deadline"/>
|
||||
<filter string="Date Closed" name="date_closed_filter" date="date_closed"/>
|
||||
<separator/>
|
||||
<filter string="Current" name="current" domain="[('active', '=', True)]"/>
|
||||
<filter string="Archived" name="archived" domain="[('active', '=', False)]"/>
|
||||
@@ -127,8 +128,9 @@
|
||||
<filter string="Stage" name="stage" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Creation Date" context="{'group_by':'create_date:month'}" name="month"/>
|
||||
<filter string="Expected Closing" context="{'group_by':'date_deadline:month'}" name="date_deadline"/>
|
||||
<filter string="Conversion Date" context="{'group_by':'date_conversion:month'}" name="conversion_date" help="Conversion Date from Lead to Opportunity"/>
|
||||
<filter string="Expected Closing" context="{'group_by':'date_deadline:month'}" name="date_deadline"/>
|
||||
<filter string="Closed Date" context="{'group_by':'date_closed'}" name="date_closed_groupby"/>
|
||||
<filter string="Lost Reason" name="lostreason" context="{'group_by':'lost_reason'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
||||
@@ -667,16 +667,13 @@
|
||||
]"/>
|
||||
|
||||
<separator/>
|
||||
<filter string="Creation Date" name="creation_date" date="create_date" default_period="this_week"/>
|
||||
<filter string="Creation Date" name="creation_date" date="create_date"/>
|
||||
<filter string="Expected Closing" name="close_this_month" date="date_deadline"/>
|
||||
<filter string="Closed Date" name="close_date" date="date_closed"/>
|
||||
<filter string="Overdue Opportunities" name="overdue_opp"
|
||||
domain="[('date_deadline', '<', context_today().strftime('%Y-%m-%d')), ('date_closed', '=', False)]"
|
||||
help="Opportunities with a date of Expected Closing which is in the past"/>
|
||||
|
||||
<filter string="To Close This Month" name="close_this_month" domain="[
|
||||
'&',
|
||||
('date_deadline', '>=', (context_today() + relativedelta(day=1)).strftime('%Y-%m-%d')),
|
||||
('date_deadline', '<=', (context_today() + relativedelta(months=1, day=1, days=-1)).strftime('%Y-%m-%d')),
|
||||
]"/>
|
||||
<separator/>
|
||||
<filter string="Lost" name="lost" domain="['&', ('active', '=', False), ('probability', '=', 0)]"/>
|
||||
<filter string="Won" name="won" domain="['&', ('active', '=', True), ('stage_id.probability', '=', 100)]"/>
|
||||
@@ -692,6 +689,7 @@
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Creation Date" context="{'group_by':'create_date:month'}" name="month"/>
|
||||
<filter string="Expected Closing Date" name="date_deadline" context="{'group_by':'date_deadline'}"/>
|
||||
<filter string="Closed Date" name="close_date_groupby" context="{'group_by':'date_closed'}"/>
|
||||
<filter string="Lost Reason" name="lostreason" context="{'group_by':'lost_reason'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
||||
@@ -68,9 +68,7 @@
|
||||
<search string="Hr Attendance Search">
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<filter name="today" string="Today" domain="[('check_in', '>=', datetime.datetime.now().replace(hour=0, minute=0, second=0)),('check_in', '<=', datetime.datetime.now().replace(hour=23, minute=59, second=59))]" />
|
||||
<filter string="Current Month" name="currentmonth" domain="[('check_in', '>=', datetime.datetime.now().strftime('%Y-%m-01'))]" />
|
||||
<separator/>
|
||||
<filter name="check_in_filter" string="Check In Date" date="check_in"/>
|
||||
<filter string="No Check Out" name="nocheckout" domain="[('check_out', '=', False)]" />
|
||||
<separator/>
|
||||
<filter string="My Attendances" name="myattendances" domain="[('employee_id.user_id.id', '=', uid)]" />
|
||||
|
||||
@@ -930,7 +930,7 @@
|
||||
<field name="job_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="user_id"/>
|
||||
<filter string="This Year" name="year" domain="[('create_date','<=', time.strftime('%%Y-12-31')),('create_date','>=',time.strftime('%%Y-01-01'))]"/>
|
||||
<filter string="Creation Date" name="year" date="create_date" default_period="this_year"/>
|
||||
<separator/>
|
||||
<filter string="Unassigned" name="unassigned" domain="[('user_id', '=', False)]"/>
|
||||
<separator/>
|
||||
|
||||
@@ -139,18 +139,7 @@
|
||||
<field name="name"/>
|
||||
<filter name="mine" string="My Timesheets" domain="[('user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
<filter name="week" string="This Week"
|
||||
domain="[
|
||||
'&',
|
||||
('date', '>=', (context_today() + relativedelta(weeks=-1,days=1,weekday=0)).strftime('%Y-%m-%d')),
|
||||
('date', '<=', (context_today() + relativedelta(weekday=6)).strftime('%Y-%m-%d')),
|
||||
]"/>
|
||||
<filter name="month" string="This Month"
|
||||
domain="[
|
||||
'&',
|
||||
('date', '>=', (context_today() + relativedelta(day=1)).strftime('%Y-%m-%d')),
|
||||
('date', '<=', (context_today() + relativedelta(months=1, day=1, days=-1)).strftime('%Y-%m-%d')),
|
||||
]"/>
|
||||
<filter name="month" string="Date" date="date"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Employee" name="groupby_employee" domain="[]" context="{'group_by':'employee_id'}"/>
|
||||
<filter string="Project" name="groupby_project" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
|
||||
@@ -7,18 +7,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="timesheet attendance">
|
||||
<field name="user_id"/>
|
||||
<filter name="week" string="This Week"
|
||||
domain="[
|
||||
'&',
|
||||
('date', '>=', (context_today() + relativedelta(weeks=-1,days=1,weekday=0)).strftime('%Y-%m-%d')),
|
||||
('date', '<=', (context_today() + relativedelta(weekday=6)).strftime('%Y-%m-%d')),
|
||||
]"/>
|
||||
<filter name="month" string="This Month"
|
||||
domain="[
|
||||
'&',
|
||||
('date', '>=', (context_today() + relativedelta(day=1)).strftime('%Y-%m-%d')),
|
||||
('date', '<=', (context_today() + relativedelta(months=1, day=1, days=-1)).strftime('%Y-%m-%d')),
|
||||
]"/>
|
||||
<filter name="month" string="Date" date="date"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<filter name="missed_session" string="Missed sessions" domain="[('nbr_speaker','<=', 1)]"/>
|
||||
<filter name="treated_session" string="Treated sessions" domain="[('nbr_speaker','>', 1)]"/>
|
||||
<filter name="last_24h" string="Last 24h" domain="[('start_date','>', (context_today() - datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d') )]"/>
|
||||
<filter name="last_week" string="Last Week" domain="[('start_date','>', (context_today() - datetime.timedelta(weeks=1)).strftime('%%Y-%%m-%%d') )]"/>
|
||||
<filter name="start_date_filter" string="Start Date" date="start_date" default_period="this_week"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter name="group_by_session" string="Code" domain="[]" context="{'group_by':'technical_name'}"/>
|
||||
<filter name="group_by_channel" string="Channel" domain="[]" context="{'group_by':'channel_id'}"/>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search report">
|
||||
<filter name="last_24h" string="Last 24h" domain="[('start_date','>', (context_today() - datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d') )]"/>
|
||||
<filter name="last_week" string="Last Week" domain="[('start_date','>', (context_today() - datetime.timedelta(weeks=1)).strftime('%%Y-%%m-%%d') )]"/>
|
||||
<filter name="start_date_filter" string="Start Date" date="start_date" default_period="this_week"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter name="group_by_channel" string="Channel" domain="[]" context="{'group_by':'channel_id'}"/>
|
||||
<filter name="group_by_operator" string="Operator" domain="[('partner_id','!=', False)]" context="{'group_by':'partner_id'}"/>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<filter string="Livechat Channel" name="groupby_livechat_channel" context="{'group_by': 'parent_res_name'}"/>
|
||||
</xpath>
|
||||
<xpath expr="/search" position="inside">
|
||||
<filter string="Last 7 days" name="rating_last_7_days" domain="[('create_date', '>=', (context_today()-datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Creation Date" name="creation_date_filter" date="create_date" default_period="this_week"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<filter name="confirmed" string="Received" domain="[('state','=','confirmed')]"/>
|
||||
<filter name="cancelled" string="Cancelled" domain="[('state','=','cancelled')]"/>
|
||||
<separator/>
|
||||
<filter name="today" string="Today" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter name="date_filter" string="Date" date="date" default_period="today"/>
|
||||
<field name="user_id"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_by_order_id" string="By Order" context="{'group_by':'order_id'}"/>
|
||||
|
||||
@@ -540,9 +540,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Operations">
|
||||
<field name="workcenter_id"/>
|
||||
<filter string="Today" name="today" domain="[('date_start','>=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string="This Month" name="thismonth" domain="[('date_start','>=',time.strftime('%%Y-%%m-01'))]"/>
|
||||
<filter string="This Year" name="thisyear" domain="[('date_start','>=',time.strftime('%%Y-01-01'))]"/>
|
||||
<filter string="Start Date" name="date_start_filter" date="date_start"/>
|
||||
<separator/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="loss_id"/>
|
||||
|
||||
@@ -6,16 +6,14 @@
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="workcenter_id"/>
|
||||
<filter string="Today" name="today" domain="[('date_start','>=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string="This Month" name="thismonth" domain="[('date_start','>=',time.strftime('%%Y-%%m-01'))]"/>
|
||||
<filter string="This Year" name="thisyear" domain="[('date_start','>=',time.strftime('%%Y-01-01'))]"/>
|
||||
<separator/>
|
||||
<filter string="Ready" name="ready" domain="[('state','=','ready')]"/>
|
||||
<filter string="Pending" name="pending" domain="[('state','=','pending')]"/>
|
||||
<filter string="In Progress" name="progress" domain="[('state','=','progress')]"/>
|
||||
<filter string="Done" name="done" domain="[('state','=', 'done')]"/>
|
||||
<filter string="Late" name="late" domain="[('date_planned_start','<=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator/>
|
||||
<filter string="Start Date" name="date_start_filter" date="date_start"/>
|
||||
<separator/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<filter string="Invoiced" name="invoiced" domain="[('state','=',('invoiced'))]"/>
|
||||
<filter string="Not Invoiced" name="not_invoiced" domain="[('state','=',('paid'))]"/>
|
||||
<separator/>
|
||||
<filter string="Year" name="year" domain="[('date','<=', time.strftime('%%Y-12-31')),('date','>=',time.strftime('%%Y-01-01'))]" help="POS orders created during the current year"/>
|
||||
<filter string="Order Date" name="filter_date" date="date" default_period="this_year"/>
|
||||
<separator/>
|
||||
<filter string="My Sales" name="my_sales" help="My Sales" domain="[('user_id','=',uid)]"/>
|
||||
<field name="config_id"/>
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<field name="name" />
|
||||
<filter name="open_sessions" string="Open" domain="[('state', '=', 'opened')]" />
|
||||
<separator/>
|
||||
<filter string="Today" name="today" domain="[('start_at', '>=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" />
|
||||
<filter string="Start Date" name="start_at_filter" date="start_at" default_period="today"/>
|
||||
<field name="config_id" />
|
||||
<field name="user_id" />
|
||||
<group expand="0" string="Group By">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<filter string="Project" name="groupby_project" context="{'group_by': 'parent_res_name'}"/>
|
||||
</xpath>
|
||||
<xpath expr="/search" position="inside">
|
||||
<filter string="Last 30 days" name="rating_last_30_days" domain="[('create_date', '>=', (context_today()-datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Creation Date" name="rating_last_30_days" date="create_date" default_period="last_30_days"/>
|
||||
<separator/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Sales by Channel Analysis">
|
||||
<field name="date_order"/>
|
||||
<filter string="Current Year Sales" name="current_year" domain="[('date_order','>=',time.strftime('%%Y-01-01'))]"/>
|
||||
<filter string="Date" name="current_year" date="date_order" default_period="this_year"/>
|
||||
<group expand="1" string="Group By">
|
||||
<filter string="Sales Channel" name="team_id" context="{'group_by':'team_id'}"/>
|
||||
</group>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Sales Analysis">
|
||||
<field name="date"/>
|
||||
<filter string="This Year" name="year" invisible="1" domain="[('date','<=', time.strftime('%%Y-12-31')),('date','>=',time.strftime('%%Y-01-01'))]"/>
|
||||
<filter string="Date" name="year" invisible="1" date="date" default_period="this_year"/>
|
||||
<filter name="Quotations" string="Quotations" domain="[('state','in', ('draft', 'sent'))]"/>
|
||||
<filter name="Sales" string="Sales" domain="[('state','not in',('draft', 'cancel', 'sent'))]"/>
|
||||
<separator/>
|
||||
|
||||
@@ -475,6 +475,9 @@
|
||||
<filter string="Quotations" name="draft" domain="[('state','=','draft')]"/>
|
||||
<filter string="Quotations Sent" name="sent" domain="[('state','=','sent')]"/>
|
||||
<filter string="Sales" name="sales" domain="[('state','in',('sale','done'))]"/>
|
||||
<separator/>
|
||||
<filter string="Creation Date" name="filter_create_date" date="create_date"/>
|
||||
<filter string="Expiration Date" name="filter_validity_date" date="validity_date"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -489,6 +492,10 @@
|
||||
<filter string="To Invoice" name="to_invoice" domain="[('invoice_status','=','to invoice')]" />
|
||||
<filter string="Upselling" name="upselling" domain="[('invoice_status','=','upselling')]" />
|
||||
</xpath>
|
||||
<xpath expr="//filter[@name='activities_upcoming_all']" position="after">
|
||||
<separator/>
|
||||
<filter string="Confirmation Date" name="confirmation_date_filter" date="confirmation_date"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
<filter string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
|
||||
<filter string="Done" name="done" domain="[('state','=','done')]" help="Stock moves that have been processed"/>
|
||||
<separator/>
|
||||
<filter string="Today" name="today" domain="[('date','<=', datetime.datetime.combine(context_today(), datetime.time(23,59,59))), ('date','>=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" help="Orders processed today or scheduled for today"/>
|
||||
<filter string="Date" name="today" date="date" help="Scheduled or processing date"/>
|
||||
<separator/>
|
||||
<filter string="Incoming" name="incoming" domain="[('location_id.usage', 'not in', ('internal', 'transit')), ('location_dest_id.usage', 'in', ('internal', 'transit'))]"/>
|
||||
<filter string="Outgoing" name="outgoing" domain="[('location_id.usage', 'in', ('internal', 'transit')), ('location_dest_id.usage', 'not in', ('internal', 'transit'))]"/>
|
||||
|
||||
@@ -5,24 +5,7 @@
|
||||
<field name="model">sale.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Sales">
|
||||
<filter name="week" string="Last Week"
|
||||
domain="[
|
||||
'&',
|
||||
('date', '>=', (context_today()-relativedelta(days=7)).strftime('%Y-%m-%d')),
|
||||
('date', '<=', context_today().strftime('%Y-%m-%d')),
|
||||
]"/>
|
||||
<filter name="month" string="Last Month"
|
||||
domain="[
|
||||
'&',
|
||||
('date', '>=', (context_today()-relativedelta(months=1)).strftime('%Y-%m-%d')),
|
||||
('date', '<=', context_today().strftime('%Y-%m-%d')),
|
||||
]"/>
|
||||
<filter name="year" string="Last Year"
|
||||
domain="[
|
||||
'&',
|
||||
('date', '>=', (context_today()-relativedelta(years=1)).strftime('%Y-%m-%d')),
|
||||
('date', '<=', context_today().strftime('%Y-%m-%d')),
|
||||
]"/>
|
||||
<filter name="year" string="Date" date="date"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user