优化权限相关
This commit is contained in:
@@ -15,6 +15,33 @@ class MrpProduction(models.Model):
|
||||
schedule_state = fields.Selection([('未排', '未排'), ('已排', '已排')],
|
||||
string='排程状态', default='未排')
|
||||
|
||||
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
|
||||
active = fields.Boolean(string='已归档', default=True)
|
||||
|
||||
def action_check(self):
|
||||
"""
|
||||
审核启用
|
||||
"""
|
||||
self.check_status = True
|
||||
|
||||
def action_uncheck(self):
|
||||
"""
|
||||
审核禁用
|
||||
"""
|
||||
self.check_status = False
|
||||
|
||||
def archive(self):
|
||||
"""
|
||||
归档
|
||||
"""
|
||||
self.write({'active': False})
|
||||
|
||||
def unarchive(self):
|
||||
"""
|
||||
取消归档
|
||||
"""
|
||||
self.write({'active': True})
|
||||
|
||||
@api.depends('request_ids')
|
||||
def _compute_maintenance_count(self):
|
||||
for production in self:
|
||||
|
||||
Reference in New Issue
Block a user