work flow schedule
This commit is contained in:
@@ -11,8 +11,14 @@ class AcademySchedule(models.Model):
|
||||
date = fields.Datetime(string='Ngày và giờ diễn ra buổi học', required=True)
|
||||
duration = fields.Float(string='Thời lượng buổi học (tính theo giờ)', required=True)
|
||||
state = fields.Selection([
|
||||
('draft', 'Draft'),
|
||||
('confirmed', 'Confirmed'),
|
||||
('done', 'Done')
|
||||
('draft', 'Mới đặt lịch'),
|
||||
('confirmed', 'Xác nhận'),
|
||||
('cancel', 'Đã hủy')
|
||||
], string='Trạng thái', default='draft', required=True)
|
||||
|
||||
def action_confirm(self):
|
||||
self.state = 'confirmed'
|
||||
|
||||
def action_cancel(self):
|
||||
self.state = 'cancel'
|
||||
|
||||
Reference in New Issue
Block a user