diff options
22 files changed, 36 insertions, 77 deletions
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 370176ba32e..c263b253d9b 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -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/> diff --git a/addons/crm/report/crm_activity_report_views.xml b/addons/crm/report/crm_activity_report_views.xml index 8ddf6fcc63a..2e5c6642159 100644 --- a/addons/crm/report/crm_activity_report_views.xml +++ b/addons/crm/report/crm_activity_report_views.xml @@ -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"> diff --git a/addons/crm/report/crm_opportunity_report_views.xml b/addons/crm/report/crm_opportunity_report_views.xml index 8ae35895a38..86058e9c5d5 100644 --- a/addons/crm/report/crm_opportunity_report_views.xml +++ b/addons/crm/report/crm_opportunity_report_views.xml @@ -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> diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index eed0b44ce05..e720acda11e 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -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> diff --git a/addons/hr_attendance/views/hr_attendance_view.xml b/addons/hr_attendance/views/hr_attendance_view.xml index 6a715ef7f41..1997f8e415d 100644 --- a/addons/hr_attendance/views/hr_attendance_view.xml +++ b/addons/hr_attendance/views/hr_attendance_view.xml @@ -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)]" /> diff --git a/addons/hr_recruitment/views/hr_recruitment_views.xml b/addons/hr_recruitment/views/hr_recruitment_views.xml index cda14788ae3..388120b0b6d 100644 --- a/addons/hr_recruitment/views/hr_recruitment_views.xml +++ b/addons/hr_recruitment/views/hr_recruitment_views.xml @@ -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/> diff --git a/addons/hr_timesheet/views/hr_timesheet_views.xml b/addons/hr_timesheet/views/hr_timesheet_views.xml index db2b06a5838..fefd0885d60 100644 --- a/addons/hr_timesheet/views/hr_timesheet_views.xml +++ b/addons/hr_timesheet/views/hr_timesheet_views.xml @@ -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'}"/> diff --git a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml index d2b335d99ea..85d071cf51d 100644 --- a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml +++ b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml @@ -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> diff --git a/addons/im_livechat/report/im_livechat_report_channel_views.xml b/addons/im_livechat/report/im_livechat_report_channel_views.xml index 71fccb7c7c9..efe0304bd46 100644 --- a/addons/im_livechat/report/im_livechat_report_channel_views.xml +++ b/addons/im_livechat/report/im_livechat_report_channel_views.xml @@ -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'}"/> diff --git a/addons/im_livechat/report/im_livechat_report_operator_views.xml b/addons/im_livechat/report/im_livechat_report_operator_views.xml index fd7a5c4b422..2aa147ca1b0 100644 --- a/addons/im_livechat/report/im_livechat_report_operator_views.xml +++ b/addons/im_livechat/report/im_livechat_report_operator_views.xml @@ -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'}"/> diff --git a/addons/im_livechat/views/rating_views.xml b/addons/im_livechat/views/rating_views.xml index 7c9bdc2edd5..abaaf230080 100644 --- a/addons/im_livechat/views/rating_views.xml +++ b/addons/im_livechat/views/rating_views.xml @@ -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> diff --git a/addons/lunch/views/lunch_views.xml b/addons/lunch/views/lunch_views.xml index 6016d9a0bc4..90319d193fe 100644 --- a/addons/lunch/views/lunch_views.xml +++ b/addons/lunch/views/lunch_views.xml @@ -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'}"/> diff --git a/addons/mrp/views/mrp_workcenter_views.xml b/addons/mrp/views/mrp_workcenter_views.xml index 52bd2d3c331..12ba2d6376b 100644 --- a/addons/mrp/views/mrp_workcenter_views.xml +++ b/addons/mrp/views/mrp_workcenter_views.xml @@ -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"/> diff --git a/addons/mrp/views/mrp_workorder_views.xml b/addons/mrp/views/mrp_workorder_views.xml index f5afe548beb..e9b2de8cec1 100644 --- a/addons/mrp/views/mrp_workorder_views.xml +++ b/addons/mrp/views/mrp_workorder_views.xml @@ -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> diff --git a/addons/point_of_sale/views/pos_order_report_view.xml b/addons/point_of_sale/views/pos_order_report_view.xml index 243e93a3e0e..a6dcede51cf 100644 --- a/addons/point_of_sale/views/pos_order_report_view.xml +++ b/addons/point_of_sale/views/pos_order_report_view.xml @@ -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"/> diff --git a/addons/point_of_sale/views/pos_session_view.xml b/addons/point_of_sale/views/pos_session_view.xml index 6a5feca3a0a..1175403a9a2 100644 --- a/addons/point_of_sale/views/pos_session_view.xml +++ b/addons/point_of_sale/views/pos_session_view.xml @@ -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"> diff --git a/addons/project/views/rating_views.xml b/addons/project/views/rating_views.xml index 724517b9471..cd505238467 100644 --- a/addons/project/views/rating_views.xml +++ b/addons/project/views/rating_views.xml @@ -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> diff --git a/addons/sale/report/report_all_channels_sales_views.xml b/addons/sale/report/report_all_channels_sales_views.xml index 201e229a186..4b146e5f894 100644 --- a/addons/sale/report/report_all_channels_sales_views.xml +++ b/addons/sale/report/report_all_channels_sales_views.xml @@ -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> diff --git a/addons/sale/report/sale_report_views.xml b/addons/sale/report/sale_report_views.xml index 80920e180d4..70b2954ceaf 100644 --- a/addons/sale/report/sale_report_views.xml +++ b/addons/sale/report/sale_report_views.xml @@ -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/> diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index 0cc04eefd4c..22e7cedbf67 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -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> diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index 6e86c920900..3bdb4f62b73 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -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'))]"/> diff --git a/addons/website_sale/views/sale_report_views.xml b/addons/website_sale/views/sale_report_views.xml index 61b04df2c2b..6b8d7c4d9da 100644 --- a/addons/website_sale/views/sale_report_views.xml +++ b/addons/website_sale/views/sale_report_views.xml @@ -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> |
