Add Attachments Field - Assignments

This commit is contained in:
Mazen Abdo 2025-08-20 14:11:35 +03:00
parent 312959715d
commit f7a3d0b7bc
113 changed files with 4 additions and 2 deletions

View File

@ -70,6 +70,7 @@ class OpAssignmentSubLine(models.Model):
'res.company', string='Company',
default=lambda self: self.env.user.company_id)
attachment = fields.Binary("Attachment")
attachment_filename = fields.Char("File Name")
def act_draft(self):
result = self.state = 'draft'

View File

@ -47,7 +47,8 @@
<field name="assignment_id"
domain="[('allocation_ids','=',student_id),('state','=','publish')]"/>
<field name="submission_date"/>
<field name="attachment"/>
<field name="attachment" filename="attachment_filename"
attrs="{'invisible': [('assignment_id','=',False)]}"/>
<field name="marks"
attrs="{'readonly':[('state','=','accept')], 'invisible':[('user_boolean','=',False),('state','!=','accept')]}"/>
<field name="user_boolean" invisible="1"/>

Some files were not shown because too many files have changed in this diff Show More