-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodels_mail_message_subtype.go
More file actions
executable file
·68 lines (65 loc) · 2.24 KB
/
Copy pathmodels_mail_message_subtype.go
File metadata and controls
executable file
·68 lines (65 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package mail
import (
"github.com/hexya-erp/hexya/src/models"
"github.com/hexya-erp/pool/h"
)
func init() {
h.MailMessageSubtype().DeclareModel()
h.MailMessageSubtype().AddFields(map[string]models.FieldDefinition{
"Name": models.CharField{
String: "Message Type",
Required: true,
Translate: true,
Help: "Message subtype gives a more precise type on the message," +
"especially for system notifications. For example, it can" +
"be a notification related to a new record (New), or to" +
"a stage change in a process (Stage change). Message subtypes" +
"allow to precisely tune the notifications the user want" +
"to receive on its wall.",
},
"Description": models.TextField{
String: "Description",
Translate: true,
Help: "Description that will be added in the message posted for" +
"this subtype. If void, the name will be added instead.",
},
"Internal": models.BooleanField{
String: "Internal Only",
Help: "Messages with internal subtypes will be visible only by" +
"employees, aka members of base_user group",
},
"ParentId": models.Many2OneField{
RelationModel: h.MailMessageSubtype(),
String: "Parent",
OnDelete: `set null`,
Help: "Parent subtype, used for automatic subscription. This field" +
"is not correctly named. For example on a project, the parent_id" +
"of project subtypes refers to task-related subtypes.",
},
"RelationField": models.CharField{
String: "Relation field",
Help: "Field used to link the related model to the subtype model" +
"when using automatic subscription on a related document." +
"The field is used to compute getattr(related_document.relation_field).",
},
"ResModel": models.CharField{
String: "Model",
Help: "Model the subtype applies to. If False, this subtype applies" +
"to all models.",
},
"Default": models.BooleanField{
String: "Default",
Default: models.DefaultValue(true),
Help: "Activated by default when subscribing.",
},
"Sequence": models.IntegerField{
String: "Sequence",
Default: models.DefaultValue(1),
Help: "Used to order subtypes.",
},
"Hidden": models.BooleanField{
String: "Hidden",
Help: "Hide the subtype in the follower options",
},
})
}