This commit is contained in:
pengyuthon
2025-12-23 10:03:45 +08:00
parent 6a959349b2
commit 915ff6980d
5 changed files with 19 additions and 10 deletions
-1
View File
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data noupdate="1"> <data noupdate="1">
<!-- Schedule action for generating automatic database backup -->
<record id="ir_cron_auto_backup" model="ir.cron"> <record id="ir_cron_auto_backup" model="ir.cron">
<field name="name">Backup: Automatic Database Backup</field> <field name="name">Backup: Automatic Database Backup</field>
<field name="model_id" ref="model_db_backup_configure"/> <field name="model_id" ref="model_db_backup_configure"/>
+1 -7
View File
@@ -1,10 +1,3 @@
#############################################################################
#
# Eng Mohamed Saied
#
#############################################################################
from odoo import api, fields, models, _ from odoo import api, fields, models, _
from odoo.service import db from odoo.service import db
from odoo.exceptions import ValidationError, UserError from odoo.exceptions import ValidationError, UserError
@@ -15,6 +8,7 @@ import time
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
class DbBackupConfigure(models.Model): class DbBackupConfigure(models.Model):
_name = 'db.backup.configure' _name = 'db.backup.configure'
_description = 'Database Backup Configuration' _description = 'Database Backup Configuration'
@@ -21,8 +21,6 @@ MENU_BADGE_MODEL_FUNC_ENUM = {
'yuthon_property.yuthon_property_rent_list': {'model': 'property.rent.list', 'func': 'get_no_read_count'}, 'yuthon_property.yuthon_property_rent_list': {'model': 'property.rent.list', 'func': 'get_no_read_count'},
'yuthon_property.yuthon_property_management_list': {'model': 'property.management.list', 'func': 'get_no_read_count'}, 'yuthon_property.yuthon_property_management_list': {'model': 'property.management.list', 'func': 'get_no_read_count'},
'yuthon_property.yuthon_property_deposit_list': {'model': 'property.deposit.list', 'func': 'get_no_read_count'}, 'yuthon_property.yuthon_property_deposit_list': {'model': 'property.deposit.list', 'func': 'get_no_read_count'},
'soong_workflow.menu_soong_workflow_todo_record': {'model': 'soong.workflow.record', 'func': 'get_no_read_count'},
'soong_workflow.menu_workflow_approval_request_copy': {'model': 'soong.workflow.record.copy', 'func': 'get_no_read_count'},
'yuthon_will_task.menu_yuthon_will_task_root': {'model': 'yuthon.will.task', 'func': 'read_number'}, 'yuthon_will_task.menu_yuthon_will_task_root': {'model': 'yuthon.will.task', 'func': 'read_number'},
'issue_library.yuthon_library_my_menu': {'model': 'issue.library', 'func': 'read_number'}, 'issue_library.yuthon_library_my_menu': {'model': 'issue.library', 'func': 'read_number'},
'yuthon_property_approval.property_lease_contract_coming_menu': {'model': 'property.lease.contract', 'func': 'read_coming_count'}, 'yuthon_property_approval.property_lease_contract_coming_menu': {'model': 'property.lease.contract', 'func': 'read_coming_count'},
+1
View File
@@ -26,6 +26,7 @@ def compute_badge_count_recursive(web_menus, menu_id):
# 如果没有子菜单,返回当前菜单的badge_count # 如果没有子菜单,返回当前菜单的badge_count
return menu['badge_count'] return menu['badge_count']
class IrUiMenu(models.Model): class IrUiMenu(models.Model):
_inherit = "ir.ui.menu" _inherit = "ir.ui.menu"
+17
View File
@@ -55,3 +55,20 @@ class YuthonWillTask(http.Controller):
'code':200, 'code':200,
'message':'success' 'message':'success'
}) })
@http.route('/will/taks/list', methods=['POST'], type='http', auth='none', csrf=False)
def task_list(self, **kwargs):
employee_id = kwargs.get('id')
data = request.env['yuthon.will.task'].sudo().search([])
result_list = []
for emp in data:
result = {
'name': emp.name,
'code': emp.code,
}
result_list.append(result)
return json.dumps({
'data': result_list,
'code': 200,
'message': 'success'
})