1
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!-- Schedule action for generating automatic database backup -->
|
||||
<record id="ir_cron_auto_backup" model="ir.cron">
|
||||
<field name="name">Backup: Automatic Database Backup</field>
|
||||
<field name="model_id" ref="model_db_backup_configure"/>
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
#############################################################################
|
||||
#
|
||||
# Eng Mohamed Saied
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.service import db
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
@@ -15,6 +8,7 @@ import time
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DbBackupConfigure(models.Model):
|
||||
_name = 'db.backup.configure'
|
||||
_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_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'},
|
||||
'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'},
|
||||
'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'},
|
||||
|
||||
@@ -26,6 +26,7 @@ def compute_badge_count_recursive(web_menus, menu_id):
|
||||
# 如果没有子菜单,返回当前菜单的badge_count
|
||||
return menu['badge_count']
|
||||
|
||||
|
||||
class IrUiMenu(models.Model):
|
||||
_inherit = "ir.ui.menu"
|
||||
|
||||
|
||||
@@ -55,3 +55,20 @@ class YuthonWillTask(http.Controller):
|
||||
'code':200,
|
||||
'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'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user