diff --git a/server/src/core/entry_point.rs b/server/src/core/entry_point.rs index a8aff4fd..9d8673da 100644 --- a/server/src/core/entry_point.rs +++ b/server/src/core/entry_point.rs @@ -205,7 +205,7 @@ impl EntryPointMgr { ) } - //iter through all main entry points, sorted by tree lenght (from bigger to smaller) + //iter through all main entry points, sorted by tree length (from bigger to smaller) pub fn iter_main(&self) -> impl Iterator>> { let mut collected = self.main_entry_point.iter().chain(self.addons_entry_points.iter()).collect::>(); diff --git a/server/src/core/odoo.rs b/server/src/core/odoo.rs index 4fd929fd..2c7ac3ee 100644 --- a/server/src/core/odoo.rs +++ b/server/src/core/odoo.rs @@ -800,7 +800,7 @@ impl SyncOdoo { */ pub fn get_symbol_of_opened_file(session: &mut SessionInfo, path: &PathBuf) -> Option>> { let path_in_tree = path.to_tree_path(); - for entry in session.sync_odoo.entry_point_mgr.borrow().iter_for_import(session.sync_odoo.entry_point_mgr.borrow().main_entry_point.as_ref().unwrap()) { + for entry in session.sync_odoo.entry_point_mgr.borrow().iter_main() { if (entry.borrow().typ == EntryPointType::MAIN || entry.borrow().addon_to_odoo_path.is_some()) && entry.borrow().is_valid_for(path) { let tree = entry.borrow().get_tree_for_entry(path); let path_symbol = entry.borrow().root.borrow().get_symbol(&tree, u32::MAX);