From a2533f1a050aad9eaec6066ae62c51721f81cc5a Mon Sep 17 00:00:00 2001 From: M Mahrous Date: Thu, 18 Dec 2025 15:03:03 +0100 Subject: [PATCH] [FIX] allow M2OReference on inverse_name Before we were checking if inverse_name arg points to a M2O field, but it can also be a Many2oneReference Fixed false positives for OLS03022 --- server/src/core/python_validator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/core/python_validator.rs b/server/src/core/python_validator.rs index 80373bf0..6f1fa463 100644 --- a/server/src/core/python_validator.rs +++ b/server/src/core/python_validator.rs @@ -563,7 +563,7 @@ impl PythonValidator { }); } } - if symbols.iter().any(|sym| !sym.borrow().is_specific_field(session, &["Many2one"])) { + if symbols.iter().any(|sym| !sym.borrow().is_specific_field(session, &["Many2one", "Many2oneReference"])) { let Some(arg_range) = eval_weak.as_weak().context.get(&format!("inverse_name_arg_range")).map(|ctx_val| ctx_val.as_text_range()) else { continue; };