You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let selected_config = match maybe_selected_config {
986
-
None => {
987
-
session.show_message(MessageType::INFO,String::from("No Odoo configuration selected. Please select a configuration in the settings."));
988
-
return;
989
-
}
990
-
Some(c)if c == "" => {
991
-
session.show_message(MessageType::INFO,String::from("No Odoo configuration selected. Please select a configuration in the settings."));
992
-
return;
993
-
}
986
+
None => default_profile_name(),
987
+
Some(c)if c == "" => default_profile_name(),
994
988
Some(config) => config,
995
989
};
990
+
if selected_config == "Disabled"{
991
+
info!("OdooLS is disabled. Exiting...");
992
+
return;
993
+
}
996
994
let config = config.and_then(|(ce, _)|{
997
995
ce.get(&selected_config).cloned().ok_or(format!("Unable to find selected configuration \"{}\"",&selected_config))
998
996
});
999
997
match config {
1000
998
Ok(config) => {
1001
999
if config.abstract_{
1002
-
session.show_message(MessageType::ERROR,format!("Selected configuration ({}) is abstract. Please select a valid configuration and restart.",selected_config));
1000
+
session.show_message(MessageType::ERROR,format!("Selected configuration ({}) is abstract. Please select a valid configuration and restart.",config.name));
1003
1001
return;
1004
1002
}
1005
1003
SyncOdoo::init(session, config);
@@ -1470,9 +1468,7 @@ impl Odoo {
1470
1468
ifOdoo::is_config_workspace_file(session, path){
1471
1469
let config_result = config::get_configuration(session.sync_odoo.get_file_mgr().borrow().get_workspace_folders())
0 commit comments