上传修改后的主题

This commit is contained in:
WEB许何哲\xuhez
2023-07-14 09:21:21 +08:00
parent 1c022711a1
commit a48c8b2baa
209 changed files with 18379 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Developed by Bizople Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details
from odoo import models
from odoo.http import request
class Module(models.Model):
_inherit = "ir.module.module"
def next(self):
"""
Return the action linked to an ir.actions.todo is there exists one that
should be executed. Otherwise, redirect to /web
"""
Todos = self.env['ir.actions.todo']
active_todo = Todos.search([('state', '=', 'open')], limit=1)
if active_todo:
return active_todo.action_launch()
if request.env.user.table_color:
return {
'type': 'ir.actions.act_url',
'target': 'self',
'url': '/web?bg_color=True&tool_color_id=1',
}
else:
return {
'type': 'ir.actions.act_url',
'target': 'self',
'url': '/web',
}