fix misc for ai

This commit is contained in:
Ivan Office
2023-09-08 23:49:14 +08:00
parent 6bda352a53
commit bc0fbb5d75
14 changed files with 157 additions and 41 deletions

View File

@@ -16,3 +16,15 @@ class BlogBlog(models.Model):
action = self.env.ref('website_blog.action_blog_post').read()[0]
action['domain'] = [('blog_id', '=', self.id)]
return action
# def unlink(self):
# # active的先不删除设置为 deactive
# to_deactive = self.filtered(lambda r: r.active)
# self = self - to_deactive
# to_deactive.write({
# 'active': False,
# })
# if self:
# return super(BlogBlog, self).unlink()
# else:
# return False