File tree Expand file tree Collapse file tree 1 file changed +40
-1
lines changed
record_keeping_attachment/models Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Original file line number Diff line number Diff line change 44
55class Attachment (models .Model ):
66 _name = 'ir.attachment'
7- _inherit = ['ir.attachment' , 'mail.thread' , 'rk.document.mixin' ]
7+ _inherit = ['ir.attachment' , 'mail.thread' ] # 'rk.document.mixin'
8+
9+ # Add document_id directly without the mixin
10+ document_id = fields .Many2one (
11+ 'rk.document' ,
12+ string = 'Document' ,
13+ help = 'The record-keeping document id' ,
14+ ondelete = 'restrict' ,
15+ auto_join = True ,
16+ copy = False ,
17+ index = True
18+ )
19+
20+ # Related fields from document
21+ classification_id = fields .Many2one (
22+ 'rk.classification' ,
23+ related = 'document_id.classification_id' ,
24+ store = True ,
25+ readonly = False
26+ )
27+
28+ document_type_id = fields .Many2one (
29+ 'rk.document.type' ,
30+ related = 'document_id.document_type_id' ,
31+ store = True ,
32+ readonly = False
33+ )
34+
35+ matter_id = fields .Many2one (
36+ 'rk.matter' ,
37+ related = 'document_id.matter_id' ,
38+ store = True ,
39+ readonly = False
40+ )
41+
42+ is_official = fields .Boolean (
43+ related = 'document_id.is_official' ,
44+ store = True ,
45+ readonly = False
46+ )
847
948 rk_file_name = fields .Char (string = "Original file Name" , readonly = True )
1049
You can’t perform that action at this time.
0 commit comments