コード例 #1
0
        public ViewData(string Id, ActionData refAction, string Name, ClassData classData, string sequence, string kind)
        {
            Kind = kind;

            ID = Id;
            Parent = classData;

            RefAction = refAction;

            Data = new Dictionary<string, object>();

            Data["name"] = Name;
            Data["sequence"] = sequence;
        }
コード例 #2
0
        public ViewData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence, string kind)
        {
            Kind = kind;

            ID = refView.ID + "_" + Kind.ToLower();
            Parent = classData;

            RefView = refView;
            RefAction = refAction;

            Data = new Dictionary<string, object>();

            Data["name"] = Name;
            Data["sequence"] = sequence;
        }
コード例 #3
0
        public ActionData(ActionData refAction, ClassData classData, string viewID, ViewKind viewKind, string sequence)
        {
            ID     = refAction.ID + "_" + viewKind.ToString().ToLower();
            Parent = classData;

            Data = new Dictionary <string, object>();

            Data["model"]          = "ir.actions.act_window.view";
            Data["name"]           = "";
            Data["view_id"]        = viewID;
            Data["domain"]         = "";
            Data["context"]        = "";
            Data["sequence"]       = sequence;
            Data["view_id"]        = "";
            Data["res_model"]      = "";
            Data["view_type"]      = "";
            Data["target"]         = "";
            Data["view_mode"]      = viewKind.ToString().ToLower();
            Data["search_view_id"] = "";
            Data["act_window_id"]  = refAction.ID;
        }
コード例 #4
0
        public ActionData(ActionData refAction, ClassData classData, string viewID, ViewKind viewKind, string sequence)
        {
            ID = refAction.ID + "_" + viewKind.ToString().ToLower();
            Parent = classData;

            Data = new Dictionary<string, object>();

            Data["model"] = "ir.actions.act_window.view";
            Data["name"] = "";
            Data["view_id"] = viewID;
            Data["domain"] = "";
            Data["context"] = "";
            Data["sequence"] = sequence;
            Data["view_id"] = "";
            Data["res_model"] = "";
            Data["view_type"] = "";
            Data["target"] = "";
            Data["view_mode"] = viewKind.ToString().ToLower();
            Data["search_view_id"] = "";
            Data["act_window_id"] = refAction.ID;
        }
コード例 #5
0
        public static string addAction(ActionData actionData)
        {
            string render = "<record model=\"" + (string)actionData.Data["model"] + "\" id=\"" + actionData.ID + "\">\r\n";

            Program.ProjectData.addTraduction(actionData.Parent, (string)actionData.Data["name"]);

            if (((string)actionData.Data["name"]).Length > 0) render += "\t\t\t<field name=\"name\">" + Utils.ReplaceSpecialChar((string)actionData.Data["name"]) + "</field>\r\n";
            if (((string)actionData.Data["view_id"]).Length > 0) render += "\t\t\t<field name=\"view_id\" ref=\"" + (string)actionData.Data["view_id"] + "\"/>\r\n";
            if (((string)actionData.Data["domain"]).Length > 0) render += "\t\t\t<field name=\"domain\">" + (string)actionData.Data["domain"] + "</field>\r\n";
            if (((string)actionData.Data["sequence"]).Length > 0) render += "\t\t\t<field name=\"sequence\">" + (string)actionData.Data["sequence"] + "</field>\r\n";
            if (((string)actionData.Data["context"]).Length > 0) render += "\t\t\t<field name=\"context\">" + (string)actionData.Data["context"] + "</field>\r\n";

            if (actionData.Parent.Inherit != null)
            {
                if (((string)actionData.Data["res_model"]).Length > 0) render += "\t\t\t<field name=\"res_model\">" + actionData.Parent.Inherit.ModuleName + "." + actionData.Parent.Inherit.Name + "</field>\r\n";
            }
            else
            {
                if (((string)actionData.Data["res_model"]).Length > 0) render += "\t\t\t<field name=\"res_model\">" + (string)actionData.Data["res_model"] + "</field>\r\n";
            }
            
            if (((string)actionData.Data["view_type"]).Length > 0) render += "\t\t\t<field name=\"view_type\">" + (string)actionData.Data["view_type"] + "</field>\r\n";
            if (((string)actionData.Data["view_mode"]).Length > 0) render += "\t\t\t<field name=\"view_mode\">" + (string)actionData.Data["view_mode"] + "</field>\r\n";
            if (((string)actionData.Data["target"]).Length > 0) render += "\t\t\t<!--<field name=\"target\">" + (string)actionData.Data["target"] + "</field>-->\r\n";

            if (actionData.Parent.Inherit == null)
            {
                if (((string)actionData.Data["search_view_id"]).Length > 0) render += "\t\t\t<field name=\"search_view_id\" ref=\"" + (string)actionData.Data["search_view_id"] + "\"/>\r\n";
            }

            if (((string)actionData.Data["act_window_id"]).Length > 0) render += "\t\t\t<field name=\"act_window_id\" ref=\"" + (string)actionData.Data["act_window_id"] + "\"/>\r\n";

            render += "\t\t</record>\r\n\r\n\t\t";

            return render;
        }
コード例 #6
0
 public TreeData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(refView, refAction, Name, classData, sequence, "Tree")
 {
     //
 }
コード例 #7
0
 public TreeData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Tree")
 {
     //
 }
コード例 #8
0
 public CalendarData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Calendar")
 {
     //
 }
コード例 #9
0
 public SearchData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Search")
 {
     //
 }
コード例 #10
0
 public KanbanData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Kanban")
 {
     //
 }
コード例 #11
0
 public KanbanData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Kanban")
 {
     //
 }
コード例 #12
0
 public CalendarData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(refView, refAction, Name, classData, sequence, "Calendar")
 {
     //
 }
コード例 #13
0
 public CalendarData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Calendar")
 {
     //
 }
コード例 #14
0
 public FormData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Form")
 {
     //
 }
コード例 #15
0
 public KanbanData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(refView, refAction, Name, classData, sequence, "Kanban")
 {
     //
 }
コード例 #16
0
 public GanttData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(refView, refAction, Name, classData, sequence, "Gantt")
 {
     //
 }
コード例 #17
0
 public SearchData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Search")
 {
     //
 }
コード例 #18
0
 public KanbanData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(refView, refAction, Name, classData, sequence, "Kanban")
 {
     //
 }
コード例 #19
0
 public SearchData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(refView, refAction, Name, classData, sequence, "Search")
 {
     //
 }
コード例 #20
0
 public SearchData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(refView, refAction, Name, classData, sequence, "Search")
 {
     //
 }
コード例 #21
0
 public TreeData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Tree")
 {
     //
 }
コード例 #22
0
 public CalendarData(ActData refView, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(refView, refAction, Name, classData, sequence, "Calendar")
 {
     //
 }
コード例 #23
0
 public FormData(string Id, ActionData refAction, string Name, ClassData classData, string sequence)
     : base(Id, refAction, Name, classData, sequence, "Form")
 {
     //
 }