public static FunctionModel GetFunctionModel(string function, FunctionUsage functionUsage)
        {
            if (functionsModels == null)
            {
                functionsModels = new Dictionary <string, string>();

                StreamReader __model__ = File.OpenText(PathData.Models + "/openerp_scripts.py.model");

                string content = __model__.ReadToEnd();
                __model__.Close();

                string[] functs = content.Trim().Split(new string[] { "-- new script --" }, StringSplitOptions.RemoveEmptyEntries);
                foreach (string funct in functs)
                {
                    string[] lines = funct.Trim().Split(new char[] { '\n' });

                    string name  = (lines[0].Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries))[1].Trim();
                    string usage = (lines[1].Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries))[1].Trim();

                    string cont = "";
                    for (int i = 2; i < lines.Length; i++)
                    {
                        cont += lines[i];
                    }

                    functionsModels[name + ":" + usage] = cont.Trim();
                }
            }

            FunctionModel functionModel = new FunctionModel(functionUsage);

            string usefor = functionUsage.ToString().ToLower();

            if (functionsModels.ContainsKey(function + ":" + usefor))
            {
                functionModel.Content = functionsModels[function + ":" + usefor];
                functionModel.ScanAllVariables();

                return(functionModel);
            }
            else
            {
                functionModel.Content = functionsModels["empty_function:" + usefor];
                functionModel.ScanAllVariables();
                functionModel.Default = true;

                return(functionModel);
            }
        }
        public static FunctionModel GetFunctionModel(string function, FunctionUsage functionUsage)
        {
            if (functionsModels == null)
            {
                functionsModels = new Dictionary<string, string>();

                StreamReader __model__ = File.OpenText(PathData.Models + "/openerp_scripts.py.model");

                string content = __model__.ReadToEnd();
                __model__.Close();

                string[] functs = content.Trim().Split(new string[] { "-- new script --" }, StringSplitOptions.RemoveEmptyEntries);
                foreach (string funct in functs)
                {
                    string[] lines = funct.Trim().Split(new char[] { '\n' });

                    string name = (lines[0].Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries))[1].Trim();
                    string usage = (lines[1].Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries))[1].Trim();

                    string cont = "";
                    for (int i = 2; i < lines.Length; i++)
                    {
                        cont += lines[i];
                    }

                    functionsModels[name + ":" + usage] = cont.Trim();
                }
            }

            FunctionModel functionModel = new FunctionModel(functionUsage);

            string usefor = functionUsage.ToString().ToLower();

            if (functionsModels.ContainsKey(function + ":" + usefor))
            {
                functionModel.Content = functionsModels[function + ":" + usefor];
                functionModel.ScanAllVariables();

                return functionModel;
            }
            else
            {
                functionModel.Content = functionsModels["empty_function:" + usefor];
                functionModel.ScanAllVariables();
                functionModel.Default = true;

                return functionModel;
            }
        }