From fb7906e29e87b32e5e0a3c4da53ec4329df1a5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Mon, 23 Mar 2026 17:32:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E5=81=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fields_filter/many2one_filter/many2one_filter.js | 7 ++++++- yuthon_hr_attendance/views/yuthon_holiday_statement.xml | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js b/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js index 4db0404ab..071d04832 100644 --- a/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js +++ b/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js @@ -11,6 +11,7 @@ export class Many2oneFilter extends Component { setup() { super.setup(); this.rpc = useService("rpc"); + this.user = useService("user"); this.activeValues = this.env.searchModel.headerSearchInfo.FieldsFilter[this.props.id]?.activeValues || []; } @@ -68,7 +69,11 @@ export class Many2oneFilter extends Component { } getDomain() { - return new Domain(this.props.domain).toList({}); + const evalContext = { + uid: this.user.context.uid, + allowed_company_ids: this.user.context.allowed_company_ids || [], + }; + return new Domain(this.props.domain).toList(evalContext); } async update(value) { diff --git a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml index 9b8f879ee..e401d74d3 100644 --- a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml +++ b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml @@ -46,15 +46,15 @@ hr.leave - - + + - +