在搜索视图写筛选条件
<?xml version="1.0"?>
<xpath expr='//filter[@name="active_employee"]' position='before'>
<!-<filter string="current protocol" name="current_protocol" domain="[('state','=','done'),('terminate_time', '=', False),('date_start', '<=', context_today().strftime('%Y-%m-%d')),'|',('date_end', '>=', context_today().strftime('%Y-%m-%d')),('date_end','=',False)]"/>->
<filter string="current protocol" name="current_protocol" domain="['&','|',('terminate_time', '>=', context_today().strftime('%Y-%m-%d')),('terminate_time', '=', False),'&',('state','=','done'),'|',('contract_status','=','current_contract'),'&',('date_start', '<=', context_today().strftime('%Y-%m-%d')),'|',('date_end', '>=', context_today().strftime('%Y-%m-%d')),('date_end','=',False)]"/>
<!-<filter string="current protocol" name="current_protocol" domain="[('state','=','done'),('terminate_time', '=', False),'|',('contract_status','=','current_contract'),'&',('date_start', '<=', context_today().strftime('%Y-%m-%d')),'|',('date_end', '>=', context_today().strftime('%Y-%m-%d')),('date_end','=',False)]"/>->
</xpath>