@@ -22,6 +22,7 @@
|
||||
"views/soong_workflow_record.xml",
|
||||
"views/soong_approval_group.xml",
|
||||
'wizard/approval_notice_wizard_views.xml',
|
||||
'wizard/soong_transmitted_wizard_views.xml',
|
||||
"wizard/soong_workflow_comment_wizard_view.xml",
|
||||
"templates/soong_workflow_templates.xml",
|
||||
],
|
||||
|
||||
@@ -45,27 +45,16 @@ class SoongWorkflow(models.Model):
|
||||
domain=MODEL_DOMAIN,
|
||||
help="Enter business model you would like to modify its workflow.",
|
||||
)
|
||||
node_ids = fields.One2many(
|
||||
comodel_name="soong.workflow.node", inverse_name="workflow_id", string="Nodes"
|
||||
)
|
||||
link_ids = fields.One2many(
|
||||
comodel_name="soong.workflow.link", inverse_name="workflow_id", string="Links"
|
||||
)
|
||||
remove_default_btn_until_end = fields.Boolean(
|
||||
string="是否覆盖表头按钮状态", default=False
|
||||
)
|
||||
is_enable_return_button = fields.Boolean(
|
||||
string="是否启用收回", default=True
|
||||
)
|
||||
|
||||
current_stage_highlight_color = fields.Char(
|
||||
default="rgb(0, 255, 255)",
|
||||
help="The color to highlight the current stage on flow",
|
||||
)
|
||||
node_ids = fields.One2many(comodel_name="soong.workflow.node", inverse_name="workflow_id", string="Nodes")
|
||||
link_ids = fields.One2many(comodel_name="soong.workflow.link", inverse_name="workflow_id", string="Links")
|
||||
remove_default_btn_until_end = fields.Boolean(string="是否覆盖表头按钮状态", default=False)
|
||||
|
||||
current_stage_highlight_color = fields.Char(default="rgb(0, 255, 255)",help="The color to highlight the current stage on flow",)
|
||||
start_time = fields.Datetime(string="生效日期", copy=False, default=fields.Datetime.now)
|
||||
end_time = fields.Datetime(string="失效日期", copy=False)
|
||||
is_enable = fields.Boolean(string="是否启用", default="False", compute="compute_is_enable", store=True)
|
||||
is_enable_return_button = fields.Boolean(string="是否启用收回", default=True)
|
||||
is_enable_transmitted_button = fields.Boolean(string="是否启用转交", default=True)
|
||||
approvals_group_id = fields.Many2one('soong.approval.group', string="审批分组")
|
||||
|
||||
def copy(self, default=None):
|
||||
|
||||
@@ -242,14 +242,17 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
res = self._update_fields_view(view_type, res)
|
||||
# res = self._add_state_tree_view(view_type, res)
|
||||
res = self._add_soong_workflow_log(view_type, res, params)
|
||||
# 收回
|
||||
# todo 后许可拓展退回层级
|
||||
res = self._add_return_button(view_type, res)
|
||||
# 转交 如果一条链路直接跳转,如果多条链路选择跳转
|
||||
# res = self._add_transmitted_button(view_type, res)
|
||||
return res
|
||||
|
||||
# 收回逻辑
|
||||
def _add_return_button(self, view_type, res):
|
||||
model = self._name
|
||||
wkf_obj = self.env["soong.workflow"]
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model)])
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model), ('is_enable', '=', True)])
|
||||
|
||||
if not wkf_rec.is_enable_return_button:
|
||||
return res
|
||||
@@ -260,9 +263,9 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
header_el = header_el[0] if header_el else False
|
||||
if header_el:
|
||||
button = etree.Element("button", {
|
||||
"name": "action_return", # 这里定义了按钮执行的服务器端动作
|
||||
"type": "object", # 触发自定义对象动作
|
||||
"string": "收回", # 按钮显示的名称
|
||||
"name": "action_return",
|
||||
"type": "object",
|
||||
"string": "收回",
|
||||
"class": "btn-primary", # 按钮的样式
|
||||
# "icon": "fa-undo", # 按钮图标 (如果需要)
|
||||
})
|
||||
@@ -328,6 +331,35 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
# btn_invisible = btn_invisible + " or " + button.attrib["invisible"]
|
||||
# button.set("invisible", btn_invisible)
|
||||
|
||||
# 转交
|
||||
def _add_transmitted_button(self, view_type, res):
|
||||
model = self._name
|
||||
wkf_obj = self.env["soong.workflow"]
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model), ('is_enable', '=', True)])
|
||||
|
||||
if not wkf_rec.is_enable_transmitted_button:
|
||||
return res
|
||||
|
||||
arch = etree.fromstring(res["arch"])
|
||||
if view_type == "form":
|
||||
header_el = arch.xpath("//form/header")
|
||||
header_el = header_el[0] if header_el else False
|
||||
if header_el:
|
||||
button = etree.Element("button", {
|
||||
"name": "action_transmitted",
|
||||
"type": "object",
|
||||
"string": "转交",
|
||||
"class": "btn-primary", # 按钮的样式
|
||||
})
|
||||
header_el.append(button)
|
||||
res["arch"] = etree.tostring(arch, encoding="unicode").replace("\t", "")
|
||||
return res
|
||||
|
||||
def action_transmitted(self):
|
||||
# 判断链路是一个就跳转
|
||||
# 是多个就弹窗选择
|
||||
pass
|
||||
|
||||
def _remove_default_header(self, view_type, res):
|
||||
"""
|
||||
Removes default header element from form view.
|
||||
@@ -337,7 +369,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
"""
|
||||
model = self._name
|
||||
wkf_obj = self.env["soong.workflow"]
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model)])
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model), ('is_enable', '=', True)])
|
||||
|
||||
if not wkf_rec.remove_default_btn_until_end:
|
||||
return res
|
||||
@@ -441,7 +473,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
header_el = etree.Element("header")
|
||||
form_el.insert(0, header_el)
|
||||
# Construct Buttons & Fields Tags
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model)])
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model), ('is_enable', '=', True)])
|
||||
for node in wkf_rec.node_ids:
|
||||
for button in node.button_ids:
|
||||
# Check Condition Code
|
||||
@@ -528,7 +560,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
model = self._name
|
||||
visible_seq = []
|
||||
arch = etree.fromstring(res["arch"])
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model)])
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model), ('is_enable', '=', True)])
|
||||
|
||||
# Find header & ADD state
|
||||
if view_type == "form":
|
||||
@@ -618,7 +650,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
# Variables
|
||||
model = self._name
|
||||
uid = self._uid
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model)])
|
||||
wkf_rec = wkf_obj.search([("model_id", "=", model), ('is_enable', '=', True)])
|
||||
arch = etree.fromstring(res["arch"])
|
||||
|
||||
# Helper Functions
|
||||
|
||||
@@ -129,9 +129,7 @@ class SoongWorkflowNode(models.Model):
|
||||
compute="_compute_custom_colors", readonly=True, string="Label Color"
|
||||
)
|
||||
|
||||
@api.depends(
|
||||
"bg_color", "label_color", "use_custom_colors", "flow_start", "flow_end"
|
||||
)
|
||||
@api.depends("bg_color", "label_color", "use_custom_colors", "flow_start", "flow_end")
|
||||
def _compute_custom_colors(self):
|
||||
for rec in self:
|
||||
if rec.use_custom_colors:
|
||||
@@ -290,7 +288,7 @@ class SoongWorkflowNodeButton(models.Model):
|
||||
rec.workflow_id = (
|
||||
self.env["soong.workflow"]
|
||||
.sudo()
|
||||
.search([("model_id", "=", model_id)])
|
||||
.search([("model_id", "=", model_id), ('is_enable', '=', 'yes')])
|
||||
)
|
||||
|
||||
@api.constrains("btn_key")
|
||||
|
||||
@@ -23,4 +23,6 @@ access_soong_approval_group,soong_approval_group,model_soong_approval_group,soon
|
||||
access_soong_approval_notice_wizard,soong_approval_notice_wizard,model_soong_approval_notice_wizard,base.group_user,1,1,1,1
|
||||
|
||||
access_soong_workflow_log_user,soong_workflow_log_user,model_soong_workflow_log,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
access_soong_workflow_comment_wizard_user,soong_workflow_comment_wizard_user,model_soong_workflow_comment_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
access_soong_workflow_comment_wizard_user,soong_workflow_comment_wizard_user,model_soong_workflow_comment_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
|
||||
access_soong_approval_transmitted_wizard,soong_approval_transmitted_wizard,model_soong_approval_transmitted_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
|
@@ -39,7 +39,7 @@
|
||||
action="soong_note_action"/>
|
||||
|
||||
<menuitem id="menu_soong_approval_note"
|
||||
sequence="3"
|
||||
sequence="1"
|
||||
name="常用审批意见"
|
||||
parent="menu_soong_other_setting"
|
||||
action="soong_note_action"/>
|
||||
|
||||
@@ -90,10 +90,10 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_soong_workflow"
|
||||
sequence="2"
|
||||
name="工作流配置"
|
||||
parent="menu_soong_other_setting"
|
||||
action="action_soong_workflow"/>
|
||||
<!-- <menuitem id="menu_soong_workflow"-->
|
||||
<!-- sequence="2"-->
|
||||
<!-- name="工作流配置"-->
|
||||
<!-- parent="menu_soong_other_setting"-->
|
||||
<!-- action="action_soong_workflow"/>-->
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
|
||||
from . import approval_notice_wizard
|
||||
from . import soong_transmitted_wizard
|
||||
from . import soong_workflow_comment_wizard
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models, tools, _
|
||||
from datetime import datetime, date, time, timedelta
|
||||
from odoo.tools.safe_eval import safe_eval
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SoongApprovalTransmittedWizard(models.TransientModel):
|
||||
_name = 'soong.approval.transmitted.wizard'
|
||||
_description = """ 转交弹窗 """
|
||||
|
||||
name = fields.Char(string='名称')
|
||||
|
||||
def confirm(self):
|
||||
pass
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="soong_approval_transmitted_wizard_form" model="ir.ui.view">
|
||||
<field name="name">一键转交</field>
|
||||
<field name="model">soong.approval.transmitted.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<!-- 对接消息通知 -->
|
||||
<footer>
|
||||
<button name="confirm" string="确认" type="object" class="oe_highlight"/>
|
||||
<button string="返回" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,4 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
@@ -1,37 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "xw_kk_preview",
|
||||
|
||||
'summary': """
|
||||
kk file preview for odoo
|
||||
""",
|
||||
|
||||
'description': """
|
||||
file preview,
|
||||
kk file preview
|
||||
""",
|
||||
|
||||
'author': "masterjmz",
|
||||
'website': "https://www.openerpnext.com",
|
||||
|
||||
'category': 'Apps/preview',
|
||||
'version': '16.0.0.1',
|
||||
'license': 'AGPL-3',
|
||||
'price': 9999,
|
||||
|
||||
'depends': ['base'],
|
||||
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/views.xml',
|
||||
],
|
||||
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'xw_kk_preview/static/src/binary_field/*.*',
|
||||
'xw_kk_preview/static/libs/*.*',
|
||||
'xw_kk_preview/static/src/kk_dialog_patch.js',
|
||||
'xw_kk_preview/static/css/*.*',
|
||||
]
|
||||
},
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import controllers
|
||||
@@ -1,21 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# from odoo import http
|
||||
|
||||
|
||||
# class XwKkPreview(http.Controller):
|
||||
# @http.route('/xw_kk_preview/xw_kk_preview', auth='public')
|
||||
# def index(self, **kw):
|
||||
# return "Hello, world"
|
||||
|
||||
# @http.route('/xw_kk_preview/xw_kk_preview/objects', auth='public')
|
||||
# def list(self, **kw):
|
||||
# return http.request.render('xw_kk_preview.listing', {
|
||||
# 'root': '/xw_kk_preview/xw_kk_preview',
|
||||
# 'objects': http.request.env['xw_kk_preview.xw_kk_preview'].search([]),
|
||||
# })
|
||||
|
||||
# @http.route('/xw_kk_preview/xw_kk_preview/objects/<model("xw_kk_preview.xw_kk_preview"):obj>', auth='public')
|
||||
# def object(self, obj, **kw):
|
||||
# return http.request.render('xw_kk_preview.object', {
|
||||
# 'object': obj
|
||||
# })
|
||||
@@ -1,3 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
@@ -1,50 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api
|
||||
import base64
|
||||
|
||||
|
||||
class XwKKPreview(models.AbstractModel):
|
||||
"""
|
||||
xw_kk_preview.xw_kk_preview
|
||||
"""
|
||||
_name = 'xw_kk_preview.xw_kk_preview'
|
||||
_description = 'xw_kk_preview.xw_kk_preview'
|
||||
|
||||
@api.model
|
||||
def get_preview_url(self, res_model, res_id, field_name, file_name_field):
|
||||
"""
|
||||
get file info
|
||||
"""
|
||||
base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url')
|
||||
record = self.env[res_model].sudo().browse(res_id)
|
||||
|
||||
file_name = None
|
||||
if file_name_field:
|
||||
file_name = record[file_name_field]
|
||||
|
||||
if not file_name:
|
||||
stream = None
|
||||
try:
|
||||
stream = self.env['ir.binary'].sudo()._get_stream_from(
|
||||
record, field_name, False, file_name_field or 'name')
|
||||
except Exception as e:
|
||||
return {
|
||||
'status': 'error',
|
||||
'message': str(e),
|
||||
}
|
||||
file_name = stream.download_name
|
||||
|
||||
# http://124.223.107.118:8012/onlinePreview
|
||||
preivew_url = self.env['ir.config_parameter'].sudo().get_param('xw_kk_preview.preivew_url')
|
||||
if not preivew_url:
|
||||
return {
|
||||
'status': 'error',
|
||||
'message': 'please set preivew_url in system parameters',
|
||||
}
|
||||
|
||||
return {
|
||||
'status': 'success',
|
||||
'preview_url': preivew_url,
|
||||
'url': f'{base_url}/web/content/{res_model}/{res_id}/{field_name}/{file_name}?download=true',
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_xw_kk_preview_xw_kk_preview,xw_kk_preview.xw_kk_preview,model_xw_kk_preview_xw_kk_preview,base.group_user,1,1,1,1
|
||||
|
@@ -1,18 +0,0 @@
|
||||
|
||||
.modal-full {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
max-width: 100%;
|
||||
padding: 0 !important;
|
||||
|
||||
.modal-content {
|
||||
height: 100% !important;
|
||||
max-height: 100% !important;
|
||||
.modal-body {
|
||||
> div {
|
||||
height: 100% !important;
|
||||
max-height: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/js-base64@3.6.0/base64.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):function(){const r=e.Base64,o=t();o.noConflict=()=>(e.Base64=r,o),e.Meteor&&(Base64=o),e.Base64=o}()}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:this,(function(){"use strict";const e="3.6.0",t="function"==typeof atob,r="function"==typeof btoa,o="function"==typeof Buffer,n="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,f=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],i=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(f),c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u=String.fromCharCode.bind(String),s="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),d=e=>e.replace(/[+\/]/g,(e=>"+"==e?"-":"_")).replace(/=+$/m,""),l=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),h=e=>{let t,r,o,n,a="";const i=e.length%3;for(let i=0;i<e.length;){if((r=e.charCodeAt(i++))>255||(o=e.charCodeAt(i++))>255||(n=e.charCodeAt(i++))>255)throw new TypeError("invalid character found");t=r<<16|o<<8|n,a+=f[t>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]}return i?a.slice(0,i-3)+"===".substring(i):a},p=r?e=>btoa(e):o?e=>Buffer.from(e,"binary").toString("base64"):h,y=o?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,o=e.length;r<o;r+=4096)t.push(u.apply(null,e.subarray(r,r+4096)));return p(t.join(""))},A=(e,t=!1)=>t?d(y(e)):y(e),b=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?u(192|t>>>6)+u(128|63&t):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|63&t)},g=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,B=e=>e.replace(g,b),x=o?e=>Buffer.from(e,"utf8").toString("base64"):a?e=>y(a.encode(e)):e=>p(B(e)),C=(e,t=!1)=>t?d(x(e)):x(e),m=e=>C(e,!0),U=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,F=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return u(55296+(t>>>10))+u(56320+(1023&t));case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=e=>e.replace(U,F),S=e=>{if(e=e.replace(/\s+/g,""),!c.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,o,n="";for(let a=0;a<e.length;)t=i[e.charAt(a++)]<<18|i[e.charAt(a++)]<<12|(r=i[e.charAt(a++)])<<6|(o=i[e.charAt(a++)]),n+=64===r?u(t>>16&255):64===o?u(t>>16&255,t>>8&255):u(t>>16&255,t>>8&255,255&t);return n},E=t?e=>atob(l(e)):o?e=>Buffer.from(e,"base64").toString("binary"):S,v=o?e=>s(Buffer.from(e,"base64")):e=>s(E(e),(e=>e.charCodeAt(0))),D=e=>v(z(e)),R=o?e=>Buffer.from(e,"base64").toString("utf8"):n?e=>n.decode(v(e)):e=>w(E(e)),z=e=>l(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),T=e=>R(z(e)),Z=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),j=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Z(t));e("fromBase64",(function(){return T(this)})),e("toBase64",(function(e){return C(this,e)})),e("toBase64URI",(function(){return C(this,!0)})),e("toBase64URL",(function(){return C(this,!0)})),e("toUint8Array",(function(){return D(this)}))},I=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Z(t));e("toBase64",(function(e){return A(this,e)})),e("toBase64URI",(function(){return A(this,!0)})),e("toBase64URL",(function(){return A(this,!0)}))},O={version:e,VERSION:"3.6.0",atob:E,atobPolyfill:S,btoa:p,btoaPolyfill:h,fromBase64:T,toBase64:C,encode:C,encodeURI:m,encodeURL:m,utob:B,btou:w,decode:T,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/=+$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:A,toUint8Array:D,extendString:j,extendUint8Array:I,extendBuiltins:()=>{j(),I()},Base64:{}};return Object.keys(O).forEach((e=>O.Base64[e]=O[e])),O}));
|
||||
//# sourceMappingURL=/sm/8bca8602e2256d240cef904e1c1df432ccfdd2a2a73f6911c60be79e526e3e1e.map
|
||||
@@ -1,55 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { BinaryField } from "@web/views/fields/binary/binary_field";
|
||||
import { useOwnedDialogs, useService } from "@web/core/utils/hooks";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { KKPreviewDialog } from "./kk_preview_dialog";
|
||||
|
||||
|
||||
/**
|
||||
* binary field patch
|
||||
* @param {Object} param0
|
||||
*/
|
||||
patch(BinaryField.prototype, "xc_utils_binary_field_patch", {
|
||||
|
||||
setup() {
|
||||
this._super(...arguments);
|
||||
this.addDialog = useOwnedDialogs();
|
||||
this.orm = useService("orm");
|
||||
this.notification = useService("notification");
|
||||
},
|
||||
|
||||
/**
|
||||
* do preview
|
||||
*/
|
||||
do_preview() {
|
||||
|
||||
let res_id = this.props.record.data.id;
|
||||
let res_model = this.props.record.resModel;
|
||||
let file_name = this.props.filename;
|
||||
let field_name = this.props.name;
|
||||
|
||||
this.orm.call(
|
||||
"xw_kk_preview.xw_kk_preview", "get_preview_url", [
|
||||
res_model, res_id, field_name, file_name]).then((result) => {
|
||||
if (result && result.status == 'success') {
|
||||
|
||||
let preview_url = result.preview_url;
|
||||
let finalUrl = preview_url + '?url=' + encodeURIComponent(Base64.encode(result.url));
|
||||
this.addDialog(KKPreviewDialog, {
|
||||
url: finalUrl,
|
||||
close: () => {},
|
||||
size: 'full'
|
||||
});
|
||||
} else {
|
||||
this.notification.add(
|
||||
this.env._t("Warning"), {
|
||||
title: this.env._t('Get File Preview URL Failed!'),
|
||||
type: "warning"
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="web.BinaryField" t-inherit="web.BinaryField">
|
||||
|
||||
<xpath expr="//a[hasclass('o_form_uri')]" position="after">
|
||||
<button t-if="props.record.data.id" class="btn btn-primary" t-on-click="do_preview">Preview</button>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//button[hasclass('o_clear_file_button')]" position="after">
|
||||
<button t-if="props.record.data.id" class="btn btn-primary" t-on-click="do_preview">Preview</button>
|
||||
</xpath>
|
||||
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
@@ -1,24 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class KKPreviewDialog extends Component {};
|
||||
|
||||
KKPreviewDialog.props = {
|
||||
url: String,
|
||||
close: Function,
|
||||
size: {
|
||||
type: String,
|
||||
optional: true,
|
||||
}
|
||||
};
|
||||
|
||||
KKPreviewDialog.defaultProps = {
|
||||
fullscreen: false,
|
||||
};
|
||||
|
||||
KKPreviewDialog.components = { Dialog };
|
||||
KKPreviewDialog.template = "xc_utils.kk_preview_dialog";
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="xc_utils.kk_preview_dialog" owl="1">
|
||||
<Dialog size="props.size">
|
||||
<div>
|
||||
<iframe t-att-src="props.url" style="width: 100%; height: 100%; border: none;"></iframe>
|
||||
</div>
|
||||
<t t-set-slot="footer" owl="1">
|
||||
<button class="btn" t-on-click="() => props.close()">Discard</button>
|
||||
</t>
|
||||
</Dialog>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
@@ -1,14 +0,0 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(Dialog.prototype, 'xw_kk_preview.dialog_patch', {});
|
||||
|
||||
Dialog.props = {
|
||||
...Dialog.props,
|
||||
size: {
|
||||
type: String,
|
||||
optional: true,
|
||||
}
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!--
|
||||
<template id="listing">
|
||||
<ul>
|
||||
<li t-foreach="objects" t-as="object">
|
||||
<a t-attf-href="#{ root }/objects/#{ object.id }">
|
||||
<t t-esc="object.display_name"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<template id="object">
|
||||
<h1><t t-esc="object.display_name"/></h1>
|
||||
<dl>
|
||||
<t t-foreach="object._fields" t-as="field">
|
||||
<dt><t t-esc="field"/></dt>
|
||||
<dd><t t-esc="object[field]"/></dd>
|
||||
</t>
|
||||
</dl>
|
||||
</template>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,60 +0,0 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- explicit list view definition -->
|
||||
<!--
|
||||
<record model="ir.ui.view" id="xw_kk_preview.list">
|
||||
<field name="name">xw_kk_preview list</field>
|
||||
<field name="model">xw_kk_preview.xw_kk_preview</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
<field name="value2"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- actions opening views on models -->
|
||||
<!--
|
||||
<record model="ir.actions.act_window" id="xw_kk_preview.action_window">
|
||||
<field name="name">xw_kk_preview window</field>
|
||||
<field name="res_model">xw_kk_preview.xw_kk_preview</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- server action to the one above -->
|
||||
<!--
|
||||
<record model="ir.actions.server" id="xw_kk_preview.action_server">
|
||||
<field name="name">xw_kk_preview server</field>
|
||||
<field name="model_id" ref="model_xw_kk_preview_xw_kk_preview"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
action = {
|
||||
"type": "ir.actions.act_window",
|
||||
"view_mode": "tree,form",
|
||||
"res_model": model._name,
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<!-- Top menu item -->
|
||||
<!--
|
||||
<menuitem name="xw_kk_preview" id="xw_kk_preview.menu_root"/>
|
||||
-->
|
||||
<!-- menu categories -->
|
||||
<!--
|
||||
<menuitem name="Menu 1" id="xw_kk_preview.menu_1" parent="xw_kk_preview.menu_root"/>
|
||||
<menuitem name="Menu 2" id="xw_kk_preview.menu_2" parent="xw_kk_preview.menu_root"/>
|
||||
-->
|
||||
<!-- actions -->
|
||||
<!--
|
||||
<menuitem name="List" id="xw_kk_preview.menu_1_list" parent="xw_kk_preview.menu_1"
|
||||
action="xw_kk_preview.action_window"/>
|
||||
<menuitem name="Server to list" id="xw_kk_preview" parent="xw_kk_preview.menu_2"
|
||||
action="xw_kk_preview.action_server"/>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,3 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
@@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "preview_demo",
|
||||
|
||||
'summary': """
|
||||
Short (1 phrase/line) summary of the module's purpose, used as
|
||||
subtitle on modules listing or apps.openerp.com""",
|
||||
|
||||
'description': """
|
||||
Long description of module's purpose
|
||||
""",
|
||||
|
||||
'author': "My Company",
|
||||
'website': "https://www.yourcompany.com",
|
||||
|
||||
'category': 'apps/demo',
|
||||
'version': '16.0.0.1',
|
||||
|
||||
'depends': ['base', 'web'],
|
||||
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/views.xml',
|
||||
]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import patch_attachment
|
||||
@@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class preview_demo(models.Model):
|
||||
_name = 'xw_kk_preview_demo.preview_demo'
|
||||
_description = 'kk preview demo'
|
||||
|
||||
name = fields.Char()
|
||||
value = fields.Integer()
|
||||
value2 = fields.Float(compute="_value_pc", store=True)
|
||||
description = fields.Text()
|
||||
test_preview = fields.Binary(string="test_preview")
|
||||
|
||||
@api.depends('value')
|
||||
def _value_pc(self):
|
||||
for record in self:
|
||||
record.value2 = float(record.value) / 100
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class MdContractAttachment(models.Model):
|
||||
'''
|
||||
attachment
|
||||
'''
|
||||
_inherit = 'ir.attachment'
|
||||
|
||||
@api.model
|
||||
def check(self, mode, values=None):
|
||||
"""
|
||||
Restricts the access to an ir.attachment, according to referred mode
|
||||
"""
|
||||
return True
|
||||
# return super().check(mode, values)
|
||||
@@ -1,2 +0,0 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_xw_kk_preview_demo_preview_demo,xw_kk_preview_demo.preview_demo,model_xw_kk_preview_demo_preview_demo,,1,1,1,1
|
||||
|
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
@@ -1,59 +0,0 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- explicit list view definition -->
|
||||
|
||||
<record model="ir.ui.view" id="xw_kk_preview_demo.list">
|
||||
<field name="name">preview_demo</field>
|
||||
<field name="model">xw_kk_preview_demo.preview_demo</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
<field name="value2"/>
|
||||
<field name="test_preview" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- form -->
|
||||
<record model="ir.ui.view" id="xw_kk_preview_demo.form">
|
||||
<field name="name">preview_demo form</field>
|
||||
<field name="model">xw_kk_preview_demo.preview_demo</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
<field name="value2"/>
|
||||
</group>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label" for="test_preview">test_preview</label>
|
||||
<div class="col-sm-10">
|
||||
<field name="test_preview"/>
|
||||
</div>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="xw_kk_preview_demo.action_window">
|
||||
<field name="name">preview_demo window</field>
|
||||
<field name="res_model">xw_kk_preview_demo.preview_demo</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Top menu item -->
|
||||
<menuitem name="preview_demo" id="xw_kk_preview_demo.menu_root"/>
|
||||
|
||||
<!-- menu categories -->
|
||||
<menuitem name="Menu 1" id="xw_kk_preview_demo.menu_1" parent="xw_kk_preview_demo.menu_root"/>
|
||||
<menuitem name="Menu 2" id="xw_kk_preview_demo.menu_2" parent="xw_kk_preview_demo.menu_root"/>
|
||||
|
||||
<!-- actions -->
|
||||
<menuitem name="List" id="xw_kk_preview_demo.menu_1_list" parent="xw_kk_preview_demo.menu_1" action="xw_kk_preview_demo.action_window"/>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -24,5 +24,6 @@
|
||||
sequence="15" action="attendance_iot_manager_action"/>
|
||||
<menuitem id="menu_hr_attendance_work" name="考勤时间表配置" parent="hr_attendance.menu_hr_attendance_root"
|
||||
sequence="18" action="resource.action_resource_calendar_form"/>
|
||||
<menuitem id="tianhe_holiday_setting_menu" parent="hr_attendance.menu_hr_attendance_root" sequence="19" name="假期类型配置" action="holiday_setting_action"/>
|
||||
<menuitem id="tianhe_holiday_setting_menu" parent="hr_attendance.menu_hr_attendance_root"
|
||||
sequence="19" name="假期类型配置" action="holiday_setting_action"/>
|
||||
</odoo>
|
||||
@@ -25,7 +25,7 @@
|
||||
</record>
|
||||
|
||||
<record id="attendance_iot_manager_action" model="ir.actions.act_window">
|
||||
<field name="name">假期类型配置</field>
|
||||
<field name="name">考勤机设备管理</field>
|
||||
<field name="res_model">attendance.iot.manager</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="search_view_id" ref="attendance_iot_manager_filter"/>
|
||||
|
||||
@@ -13,9 +13,8 @@
|
||||
'website': 'https://www.pengyuthon.com',
|
||||
'depends': ['base', 'hr'],
|
||||
'data': [
|
||||
# 'data/hr_department_data.xml',
|
||||
# 'data/user_role_data.xml',
|
||||
'data/yuthon.job.lv.csv',
|
||||
'data/employee_code_data.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/yuthon_hr_employee_views.xml',
|
||||
'views/yuthon_hr_department_views.xml',
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="employee_code_sequence" model="ir.sequence">
|
||||
<field name="name">员工编号</field>
|
||||
<field name="code">employee_code</field>
|
||||
<field name="prefix">US%(y)s%(month)s%(day)s</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,138 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="hr_department_thtz" model="hr.department">
|
||||
<field name="name">天河投资</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_xxxh" model="hr.department">
|
||||
<field name="name">新兴协会</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦3楼东侧</field>
|
||||
<field name="is_institution">True</field>
|
||||
<field name="is_global_department">False</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_kczx" model="hr.department">
|
||||
<field name="name">科创中心</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦4楼东侧</field>
|
||||
<field name="is_institution">True</field>
|
||||
<field name="is_global_department">False</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_gly" model="hr.department">
|
||||
<field name="name">管理员</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦5楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_wp" model="hr.department">
|
||||
<field name="name">外派</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦6楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_lcgs" model="hr.department">
|
||||
<field name="name">粮储公司</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦7楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_syzgs" model="hr.department">
|
||||
<field name="name">商业总公司</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦8楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_ldbz" model="hr.department">
|
||||
<field name="name">领导班子</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦9楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_cwb" model="hr.department">
|
||||
<field name="name">财务部</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦10楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_bgs" model="hr.department">
|
||||
<field name="name">办公室</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦11楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_qyglb" model="hr.department">
|
||||
<field name="name">企业管理部</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦12楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_zweb" model="hr.department">
|
||||
<field name="name">租务二部(原物业经营部)</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦13楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_zbyyb" model="hr.department">
|
||||
<field name="name">资本运营部</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦14楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_tzfzb" model="hr.department">
|
||||
<field name="name">投资发展部</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦15楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_tzfzb" model="hr.department">
|
||||
<field name="name">党群人力资源部</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦16楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_tzfzb" model="hr.department">
|
||||
<field name="name">风控审计部</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦17楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_thtz"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_tzfzb" model="hr.department">
|
||||
<field name="name">人事部</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦18楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_bgs"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_department_tzfzb" model="hr.department">
|
||||
<field name="name">厨位人员</field>
|
||||
<field name="department_location">广州市天河区龙口西路90号天成大厦19楼东侧</field>
|
||||
<field name="is_institution">False</field>
|
||||
<field name="is_global_department">False</field>
|
||||
<field name="parent_id" ref="hr_department_bgs"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,396 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="user_role_ptyg" model="yuthon.user.role">
|
||||
<field name="name">普通员工</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_cwfmsz" model="yuthon.user.role">
|
||||
<field name="name">常务副秘书长</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">association</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_zjl" model="yuthon.user.role">
|
||||
<field name="name">总经理</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_lsz" model="yuthon.user.role">
|
||||
<field name="name">理事长</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_cwfsj" model="yuthon.user.role">
|
||||
<field name="name">常务副会长</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_fzjl" model="yuthon.user.role">
|
||||
<field name="name">副总经理</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_jshzx" model="yuthon.user.role">
|
||||
<field name="name">监事会主席</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_mscbgszr" model="yuthon.user.role">
|
||||
<field name="name">秘书处办公室主任</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_fgld" model="yuthon.user.role">
|
||||
<field name="name">分管领导</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_bmfjl" model="yuthon.user.role">
|
||||
<field name="name">部门副经理</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_mscbgsfzr" model="yuthon.user.role">
|
||||
<field name="name">秘书处办公室副主任</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_bmjl" model="yuthon.user.role">
|
||||
<field name="name">部门经理</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_gqybzfw" model="yuthon.user.role">
|
||||
<field name="name">各企业班子(发文)</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_syqyg" model="yuthon.user.role">
|
||||
<field name="name">试用期员工</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_wybfzjl" model="yuthon.user.role">
|
||||
<field name="name">物业部副总经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">rent2</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_lshcy" model="yuthon.user.role">
|
||||
<field name="name">理事会成员</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_aqbcy" model="yuthon.user.role">
|
||||
<field name="name">安全办成员</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_sx" model="yuthon.user.role">
|
||||
<field name="name">实习</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_fyz" model="yuthon.user.role">
|
||||
<field name="name">副院长</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_yz" model="yuthon.user.role">
|
||||
<field name="name">院长</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_dy" model="yuthon.user.role">
|
||||
<field name="name">党员</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_kczx" model="yuthon.user.role">
|
||||
<field name="name">科创中心</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_xkqry" model="yuthon.user.role">
|
||||
<field name="name">需考勤人员</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_cwwy" model="yuthon.user.role">
|
||||
<field name="name">财务(物业)</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_jtawh" model="yuthon.user.role">
|
||||
<field name="name">集团安委会</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_ttcjaqb" model="yuthon.user.role">
|
||||
<field name="name">天投城建安全办</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_jtaqb" model="yuthon.user.role">
|
||||
<field name="name">集团安全办</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_ttcjawh" model="yuthon.user.role">
|
||||
<field name="name">天投城建安委会</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_ttcjawh" model="yuthon.user.role">
|
||||
<field name="name">天投城建安委会</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_gsld" model="yuthon.user.role">
|
||||
<field name="name">公司领导</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_ldbz" model="yuthon.user.role">
|
||||
<field name="name">领导班子</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_dsz" model="yuthon.user.role">
|
||||
<field name="name">董事长</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_zxds" model="yuthon.user.role">
|
||||
<field name="name">执行董事</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">storage_company</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_msz" model="yuthon.user.role">
|
||||
<field name="name">秘书长</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">association</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_fzr" model="yuthon.user.role">
|
||||
<field name="name">副主任</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_ghwy" model="yuthon.user.role">
|
||||
<field name="name">工会委员</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_fksjjl" model="yuthon.user.role">
|
||||
<field name="name">风控审计经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">risk_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_fkglg" model="yuthon.user.role">
|
||||
<field name="name">风控管理岗</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">risk_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_fkgly" model="yuthon.user.role">
|
||||
<field name="name">系统管理员</field>
|
||||
<field name="user_type">oa_admin</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_aqbfzl" model="yuthon.user.role">
|
||||
<field name="name">安全办副主任</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_trzbjl" model="yuthon.user.role">
|
||||
<field name="name">投融资部经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">capital_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_trzbfzjl" model="yuthon.user.role">
|
||||
<field name="name">投融资部副总经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">capital_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_trzbfjl" model="yuthon.user.role">
|
||||
<field name="name">投融资部副经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">capital_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_trzfzb" model="yuthon.user.role">
|
||||
<field name="name">投融资发展部</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">capital_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_xmkfb" model="yuthon.user.role">
|
||||
<field name="name">项目开发部</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">investment_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_xmbjl" model="yuthon.user.role">
|
||||
<field name="name">项目部经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">investment_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_rszy" model="yuthon.user.role">
|
||||
<field name="name">人事专员</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">party_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_djzy" model="yuthon.user.role">
|
||||
<field name="name">党建专员</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">party_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_rsgly" model="yuthon.user.role">
|
||||
<field name="name">人事管理员</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">party_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_rszg" model="yuthon.user.role">
|
||||
<field name="name">人事主管</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">party_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_wyb" model="yuthon.user.role">
|
||||
<field name="name">物业部</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">rent2</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_wybjl" model="yuthon.user.role">
|
||||
<field name="name">物业部经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">rent2</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_wybfjl" model="yuthon.user.role">
|
||||
<field name="name">物业部副经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">rent2</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_gczg" model="yuthon.user.role">
|
||||
<field name="name">工程主管</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">rent2</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_qyglb" model="yuthon.user.role">
|
||||
<field name="name">企业管理部</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">enterprise_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_qyglbjl" model="yuthon.user.role">
|
||||
<field name="name">企业管理部经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">enterprise_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_cwb" model="yuthon.user.role">
|
||||
<field name="name">财务部</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">accounting_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_cwbjl" model="yuthon.user.role">
|
||||
<field name="name">财务部经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">accounting_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_cwbfjl" model="yuthon.user.role">
|
||||
<field name="name">财务部副经理</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">accounting_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_hj" model="yuthon.user.role">
|
||||
<field name="name">会计</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">accounting_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_cn" model="yuthon.user.role">
|
||||
<field name="name">出纳</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">accounting_department</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_bgs" model="yuthon.user.role">
|
||||
<field name="name">办公室</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">office</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_zr" model="yuthon.user.role">
|
||||
<field name="name">主任</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">office</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_bgsfzr" model="yuthon.user.role">
|
||||
<field name="name">办公室副主任</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">office</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_gwgly" model="yuthon.user.role">
|
||||
<field name="name">公文管理员</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">office</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_cwry" model="yuthon.user.role">
|
||||
<field name="name">厨卫人员</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">office</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_bgkg" model="yuthon.user.role">
|
||||
<field name="name">办公库管</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">office</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_zqyry" model="yuthon.user.role">
|
||||
<field name="name">子企业人员</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">office</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_xxfby" model="yuthon.user.role">
|
||||
<field name="name">信息发布员</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">office</field>
|
||||
</record>
|
||||
|
||||
<record id="user_role_jtaqy" model="yuthon.user.role">
|
||||
<field name="name">交通安全员</field>
|
||||
<field name="user_type">system_global_user</field>
|
||||
|
||||
</record>
|
||||
|
||||
<record id="user_role_wp" model="yuthon.user.role">
|
||||
<field name="name">外派</field>
|
||||
<field name="user_type">departmental_role</field>
|
||||
<field name="department_id">expatriate</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -4,6 +4,7 @@ from odoo import api, fields, models
|
||||
|
||||
class YuthonHrDepartment(models.Model):
|
||||
_inherit = "hr.department"
|
||||
_order = 'department_code'
|
||||
|
||||
department_phone = fields.Char(string="部门电话")
|
||||
department_fax = fields.Char(string="部门传真")
|
||||
@@ -13,3 +14,4 @@ class YuthonHrDepartment(models.Model):
|
||||
is_global_department = fields.Boolean(string="是否全局部门")
|
||||
create_time = fields.Datetime(string="创建时间", default=fields.Datetime.now)
|
||||
end_time = fields.Datetime(string="结束时间")
|
||||
department_code = fields.Char(string="部门序号")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models
|
||||
from datetime import datetime
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
nation_list = [('a', '汉族'), ('b', '壮族'), ('v', '满族'), ('d', '回族'), ('e', '苗族'), ('f', '维吾尔族'),
|
||||
('g', '土家族'), ('h', '彝族'), ('i', '蒙古族'), ('j', '藏族'), ('k', '布依族'), ('l', '侗族'),
|
||||
@@ -19,13 +20,15 @@ class YuthonHrEmployee(models.Model):
|
||||
对原模型数据的隐藏,字段的开发和添加
|
||||
"""
|
||||
_inherit = "hr.employee"
|
||||
_order = 'number'
|
||||
|
||||
# odoo里是这样做的,一个用户可以多个公司绑定多个员工,每个员工都有自己的部门和岗位
|
||||
|
||||
number = fields.Char(string="编号")
|
||||
number = fields.Char(string="序号", store=True)
|
||||
user_number = fields.Char(string="员工编号", default=lambda self: self.env['ir.sequence'].next_by_code('employee_code'))
|
||||
use_user_type = fields.Selection([('formal', '正式职工'), ('labor', '劳务协议'),
|
||||
('part_time', '兼职协议'), ('employment', '兼职用工')], string="用工形式")
|
||||
user_number = fields.Char(string="员工编号")
|
||||
|
||||
job_lv_id = fields.Many2one('yuthon.job.lv', string="最新职级")
|
||||
# 个人信息
|
||||
user_salary = fields.Float(string="基本工资")
|
||||
@@ -34,7 +37,8 @@ class YuthonHrEmployee(models.Model):
|
||||
confirmation_date = fields.Date(string="转正时间")
|
||||
company_old = fields.Char(string="司龄", compute='_compute_company_old')
|
||||
user_sex = fields.Selection([('girl', '女'), ('boy', '男')], string="性别")
|
||||
user_state = fields.Selection([('in', '在职'), ('leave', '离职'), ('withdraw', '退休')], string="员工状态")
|
||||
user_state = fields.Selection([('in', '在职'), ('leave', '离职'), ('withdraw', '退休')],
|
||||
string="员工状态", compute='_compute_user_state')
|
||||
user_number_start_time = fields.Date(string="身份中有效开始时间")
|
||||
user_number_end_time = fields.Date(string="身份证有效到期时间")
|
||||
nation = fields.Selection(nation_list, string="民族")
|
||||
@@ -43,7 +47,8 @@ class YuthonHrEmployee(models.Model):
|
||||
user_type = fields.Char(string="人员类别")
|
||||
retire_date = fields.Date(string="退休日期")
|
||||
retire_years = fields.Integer(string="离退休年限", compute='_compute_retire_years')
|
||||
political_aspects = fields.Selection([('cpc_dang', '中共党员'), ('nld', '民盟'), ('league_member', '共青团员'), ('people', '群众')], string="政治面貌")
|
||||
political_aspects = fields.Selection([('cpc_dang', '中共党员'), ('nld', '民盟'),
|
||||
('league_member', '共青团员'), ('people', '群众')], string="政治面貌")
|
||||
dang_data = fields.Date(string="入团(党)时间")
|
||||
user_origin = fields.Char(string="籍贯")
|
||||
user_location = fields.Char(string="户口所在地")
|
||||
@@ -101,6 +106,11 @@ class YuthonHrEmployee(models.Model):
|
||||
# 技能证书管理
|
||||
skills_certificates_ids = fields.One2many('yuthon.skills.certificates.line', 'employee_id', string="教育经历明细行")
|
||||
|
||||
@api.onchange('number')
|
||||
def onchange_number(self):
|
||||
if self.department_id.department_code:
|
||||
self.number = self.department_id.department_code + self.number
|
||||
|
||||
def action_hr_employee(self):
|
||||
return {
|
||||
"type": "ir.actions.act_window",
|
||||
@@ -159,3 +169,21 @@ class YuthonHrEmployee(models.Model):
|
||||
record.retire_years = 0
|
||||
else:
|
||||
record.retire_years = 0
|
||||
|
||||
@api.depends('new_start_contract_data', 'new_end_contract_data')
|
||||
def _compute_user_state(self):
|
||||
for record in self:
|
||||
today = datetime.now().date()
|
||||
start_time = record.new_start_contract_data
|
||||
end_time = record.new_end_contract_data
|
||||
if start_time and end_time:
|
||||
if start_time >= end_time:
|
||||
raise ValidationError('合同开始日期不能大于合同结束日期')
|
||||
if start_time <= today <= end_time:
|
||||
record.user_state = 'in'
|
||||
else:
|
||||
record.user_state = 'leave'
|
||||
else:
|
||||
record.user_state = ''
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="department_phone"/>
|
||||
<field name="department_code"/>
|
||||
<field name="department_fax" column_invisible="1"/>
|
||||
<field name="department_location"/>
|
||||
<field name="department_function" column_invisible="1"/>
|
||||
|
||||
@@ -200,8 +200,37 @@
|
||||
<xpath expr="//field[@name='activity_date_deadline']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='parent_id']" position="attributes">
|
||||
<attribute name="string">上级领导</attribute>
|
||||
<xpath expr="//field[@name='job_id']" position="after">
|
||||
<field name="number" optional="hide"/>
|
||||
<field name="use_user_type" optional="hide"/>
|
||||
<field name="user_number" optional="hide"/>
|
||||
<field name="job_lv_id" optional="hide"/>
|
||||
<field name="entry_date" optional="hide"/>
|
||||
<field name="confirmation_date" optional="hide"/>
|
||||
<field name="company_old" optional="hide"/>
|
||||
<field name="user_number_start_time" optional="hide"/>
|
||||
<field name="nation" optional="hide"/>
|
||||
<field name="user_sex" optional="hide"/>
|
||||
<field name="old" optional="hide"/>
|
||||
<field name="birthday_month" optional="hide"/>
|
||||
<field name="user_type" optional="hide"/>
|
||||
<field name="retire_years" optional="hide"/>
|
||||
<field name="political_aspects" optional="hide"/>
|
||||
<field name="dang_data" optional="hide"/>
|
||||
<field name="new_start_contract_data" optional="hide"/>
|
||||
<field name="open_start_time" optional="hide"/>
|
||||
<field name="open_start_time_today" optional="hide"/>
|
||||
<field name="interrupt_work_month" optional="hide"/>
|
||||
<field name="cumulative_work_month" optional="hide"/>
|
||||
<field name="cumulative_work_years" optional="hide"/>
|
||||
<field name="high_degree" optional="hide"/>
|
||||
<field name="high_degree2" optional="hide"/>
|
||||
<field name="profession" optional="hide"/>
|
||||
<field name="graduate_date" optional="hide"/>
|
||||
<field name="graduate_school" optional="hide"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="number"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
+112
-29
@@ -1,50 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="yuthon_party_action" model="ir.actions.act_window">
|
||||
<field name="name">党群</field>
|
||||
<field name="res_model">yuthon.party</field><!-- 指定模型 -->
|
||||
<field name="view_mode">tree,form</field><!-- 指定视图 -->
|
||||
<field name="name">党建</field>
|
||||
<field name="res_model">yuthon.party</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<!-- 一级标题 -->
|
||||
<menuitem id="yuthon_party_menu"
|
||||
sequence="1"
|
||||
web_icon="yuthon_party,static/description/icon.png"
|
||||
name="党群"/>
|
||||
<!-- 二级标题 -->
|
||||
<menuitem id="yuthon_party_learn_menu"
|
||||
name="党建"/>
|
||||
<menuitem id="yuthon_party_meeting_menu_three"
|
||||
sequence="1"
|
||||
name="学习教育"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
|
||||
<menuitem id="yuthon_party_meeting_menu"
|
||||
sequence="5"
|
||||
name="三会一课"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
|
||||
<menuitem id="yuthon_party_meeting_menu_birthday"
|
||||
sequence="3"
|
||||
name="主题党日"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_meeting_menu_life"
|
||||
sequence="5"
|
||||
name="组织生活"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_meeting_menu_democracy"
|
||||
sequence="7"
|
||||
name="民主评选议员"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu"
|
||||
sequence="9"
|
||||
name="学习教育"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu_training"
|
||||
sequence="1"
|
||||
name="培训"
|
||||
parent="yuthon_party_learn_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu_examination"
|
||||
sequence="3"
|
||||
name="考试"
|
||||
parent="yuthon_party_learn_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu_archives"
|
||||
sequence="11"
|
||||
name="党员档案"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu_fee"
|
||||
sequence="13"
|
||||
name="党费管理"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu_receivable"
|
||||
sequence="1"
|
||||
name="应收"
|
||||
parent="yuthon_party_learn_menu_fee"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu_received"
|
||||
sequence="3"
|
||||
name="已收"
|
||||
parent="yuthon_party_learn_menu_fee"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu_collection"
|
||||
sequence="5"
|
||||
name="欠收"
|
||||
parent="yuthon_party_learn_menu_fee"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_learn_menu_bard"
|
||||
sequence="13"
|
||||
name="党费台账"
|
||||
parent="yuthon_party_learn_menu_fee"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu"
|
||||
sequence="10"
|
||||
name="党组织强管理"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
|
||||
<menuitem id="yuthon_party_tuition_menu"
|
||||
sequence="15"
|
||||
name="学费管理"
|
||||
name="党组织管理"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
|
||||
<menuitem id="yuthon_party_flower_menu"
|
||||
sequence="20"
|
||||
name="花名册"
|
||||
parent="yuthon_party_menu"
|
||||
<menuitem id="yuthon_party_administration_menu_organization"
|
||||
sequence="1"
|
||||
name="党组织信息"
|
||||
parent="yuthon_party_administration_menu"
|
||||
action="yuthon_party_action"/>
|
||||
|
||||
<menuitem id="yuthon_party_assessment_menu"
|
||||
sequence="25"
|
||||
<menuitem id="yuthon_party_administration_menu_class"
|
||||
sequence="3"
|
||||
name="班子成员"
|
||||
parent="yuthon_party_administration_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu_login"
|
||||
sequence="5"
|
||||
name="党员等登记"
|
||||
parent="yuthon_party_administration_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu_develop"
|
||||
sequence="7"
|
||||
name="发展党员"
|
||||
parent="yuthon_party_administration_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu_cultivate"
|
||||
sequence="9"
|
||||
name="培养考察列表"
|
||||
parent="yuthon_party_administration_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu_application"
|
||||
sequence="11"
|
||||
name="入党申请列表"
|
||||
parent="yuthon_party_administration_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu_test"
|
||||
sequence="17"
|
||||
name="考核"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu_task"
|
||||
sequence="1"
|
||||
name="目标任务"
|
||||
parent="yuthon_party_administration_menu_test"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu_seeting"
|
||||
sequence="19"
|
||||
name="配置"
|
||||
parent="yuthon_party_menu"
|
||||
action="yuthon_party_action"/>
|
||||
<menuitem id="yuthon_party_administration_menu_job"
|
||||
sequence="1"
|
||||
name="党内职务"
|
||||
parent="yuthon_party_administration_menu_seeting"
|
||||
action="yuthon_party_action"/>
|
||||
|
||||
</odoo>
|
||||
@@ -47,17 +47,17 @@
|
||||
action="yuthon_index_management_action"/>
|
||||
|
||||
<!-- 计划管理-->
|
||||
<!-- <menuitem-->
|
||||
<!-- id="yuthon_plan_management_menu"-->
|
||||
<!-- parent="yuthon_performance_menu_config_root"-->
|
||||
<!-- name="计划管理"-->
|
||||
<!-- sequence="30"/>-->
|
||||
<!-- <menuitem-->
|
||||
<!-- id="yuthon_plan_management"-->
|
||||
<!-- parent="yuthon_plan_management_menu"-->
|
||||
<!-- name="个人计划"-->
|
||||
<!-- sequence="10"-->
|
||||
<!-- action="yuthon_plan_management_action"/>-->
|
||||
<menuitem
|
||||
id="yuthon_plan_management_menu"
|
||||
parent="yuthon_performance_menu_config_root"
|
||||
name="计划管理"
|
||||
sequence="30"/>
|
||||
<menuitem
|
||||
id="yuthon_plan_management"
|
||||
parent="yuthon_plan_management_menu"
|
||||
name="个人计划"
|
||||
sequence="10"
|
||||
action="yuthon_plan_management_action"/>
|
||||
|
||||
|
||||
<!-- 绩效变更管理-->
|
||||
|
||||
@@ -1,11 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "yuthon property",
|
||||
'summary': "物业管理",
|
||||
'description': """""",
|
||||
'author': 'zhou',
|
||||
'website': 'https://www.pengyuthon.com',
|
||||
'version': '0.1',
|
||||
'license': 'LGPL-3',
|
||||
'data': [
|
||||
'security/ir.model.access.csv', # 模块的访问控制文件。这些文件通常包括 CSV 文件,用于定义模型、字段、组等的访问权限。
|
||||
'views/menuitem.xml',], # 模块的数据文件列表。这些文件通常包括 XML 文件,用于定义模型、视图、菜单、动作等。
|
||||
'demo': [], # 模块的演示数据文件列表。这些文件通常包括 XML 文件,用于定义演示数据。
|
||||
'depends': [], # 模块所依赖的其他模块列表。这些模块必须先安装才能安装此模块。
|
||||
'data/sale_renting_code_data.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/yuthon_property_views.xml',
|
||||
'views/property_assess_views.xml',
|
||||
'views/property_confirm_views.xml',
|
||||
'views/property_move_views.xml',
|
||||
'views/property_open_rent_views.xml',
|
||||
'views/property_record_views.xml',
|
||||
'views/property_type_views.xml',
|
||||
'views/menuitem.xml',
|
||||
],
|
||||
'demo': [],
|
||||
'depends': ['mail', 'soong_workflow'],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
from . import yuthon_property
|
||||
from . import yuthon_property
|
||||
from . import property_assess
|
||||
from . import property_confirm
|
||||
from . import property_move
|
||||
from . import property_open_rent
|
||||
from . import property_record
|
||||
from . import property_type
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
from datetime import datetime
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
class PropertyType(models.Model):
|
||||
_name = 'property.type'
|
||||
_description = '物业状态'
|
||||
_rec_name = 'name'
|
||||
|
||||
name = fields.Char(string='名称')
|
||||
create_time = fields.Datetime(string="创建日期", default=lambda self: fields.Datetime.now())
|
||||
start_time = fields.Datetime(string="生效日期")
|
||||
end_time = fields.Datetime(string="终止日期")
|
||||
is_enable = fields.Boolean(string="是否启用", compute='_compute_is_enable')
|
||||
|
||||
@api.depends('start_time', 'end_time')
|
||||
def _compute_is_enable(self):
|
||||
for rec in self:
|
||||
if rec.start_time >= rec.end_time:
|
||||
raise ValidationError('合同开始日期不能大于合同结束日期')
|
||||
if rec.start_time and rec.end_time:
|
||||
if rec.start_time < datetime.now() < rec.end_time:
|
||||
rec.is_enable = True
|
||||
else:
|
||||
rec.is_enable = False
|
||||
else:
|
||||
rec.is_enable = False
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,5 +4,27 @@ from odoo import models, fields, api
|
||||
class YuthonProperty(models.Model):
|
||||
_name = 'yuthon.property'
|
||||
_description = '物业管理'
|
||||
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
_rec_name = 'name'
|
||||
|
||||
name = fields.Char(string='名称')
|
||||
name = fields.Char(string="名称")
|
||||
property_precinct = fields.Char(string="楼盘片区")
|
||||
property_floor = fields.Integer(string="楼层")
|
||||
property_room = fields.Char(string="区")
|
||||
property_house = fields.Char(string="户型")
|
||||
property_orientation = fields.Char(string="朝向")
|
||||
property_use_id = fields.Integer(string="物业用途ID")
|
||||
property_asset_type = fields.Selection([('plant', '厂房'), ('goods', '商品'),
|
||||
('office', '写字楼'), ('dormitory', '宿舍'),
|
||||
('rig', '设备等管理用房')], string='资产类型')
|
||||
property_asset_use = fields.Selection([('hire', '出租'), ('personal', '自用')], string='资产用途')
|
||||
property_use_type = fields.Selection([('work', '办公'), ('dorm', '宿舍'), ('cater', '餐饮')], string='使用类型')
|
||||
property_use_time = fields.Datetime(string="使用年限")
|
||||
property_rent_type = fields.Selection([('could', '可租'), ('no', '不可租'),
|
||||
('done', '已租'), ('none', '空置')], string="出租状态")
|
||||
state_id = fields.Many2one('property.type', string='状态')
|
||||
property_source = fields.Selection([('cut', '划入'), ('self', '自建'),
|
||||
('replace', '置换'), ('buy', '购入'),
|
||||
('entrust', '委托'), ('Rent', '租入')], string='来源')
|
||||
image_1920 = fields.Image(string="图片")
|
||||
description = fields.Html(string="描述")
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_yuthon_property,yuthon_property,model_yuthon_property,base.group_user,1,1,1,1
|
||||
access_property_assess,property_assess,model_property_assess,base.group_user,1,1,1,1
|
||||
access_property_confirm,property_confirm,model_property_confirm,base.group_user,1,1,1,1
|
||||
access_property_move,property_move,model_property_move,base.group_user,1,1,1,1
|
||||
access_property_open_rent,property_open_rent,model_property_open_rent,base.group_user,1,1,1,1
|
||||
access_property_record,property_record,model_property_record,base.group_user,1,1,1,1
|
||||
access_property_type,property_type,model_property_type,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="yuthon_property_action" model="ir.actions.act_window">
|
||||
<record id="property_assess_action" model="ir.actions.act_window">
|
||||
<field name="name">物业管理</field>
|
||||
<field name="res_model">yuthon.property</field><!-- 指定模型 -->
|
||||
<field name="view_mode">tree,form</field><!-- 指定视图 -->
|
||||
<field name="res_model">yuthon.property</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- 一级标题 -->
|
||||
@@ -11,70 +11,83 @@
|
||||
sequence="4"
|
||||
web_icon="yuthon_property,static/description/icon.png"
|
||||
name="物业管理"/>
|
||||
<!-- 二级标题 -->
|
||||
|
||||
<menuitem id="yuthon_property_menu"
|
||||
sequence="6"
|
||||
name="物业"
|
||||
parent="yuthon_property_menu_root"/>
|
||||
<!--三级标题 -->
|
||||
<menuitem id="yuthon_property_list_menu"
|
||||
sequence="6"
|
||||
name="列表"
|
||||
parent="yuthon_property_menu"/>
|
||||
<!--四级标题-->
|
||||
<menuitem id="yuthon_property_list_rentable_menu"
|
||||
sequence="1"
|
||||
name="可租"
|
||||
parent="yuthon_property_list_menu"
|
||||
action="yuthon_property_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_list_rented_menu"
|
||||
sequence="3"
|
||||
name="已租"
|
||||
parent="yuthon_property_list_menu"
|
||||
action="yuthon_property_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_list_empty_menu"
|
||||
sequence="5"
|
||||
name="空置"
|
||||
parent="yuthon_property_list_menu"
|
||||
action="yuthon_property_action"/>
|
||||
<!-- 三级标题-->
|
||||
<menuitem id="yuthon_property_information_menu"
|
||||
sequence="1"
|
||||
<menuitem id="yuthon_property_menu_data"
|
||||
sequence="7"
|
||||
name="物业信息"
|
||||
parent="yuthon_property_menu"
|
||||
action="yuthon_property_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_estate_menu"
|
||||
sequence="5"
|
||||
sequence="9"
|
||||
name="不动产证"
|
||||
parent="yuthon_property_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_science_menu"
|
||||
sequence="10"
|
||||
name="材料"
|
||||
parent="yuthon_property_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_merge_menu"
|
||||
sequence="15"
|
||||
name="拆分合并"
|
||||
parent="yuthon_property_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem
|
||||
id="property_approval_menu"
|
||||
parent="yuthon_property_menu_root"
|
||||
name="审批管理"
|
||||
sequence="2"/>
|
||||
|
||||
<menuitem
|
||||
id="property_move_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="调拨审批"
|
||||
action="property_move_action"
|
||||
sequence="1"/>
|
||||
<menuitem
|
||||
id="property_assess_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="评估审批"
|
||||
action="property_assess_action"
|
||||
sequence="2"/>
|
||||
<menuitem
|
||||
id="property_record_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="备案审批"
|
||||
action="property_record_action"
|
||||
sequence="3"/>
|
||||
<menuitem
|
||||
id="property_open_rent_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="公开招租审批"
|
||||
action="property_open_rent_action"
|
||||
sequence="4"/>
|
||||
<menuitem
|
||||
id="property_confirm_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="成交确认审批"
|
||||
action="property_confirm_action"
|
||||
sequence="5"/>
|
||||
<!-- 二级标题 -->
|
||||
<menuitem id="yuthon_property_evaluated_menu"
|
||||
sequence="9"
|
||||
name="评估"
|
||||
parent="yuthon_property_menu_root" />
|
||||
parent="yuthon_property_menu_root"/>
|
||||
<!-- 三级标题 -->
|
||||
<menuitem id="yuthon_property_tobe_menu"
|
||||
sequence="1"
|
||||
name="待评估"
|
||||
parent="yuthon_property_evaluated_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<!-- 二级标题 -->
|
||||
<menuitem id="yuthon_property_contract_menu"
|
||||
@@ -86,13 +99,13 @@
|
||||
sequence="1"
|
||||
name="评估合同"
|
||||
parent="yuthon_property_contract_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_contract_lease_menu"
|
||||
sequence="5"
|
||||
name="租凭合同"
|
||||
parent="yuthon_property_contract_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_contract_build_menu"
|
||||
sequence="10"
|
||||
@@ -103,49 +116,49 @@
|
||||
sequence="1"
|
||||
name="设计"
|
||||
parent="yuthon_property_contract_build_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_contract_cost_menu"
|
||||
sequence="5"
|
||||
name="造价"
|
||||
parent="yuthon_property_contract_build_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_contract_supervisor_menu"
|
||||
sequence="10"
|
||||
name="监理"
|
||||
parent="yuthon_property_contract_build_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_contract_construction_menu"
|
||||
sequence="15"
|
||||
name="施工"
|
||||
parent="yuthon_property_contract_build_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_contract_supplement_menu"
|
||||
sequence="20"
|
||||
name="补充"
|
||||
parent="yuthon_property_contract_build_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
<!--三级标题-->
|
||||
<menuitem id="yuthon_property_contract_upkeep_menu"
|
||||
sequence="1"
|
||||
name="维保合同"
|
||||
parent="yuthon_property_contract_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_contract_review_menu"
|
||||
sequence="5"
|
||||
name="年审合同"
|
||||
parent="yuthon_property_contract_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_contract_purchase_menu"
|
||||
sequence="10"
|
||||
name="采购合同"
|
||||
parent="yuthon_property_contract_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
<!-- 二级标题 -->
|
||||
<menuitem id="yuthon_property_inspection_menu"
|
||||
sequence="15"
|
||||
@@ -156,25 +169,25 @@
|
||||
sequence="1"
|
||||
name="计划"
|
||||
parent="yuthon_property_inspection_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_inspection_ledger_menu"
|
||||
sequence="5"
|
||||
name="巡检台账"
|
||||
parent="yuthon_property_inspection_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_inspection_rec_menu"
|
||||
sequence="15"
|
||||
name="整改"
|
||||
parent="yuthon_property_inspection_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_inspection_configure_menu"
|
||||
sequence="20"
|
||||
name="配置"
|
||||
parent="yuthon_property_inspection_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
<!-- 二级标题 -->
|
||||
<menuitem id="yuthon_property_cost_menu"
|
||||
sequence="17"
|
||||
@@ -185,37 +198,37 @@
|
||||
sequence="1"
|
||||
name="租金"
|
||||
parent="yuthon_property_cost_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_cost_deposit_menu"
|
||||
sequence="5"
|
||||
name="押金"
|
||||
parent="yuthon_property_cost_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_cost_hyd_menu"
|
||||
sequence="10"
|
||||
name="水电费"
|
||||
parent="yuthon_property_cost_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_cost_default_menu"
|
||||
sequence="15"
|
||||
name="违约金"
|
||||
parent="yuthon_property_cost_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_cost_main_menu"
|
||||
sequence="20"
|
||||
name="维修费"
|
||||
parent="yuthon_property_cost_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_cost_other_menu"
|
||||
sequence="25"
|
||||
name="其他"
|
||||
parent="yuthon_property_cost_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
<!-- 二级标题 -->
|
||||
<menuitem id="yuthon_property_form_menu"
|
||||
sequence="19"
|
||||
@@ -226,11 +239,22 @@
|
||||
sequence="1"
|
||||
name="经营报表"
|
||||
parent="yuthon_property_form_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_form_ledger_menu"
|
||||
sequence="5"
|
||||
name="台账"
|
||||
parent="yuthon_property_form_menu"
|
||||
action="yuthon_property_action"/>
|
||||
action="property_assess_action"/>
|
||||
|
||||
<menuitem id="yuthon_property_setting_menu"
|
||||
sequence="99"
|
||||
name="配置"
|
||||
parent="yuthon_property_menu_root"/>
|
||||
|
||||
<menuitem id="yuthon_property_type_setting_menu"
|
||||
sequence="1"
|
||||
name="物业状态配置"
|
||||
parent="yuthon_property_setting_menu"
|
||||
action="property_type_action"/>
|
||||
</odoo>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_property_type_tree" model="ir.ui.view">
|
||||
<field name="name">property.type.tree</field>
|
||||
<field name="model">property.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="物业状态" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="create_time"/>
|
||||
<field name="start_time" required="1"/>
|
||||
<field name="end_time" required="1"/>
|
||||
<field name="is_enable"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="property_type_action" model="ir.actions.act_window">
|
||||
<field name="name">物业调拨审批</field>
|
||||
<field name="res_model">property.type</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="yuthon_property_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.property.tree</field>
|
||||
<field name="model">yuthon.property</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="物业管理">
|
||||
<field name="name"/>
|
||||
<field name="property_precinct"/>
|
||||
<field name="property_floor"/>
|
||||
<field name="property_room"/>
|
||||
<field name="property_house"/>
|
||||
<field name="property_orientation"/>
|
||||
<field name="property_use_id"/>
|
||||
<field name="property_asset_type"/>
|
||||
<field name="property_use_type"/>
|
||||
<field name="property_use_time"/>
|
||||
<field name="property_source"/>
|
||||
<field name="property_rent_type"/>
|
||||
<field name="state_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="yuthon_property_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.property.form</field>
|
||||
<field name="model">yuthon.property</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="产品管理">
|
||||
<sheet>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="名称"/>
|
||||
<h1>
|
||||
<field name="name" required="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="property_precinct"/>
|
||||
<field name="property_floor"/>
|
||||
<field name="property_room"/>
|
||||
<field name="property_house"/>
|
||||
<field name="property_orientation"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="property_use_id"/>
|
||||
<field name="property_asset_type"/>
|
||||
<field name="property_use_type"/>
|
||||
<field name="property_use_time"/>
|
||||
<field name="property_rent_type"/>
|
||||
<field name="state_id"/>
|
||||
<field name="property_source"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="描述">
|
||||
<field name="description" widget="tinymce"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="o_attachment_preview"/>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" groups="base.group_user"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="yuthon_property_search" model="ir.ui.view">
|
||||
<field name="name">yuthon.property.search</field>
|
||||
<field name="model">yuthon.property</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<filter string="可租" name="could" domain="[('property_rent_type', '=', 'could')]"/>
|
||||
<filter string="不可租" name="could" domain="[('property_rent_type', '=', 'no')]"/>
|
||||
<filter string="已租" name="done" domain="[('property_rent_type', '=', 'done')]"/>
|
||||
<filter string="空置" name="none" domain="[('property_rent_type', '=', 'none')]"/>
|
||||
<separator/>
|
||||
<filter string="可租" name="could" domain="[('state_id', '=', 'could')]"/>
|
||||
<group expand="0">
|
||||
<filter name="group_statu" string="物业状态" context="{'group_by': 'state_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<!-- 后期根据客户需求完善 -->
|
||||
<record id="yuthon_property_kanban" model="ir.ui.view">
|
||||
<field name="name">yuthon.property.kanban</field>
|
||||
<field name="model">yuthon.property</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban>
|
||||
<field name="id"/>
|
||||
<!-- <field name="lst_price"/>-->
|
||||
<!-- <field name="activity_state"/>-->
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_card oe_kanban_global_click">
|
||||
<div class="o_kanban_image me-1">
|
||||
<img t-att-src="kanban_image('product.product', 'image_128', record.id.raw_value)"
|
||||
alt="Product" class="o_image_64_contain"/>
|
||||
</div>
|
||||
<div class="oe_kanban_details">
|
||||
<div class="o_kanban_record_top mb-0">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title">
|
||||
<field name="name"/>
|
||||
</strong>
|
||||
</div>
|
||||
<!-- <field name="priority" widget="priority"/>-->
|
||||
</div>
|
||||
<!-- <t t-if="record.default_code.value">[<field name="default_code"/>]-->
|
||||
<!-- </t>-->
|
||||
|
||||
<!-- <div class="o_kanban_tags_section">-->
|
||||
<!-- <field name="product_template_variant_value_ids"-->
|
||||
<!-- groups="product.group_product_variant" widget="many2many_tags"-->
|
||||
<!-- options="{'color_field': 'color'}"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div name="product_lst_price" class="mt-1">-->
|
||||
<!-- Price:-->
|
||||
<!-- <field name="lst_price"></field>-->
|
||||
<!-- </div>-->
|
||||
<div name="tags"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
<record id="yuthon_property_action" model="ir.actions.act_window">
|
||||
<field name="name">物业</field>
|
||||
<field name="res_model">yuthon.property</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="search_view_id" ref="yuthon_property_search"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -16,13 +16,6 @@
|
||||
'security/ir.model.access.csv',
|
||||
'views/yuthon_res_partner_views.xml',
|
||||
'views/contacts_inherit_menu_views.xml',
|
||||
'views/property_assess_views.xml',
|
||||
'views/property_confirm_views.xml',
|
||||
'views/property_move_views.xml',
|
||||
'views/property_open_rent_views.xml',
|
||||
'views/property_record_views.xml',
|
||||
'views/yuthon_product_template_views.xml',
|
||||
'views/menus.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
|
||||
@@ -2,9 +2,5 @@
|
||||
|
||||
from . import yuthon_res_partner
|
||||
from . import yuthon_product_template
|
||||
from . import property_assess
|
||||
from . import property_confirm
|
||||
from . import property_move
|
||||
from . import property_open_rent
|
||||
from . import property_record
|
||||
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
_description = '物业基本信息字段添加'
|
||||
|
||||
property_number = fields.Char(string="物业编号")
|
||||
property_name = fields.Char(string="物业简称")
|
||||
property_precinct = fields.Char(string="楼盘片区")
|
||||
property_floor = fields.Char(string="楼层")
|
||||
# 区,街道
|
||||
property_statu = fields.Char(string="物业状态")
|
||||
property_main_user = fields.Char(string="权属人")
|
||||
property_all_m = fields.Float(string="产权面积")
|
||||
# 单位
|
||||
property_rent_m = fields.Float(string="可租面积")
|
||||
# 单位
|
||||
property_certificate = fields.Char(string="产权证号")
|
||||
property_start_date = fields.Datetime(string="生效日期")
|
||||
property_end_date = fields.Datetime(string="失效日期")
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_property_assess,property_assess,model_property_assess,base.group_user,1,1,1,1
|
||||
access_property_confirm,property_confirm,model_property_confirm,base.group_user,1,1,1,1
|
||||
access_property_move,property_move,model_property_move,base.group_user,1,1,1,1
|
||||
access_property_open_rent,property_open_rent,model_property_open_rent,base.group_user,1,1,1,1
|
||||
access_property_record,property_record,model_property_record,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -16,16 +16,16 @@
|
||||
<field name="domain">[('partner_type', '=', 'employee')]</field>
|
||||
<field name="context">{'default_is_company': True}</field>
|
||||
</record>
|
||||
<record id="action_tenant" model="ir.actions.act_window">
|
||||
<field name="name">承租方</field>
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="view_mode">kanban,tree,form,activity</field>
|
||||
<field name="search_view_id" ref="base.view_res_partner_filter"/>
|
||||
<field name="domain">[('partner_type', '=', 'tenant')]</field>
|
||||
<field name="context">{'default_is_company': True}</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_res_partner.yuthon_res_partner_views_tree2')})]"/>
|
||||
</record>
|
||||
<!-- <record id="action_tenant" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">承租方</field>-->
|
||||
<!-- <field name="res_model">res.partner</field>-->
|
||||
<!-- <field name="view_mode">kanban,tree,form,activity</field>-->
|
||||
<!-- <field name="search_view_id" ref="base.view_res_partner_filter"/>-->
|
||||
<!-- <field name="domain">[('partner_type', '=', 'tenant')]</field>-->
|
||||
<!-- <field name="context">{'default_is_company': True}</field>-->
|
||||
<!-- <field name="view_ids" eval="[(5, 0, 0),-->
|
||||
<!-- (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_res_partner.yuthon_res_partner_views_tree2')})]"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<menuitem id="res_partner_menu_company"
|
||||
name="公司"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<menuitem
|
||||
id="property_approval_menu"
|
||||
parent="sale_renting.rental_menu_root"
|
||||
name="物业审批管理"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem
|
||||
id="property_move_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="物业调拨审批"
|
||||
action="property_move_action"
|
||||
sequence="1"/>
|
||||
<menuitem
|
||||
id="property_assess_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="物业评估审批"
|
||||
action="property_assess_action"
|
||||
sequence="2"/>
|
||||
<menuitem
|
||||
id="property_record_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="物业备案审批"
|
||||
action="property_record_action"
|
||||
sequence="3"/>
|
||||
<menuitem
|
||||
id="property_open_rent_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="物业公开招租审批"
|
||||
action="property_open_rent_action"
|
||||
sequence="4"/>
|
||||
<menuitem
|
||||
id="property_confirm_approval_menu"
|
||||
parent="property_approval_menu"
|
||||
name="物业成交确认审批"
|
||||
action="property_confirm_action"
|
||||
sequence="5"/>
|
||||
</odoo>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="product_template_inherit_property_form" model="ir.ui.view">
|
||||
<field name="name">product.template.inherit.property.form</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='detailed_type']" position="after">
|
||||
<field name="property_number"/>
|
||||
<field name="property_name"/>
|
||||
<field name="property_precinct"/>
|
||||
<field name="property_floor"/>
|
||||
<!-- 区,街道 -->
|
||||
<field name="property_statu"/>
|
||||
<field name="property_main_user"/>
|
||||
<field name="property_all_m"/>
|
||||
<!-- 单位 -->
|
||||
<field name="property_rent_m"/>
|
||||
<!-- 单位 -->
|
||||
<field name="property_certificate"/>
|
||||
<field name="property_start_date"/>
|
||||
<field name="property_end_date"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -33,9 +33,6 @@
|
||||
'views/right_login_template.xml',
|
||||
'views/right_login_template.xml',
|
||||
'views/inherit_board_views.xml',
|
||||
|
||||
'views/menuitem_sequence.xml',
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="spreadsheet_dashboard.spreadsheet_dashboard_menu_root" model="ir.ui.menu">
|
||||
<field name="name">工作台</field>
|
||||
<field name="sequence">0</field>
|
||||
</record>
|
||||
|
||||
<!-- Menus -->
|
||||
<record id="project.menu_main_pm" model="ir.ui.menu">
|
||||
<field name="name">项目管理</field>
|
||||
<field name="sequence">2</field>
|
||||
</record>
|
||||
|
||||
<record id="approvals.approvals_menu_root" model="ir.ui.menu">
|
||||
<field name="name">流程中心</field>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
|
||||
<record id="hr.menu_hr_root" model="ir.ui.menu">
|
||||
<field name="name">人力资源</field>
|
||||
<field name="sequence">5</field>
|
||||
</record>
|
||||
|
||||
<record id="documents.menu_root" model="ir.ui.menu">
|
||||
<field name="name">文档管理</field>
|
||||
<field name="sequence">6</field>
|
||||
</record>
|
||||
|
||||
<record id="sale_renting.rental_menu_root" model="ir.ui.menu">
|
||||
<field name="name">物业系统</field>
|
||||
<field name="sequence">7</field>
|
||||
</record>
|
||||
|
||||
<record id="room.room_menu_root" model="ir.ui.menu">
|
||||
<field name="name">会议管理</field>
|
||||
<field name="sequence">8</field>
|
||||
</record>
|
||||
|
||||
<record id="purchase.menu_purchase_root" model="ir.ui.menu">
|
||||
<field name="name">采购</field>
|
||||
<field name="sequence">9</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_attendance.menu_hr_attendance_root" model="ir.ui.menu">
|
||||
<field name="name">出勤</field>
|
||||
<field name="sequence">11</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_work_entry_contract_enterprise.menu_hr_payroll_root" model="ir.ui.menu">
|
||||
<field name="name">工资</field>
|
||||
<field name="sequence">12</field>
|
||||
</record>
|
||||
|
||||
<record id="project_todo.menu_todo_todos" model="ir.ui.menu">
|
||||
<field name="name">待办</field>
|
||||
<field name="sequence">13</field>
|
||||
</record>
|
||||
|
||||
<record id="calendar.mail_menu_calendar" model="ir.ui.menu">
|
||||
<field name="name">日历</field>
|
||||
<field name="sequence">14</field>
|
||||
</record>
|
||||
|
||||
<record id="fleet.menu_root" model="ir.ui.menu">
|
||||
<field name="name">车辆管理</field>
|
||||
<field name="sequence">15</field>
|
||||
</record>
|
||||
|
||||
<record id="website_slides.website_slides_menu_root" model="ir.ui.menu">
|
||||
<field name="name">培训学习</field>
|
||||
<field name="sequence">16</field>
|
||||
</record>
|
||||
|
||||
<record id="website.menu_website_configuration" model="ir.ui.menu">
|
||||
<field name="name">门户网站</field>
|
||||
<field name="sequence">17</field>
|
||||
</record>
|
||||
|
||||
<record id="mail.menu_root_discuss" model="ir.ui.menu">
|
||||
<field name="name">讨论</field>
|
||||
<field name="sequence">18</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="project_todo.menu_todo_todos" model="ir.ui.menu">-->
|
||||
<!-- <field name="name">代办</field>-->
|
||||
<!-- <field name="sequence">19</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="calendar.mail_menu_calendar" model="ir.ui.menu">-->
|
||||
<!-- <field name="name">日历</field>-->
|
||||
<!-- <field name="sequence">16</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
|
||||
<!-- <menuitem id="project.menu_main_pm" name="项目管理" sequence="2"/>-->
|
||||
<!-- <menuitem id="approvals.approvals_menu_root" name="流程中心" sequence="3"/>-->
|
||||
<!-- <menuitem id="hr.menu_hr_root" name="人力资源" sequence="5"/>-->
|
||||
<!-- <menuitem id="documents.menu_root" name="文档管理" sequence="6"/>-->
|
||||
<!-- <menuitem id="sale_renting.rental_menu_root" name="物业系统" sequence="7"/>-->
|
||||
|
||||
<!-- <menuitem id="room.room_menu_root" name="会议管理" sequence="8"/>-->
|
||||
<!-- <menuitem id="purchase.menu_purchase_root" name="办公用品管理" sequence="9"/>-->
|
||||
<!-- <menuitem id="account_asset.menu_action_account_asset_form" sequence="10" name="固定资产管理"/>-->
|
||||
<!-- <menuitem id="fleet.menu_root" name="车辆管理" sequence="11"/>-->
|
||||
<!-- <menuitem id="website_slides.website_slides_menu_root" name="培训学习" sequence="12"/>-->
|
||||
<!-- <menuitem id="website.menu_website_configuration" name="门户网站" sequence="13"/>-->
|
||||
|
||||
<!-- <menuitem id="sale_renting.rental_order_menu" name="承租信息"/>-->
|
||||
<!-- <menuitem id="sale_renting.menu_rental_products" name="物业资产"/>-->
|
||||
|
||||
</odoo>
|
||||
@@ -2,13 +2,9 @@
|
||||
<odoo>
|
||||
<record id="yuthon_work_action" model="ir.actions.act_window">
|
||||
<field name="name">协同办公</field>
|
||||
<field name="res_model">yuthon.work</field><!-- 指定模型 -->
|
||||
<field name="view_mode">tree,form</field><!-- 指定视图 -->
|
||||
<field name="res_model">yuthon.work</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<!-- menuitem的parent(父级) 一个模型中应该是 menu_id 跨模型应该是 model_id.menu_id -->
|
||||
<!-- sequence 规范应该是顺序之间有间隔例如 1357,149... -->
|
||||
<!-- menu规范 一级二级三级 -->
|
||||
<!-- 最后一级会有action -->
|
||||
<!-- 一级标题 -->
|
||||
<menuitem id="yuthon_work_menu"
|
||||
sequence="4"
|
||||
|
||||
@@ -3,13 +3,28 @@
|
||||
'name': 'Yuthon Work Brand',
|
||||
'version': '17.0.1.0',
|
||||
'description': """
|
||||
功能介绍
|
||||
==============
|
||||
* 工作台-仪表板
|
||||
功能介绍
|
||||
==============
|
||||
* 工作台-仪表板
|
||||
""",
|
||||
'depends': ['base', 'board', 'account_accountant'],
|
||||
'depends': ['base',
|
||||
'board',
|
||||
'yuthon_notice',
|
||||
'soong_workflow',
|
||||
'yuthon_issue',
|
||||
'room',
|
||||
'hr_recruitment',
|
||||
'hr',
|
||||
'hr_attendance',
|
||||
'yuthon_hr_attendance',
|
||||
'yuthon_performance',
|
||||
'website',
|
||||
],
|
||||
'data': [
|
||||
'views/session_board.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/yuthon_none_views.xml',
|
||||
'views/work_menus.xml',
|
||||
'views/hr_menus.xml',
|
||||
],
|
||||
'application': True,
|
||||
'installable': True,
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
from . import yuthon_none
|
||||
@@ -0,0 +1,7 @@
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class YuthonNone(models.Model):
|
||||
_name = 'yuthon.none'
|
||||
|
||||
name = fields.Char(string='名称')
|
||||
@@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_yuthon_none,yuthon_none,model_yuthon_none,base.group_user,1,1,1,1
|
||||
|
||||
|
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,314 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- 招聘 -->
|
||||
<record id="hr_recruitment.menu_hr_recruitment_root" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
<!-- 人事 -->
|
||||
<record id="hr.menu_hr_root" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
<!-- 出勤 -->
|
||||
<record id="hr_attendance.menu_hr_attendance_root" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
<!-- 绩效 -->
|
||||
<record id="yuthon_performance.yuthon_performance_menu_config_root" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
|
||||
<!-- 人力资源 -->
|
||||
<menuitem id="human_resources_menu_root_board"
|
||||
name="人力资源"
|
||||
web_icon="yuthon_work_brand,static/description/hr.png"
|
||||
sequence="3"/>
|
||||
<!-- 招聘管理 -->
|
||||
<menuitem id="hr_recruitment_menu_root_board"
|
||||
name="招聘管理"
|
||||
parent="human_resources_menu_root_board"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_recruitment_app_menu_board"
|
||||
name="应用"
|
||||
parent="hr_recruitment_menu_root_board"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_recruitment_job_menu_board"
|
||||
name="按工作岗位"
|
||||
parent="hr_recruitment_app_menu_board"
|
||||
action="hr_recruitment.action_hr_job"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_recruitment_all_menu_board"
|
||||
name="全部申请"
|
||||
parent="hr_recruitment_app_menu_board"
|
||||
action="hr_recruitment.crm_case_categ0_act_job"
|
||||
sequence="3"/>
|
||||
<menuitem id="hr_recruitment_report_menu_board"
|
||||
name="报告"
|
||||
parent="hr_recruitment_menu_root_board"
|
||||
sequence="3"/>
|
||||
<menuitem id="hr_recruitment_report_analyse_menu_board"
|
||||
name="招聘分析"
|
||||
parent="hr_recruitment_report_menu_board"
|
||||
action="hr_recruitment.hr_applicant_action_analysis"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_recruitment_setting_menu_board"
|
||||
name="配置"
|
||||
parent="hr_recruitment_menu_root_board"
|
||||
sequence="5"/>
|
||||
<menuitem id="hr_recruitment_set_menu_board"
|
||||
name="设置"
|
||||
parent="hr_recruitment_setting_menu_board"
|
||||
action="hr_recruitment.action_hr_recruitment_configuration"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_recruitment_work_job_menu_board"
|
||||
name="工作岗位"
|
||||
parent="hr_recruitment_menu_root_board"
|
||||
sequence="3"/>
|
||||
<menuitem id="hr_recruitment_stage_menu_board"
|
||||
name="阶段"
|
||||
parent="hr_recruitment_work_job_menu_board"
|
||||
action="hr_recruitment.hr_recruitment_stage_act"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_recruitment_employment_menu_board"
|
||||
name="就业类型"
|
||||
parent="hr_recruitment_work_job_menu_board"
|
||||
action="hr.hr_contract_type_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_recruitment_app2_menu_board"
|
||||
name="应用"
|
||||
parent="hr_recruitment_setting_menu_board"
|
||||
sequence="5"/>
|
||||
<menuitem id="hr_recruitment_degree_menu_board"
|
||||
name="学历"
|
||||
parent="hr_recruitment_setting_menu_board"
|
||||
action="hr_recruitment.hr_recruitment_degree_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_recruitment_reason_menu_board"
|
||||
name="拒绝原因"
|
||||
parent="hr_recruitment_setting_menu_board"
|
||||
action="hr_recruitment.hr_applicant_refuse_reason_action"
|
||||
sequence="3"/>
|
||||
<menuitem id="hr_recruitment_label_menu_board"
|
||||
name="标签"
|
||||
parent="hr_recruitment_setting_menu_board"
|
||||
action="hr_recruitment.hr_applicant_category_action"
|
||||
sequence="5"/>
|
||||
<!-- 人事 -->
|
||||
<menuitem id="hr_menu_root_board"
|
||||
name="人事管理"
|
||||
parent="human_resources_menu_root_board"
|
||||
sequence="3"/>
|
||||
<menuitem id="hr_employee_menu_root_board"
|
||||
name="员工"
|
||||
parent="hr_menu_root_board"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_employee_menu_root_board2"
|
||||
name="员工"
|
||||
parent="hr_employee_menu_root_board"
|
||||
action="hr.open_view_employee_list_my"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_employee_organization_menu_root_board"
|
||||
name="组织架构"
|
||||
parent="hr_employee_menu_root_board"
|
||||
action="hr.open_view_employee_list_my"
|
||||
sequence="3"/>
|
||||
<menuitem id="hr_contract_menu_root_board"
|
||||
name="合同"
|
||||
parent="hr_employee_menu_root_board"
|
||||
action="hr.open_view_employee_list_my"
|
||||
sequence="5"/>
|
||||
<menuitem id="hr_department_menu_root_board"
|
||||
name="部门"
|
||||
parent="hr_menu_root_board"
|
||||
action="hr.hr_department_kanban_action"
|
||||
sequence="3"/>
|
||||
<menuitem id="hr_setting_menu_root_board"
|
||||
name="配置"
|
||||
parent="hr_menu_root_board"
|
||||
sequence="5"/>
|
||||
<menuitem id="hr_set_menu_root_board"
|
||||
name="设置"
|
||||
parent="hr_setting_menu_root_board"
|
||||
action="hr.hr_config_settings_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_set_employee_menu_root_board"
|
||||
name="员工"
|
||||
parent="hr_setting_menu_root_board"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_set_location_menu_root_board"
|
||||
name="工作地点"
|
||||
parent="hr_set_employee_menu_root_board"
|
||||
action="hr.hr_work_location_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="hr_set_lv_menu_root_board"
|
||||
name="职级配置"
|
||||
parent="hr_set_employee_menu_root_board"
|
||||
action="yuthon_hr_employee.view_yuthon_job_lv_action"
|
||||
sequence="3"/>
|
||||
<menuitem id="hr_set_role_menu_root_board"
|
||||
name="角色配置"
|
||||
parent="hr_set_employee_menu_root_board"
|
||||
action="soong_workflow.view_soong_user_role_action"
|
||||
sequence="5"/>
|
||||
<!-- 出勤 -->
|
||||
<menuitem id="hr_attendance_root_board"
|
||||
name="考勤管理"
|
||||
parent="human_resources_menu_root_board"
|
||||
sequence="5"/>
|
||||
<menuitem id="hr_attendance_record_root_board"
|
||||
name="考勤记录"
|
||||
parent="hr_attendance_root_board"
|
||||
action="hr_attendance.hr_attendance_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="menu_hr_attendance_approval_request_board"
|
||||
name="考勤审批记录"
|
||||
parent="hr_attendance_root_board"
|
||||
sequence="3"/>
|
||||
<menuitem id="menu_hr_attendance_overtime_board"
|
||||
name="加班申请"
|
||||
parent="menu_hr_attendance_approval_request_board"
|
||||
sequence="1"
|
||||
action="yuthon_hr_attendance.approval_request_overtime"/>
|
||||
<menuitem id="menu_hr_attendance_going_board"
|
||||
name="外出申请"
|
||||
parent="menu_hr_attendance_approval_request_board"
|
||||
sequence="3"
|
||||
action="yuthon_hr_attendance.approval_request_going"/>
|
||||
<menuitem id="menu_hr_attendance_duty_board"
|
||||
name="值班申请"
|
||||
parent="menu_hr_attendance_approval_request_board"
|
||||
sequence="5"
|
||||
action="yuthon_hr_attendance.approval_request_duty"/>
|
||||
<menuitem id="menu_hr_attendance_leave_board"
|
||||
name="调休申请"
|
||||
parent="menu_hr_attendance_approval_request_board"
|
||||
sequence="7"
|
||||
action="yuthon_hr_attendance.approval_request_leave"/>
|
||||
<menuitem id="menu_hr_attendance_holiday_board"
|
||||
name="请假申请"
|
||||
parent="menu_hr_attendance_approval_request_board"
|
||||
sequence="9"
|
||||
action="yuthon_hr_attendance.approval_request_holiday"/>
|
||||
<menuitem id="menu_hr_attendance_remove_holiday_board"
|
||||
name="销假申请"
|
||||
parent="menu_hr_attendance_approval_request_board"
|
||||
sequence="11"
|
||||
action="yuthon_hr_attendance.approval_request_remove_holiday"/>
|
||||
<menuitem id="menu_hr_attendance_remove_card_board"
|
||||
name="补卡申请"
|
||||
parent="menu_hr_attendance_approval_request_board"
|
||||
sequence="13"
|
||||
action="yuthon_hr_attendance.approval_request_card"/>
|
||||
<menuitem id="attendance_iot_manager_views_board"
|
||||
name="考勤机设备管理"
|
||||
parent="hr_attendance_root_board"
|
||||
sequence="5"
|
||||
action="yuthon_hr_attendance.attendance_iot_manager_action"/>
|
||||
<menuitem id="menu_hr_attendance_work_board"
|
||||
name="考勤时间表配置"
|
||||
parent="hr_attendance_root_board"
|
||||
sequence="7"
|
||||
action="resource.action_resource_calendar_form"/>
|
||||
<menuitem id="tianhe_holiday_setting_menu_board"
|
||||
parent="hr_attendance_root_board"
|
||||
sequence="9"
|
||||
name="假期类型配置"
|
||||
action="yuthon_hr_attendance.holiday_setting_action"/>
|
||||
<!-- 培训管理 -->
|
||||
<menuitem id="training_manager_root_board"
|
||||
name="培训管理"
|
||||
parent="human_resources_menu_root_board"
|
||||
sequence="7"/>
|
||||
<menuitem id="employee_training_root_board"
|
||||
name="员工培训"
|
||||
parent="training_manager_root_board"
|
||||
action="yuthon_none_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="assess_root_board"
|
||||
name="考核"
|
||||
parent="training_manager_root_board"
|
||||
action="yuthon_none_action"
|
||||
sequence="3"/>
|
||||
<menuitem id="plan_root_board"
|
||||
name="计划"
|
||||
parent="training_manager_root_board"
|
||||
action="yuthon_none_action"
|
||||
sequence="5"/>
|
||||
<menuitem id="course_root_board"
|
||||
name="课程"
|
||||
parent="training_manager_root_board"
|
||||
action="yuthon_none_action"
|
||||
sequence="7"/>
|
||||
<!-- 薪资管理 -->
|
||||
<menuitem id="human_resources_salary_root_board"
|
||||
name="薪资管理"
|
||||
parent="human_resources_menu_root_board"
|
||||
action="yuthon_none_action"
|
||||
sequence="9"/>
|
||||
<!-- 绩效考核 -->
|
||||
<menuitem id="yuthon_performance_menu_config_root_board"
|
||||
name="绩效考核"
|
||||
parent="human_resources_menu_root_board"
|
||||
sequence="11"/>
|
||||
<menuitem id="yuthon_performance_duty_menu_board"
|
||||
parent="yuthon_performance_menu_config_root_board"
|
||||
name="绩效考核"
|
||||
sequence="1"/>
|
||||
<menuitem id="yuthon_organization_performance_menu_board"
|
||||
parent="yuthon_performance_duty_menu_board"
|
||||
name="组织绩效"
|
||||
sequence="1"
|
||||
action="yuthon_performance.yuthon_duty_management_action"/>
|
||||
<menuitem id="yuthon_employee_performance_menu_board"
|
||||
parent="yuthon_performance_duty_menu_board"
|
||||
name="员工绩效"
|
||||
sequence="3"
|
||||
action="yuthon_performance.yuthon_duty_management_action"/>
|
||||
<menuitem id="yuthon_Index_management_menu_board"
|
||||
parent="yuthon_performance_menu_config_root_board"
|
||||
name="指标库"
|
||||
sequence="3"/>
|
||||
<menuitem id="yuthon_organization_performance_library_board"
|
||||
parent="yuthon_Index_management_menu_board"
|
||||
name="组织绩效指标库"
|
||||
sequence="1"
|
||||
action="yuthon_performance.yuthon_index_management_action"/>
|
||||
<menuitem id="yuthon_employee_performance_library_board"
|
||||
parent="yuthon_Index_management_menu_board"
|
||||
name="员工绩效指标库"
|
||||
sequence="3"
|
||||
action="yuthon_performance.yuthon_index_management_action"/>
|
||||
<menuitem id="yuthon_plan_management_menu_board"
|
||||
parent="yuthon_performance_menu_config_root_board"
|
||||
name="计划管理"
|
||||
sequence="5"/>
|
||||
<menuitem id="yuthon_plan_management_board"
|
||||
parent="yuthon_plan_management_menu_board"
|
||||
name="个人计划"
|
||||
sequence="1"
|
||||
action="yuthon_performance.yuthon_plan_management_action"/>
|
||||
<menuitem id="yuthon_performance_approval_management_menu_board"
|
||||
parent="yuthon_performance_menu_config_root_board"
|
||||
name="指标变更管理"
|
||||
sequence="7"/>
|
||||
<menuitem id="yuthon_Index_approval_management_board"
|
||||
parent="yuthon_performance_approval_management_menu_board"
|
||||
name="指标库变更"
|
||||
sequence="1"
|
||||
action="yuthon_performance.yuthon_Index_approval_action"/>
|
||||
<menuitem id="yuthon_duty_approval_management_board"
|
||||
parent="yuthon_performance_approval_management_menu_board"
|
||||
name="部门责任书变更"
|
||||
sequence="3"
|
||||
action="yuthon_performance.yuthon_duty_approval_action"/>
|
||||
<menuitem id="yuthon_plan_approval_management_board"
|
||||
parent="yuthon_performance_approval_management_menu_board"
|
||||
name="个人计划变更"
|
||||
sequence="5"
|
||||
action="yuthon_performance.yuthon_plan_approval_action"/>
|
||||
<!-- 配置 -->
|
||||
<menuitem id="human_resources_setting_root_board"
|
||||
name="配置"
|
||||
parent="human_resources_menu_root_board"
|
||||
action="yuthon_none_action"
|
||||
sequence="13"/>
|
||||
</odoo>
|
||||
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- 工作流 -->
|
||||
<record id="soong_workflow.menu_soong_workflow_root" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
<!-- 议题 -->
|
||||
<record id="yuthon_issue.tianhe_issue_library_menu_root" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
<!-- 通知公告 -->
|
||||
<record id="yuthon_notice.yuthon_notice_menu_config_root" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
<!-- 会议室 -->
|
||||
<record id="room.room_menu_root" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
<!-- 网站 -->
|
||||
<record id="website.menu_website_configuration" model="ir.ui.menu">
|
||||
<field name="active">False</field>
|
||||
</record>
|
||||
|
||||
<!-- 协同办公-通知公告 -->
|
||||
<menuitem id="yuthon_notice_menu"
|
||||
name="通知公告"
|
||||
parent="spreadsheet_dashboard.spreadsheet_dashboard_menu_root"
|
||||
sequence="3"/>
|
||||
<menuitem id="yuthon_notice_my_menu_board"
|
||||
parent="yuthon_notice_menu"
|
||||
name="我的通知公告"
|
||||
action="yuthon_notice.approval_notice_action2"
|
||||
sequence="2"/>
|
||||
<menuitem id="yuthon_notice_manager_menu_board"
|
||||
parent="yuthon_notice_menu"
|
||||
name="通知公告管理"
|
||||
action="yuthon_notice.approval_notice_action"
|
||||
sequence="5"/>
|
||||
<menuitem id="yuthon_confirm_users_menu_board"
|
||||
parent="yuthon_notice_menu"
|
||||
name="公告确认信息"
|
||||
action="yuthon_notice.yuthon_confirm_users_action"
|
||||
sequence="9"/>
|
||||
<menuitem id="yuthon_notice_type_menu_board"
|
||||
parent="yuthon_notice_menu"
|
||||
name="公告类型管理"
|
||||
action="yuthon_notice.approval_notice_type_action"
|
||||
sequence="11"/>
|
||||
<!-- 工作流程 -->
|
||||
<menuitem id="menu_soong_workflow_root_board"
|
||||
name="工作流程"
|
||||
parent="spreadsheet_dashboard.spreadsheet_dashboard_menu_root"
|
||||
sequence="5"/>
|
||||
<menuitem id="menu_workflow_approval_request_my_board"
|
||||
name="我的审批"
|
||||
parent="menu_soong_workflow_root_board"
|
||||
sequence="1"/>
|
||||
<menuitem id="menu_workflow_approval_request_new_board"
|
||||
name="新的请求"
|
||||
parent="menu_workflow_approval_request_my_board"
|
||||
action="soong_workflow.action_kklw_workflow_approval_request"
|
||||
sequence="1"/>
|
||||
<menuitem id="menu_workflow_approval_my_request_board"
|
||||
name="我的请求"
|
||||
parent="menu_workflow_approval_request_my_board"
|
||||
action="soong_workflow.action_kklw_workflow_approval_request"
|
||||
sequence="3"/>
|
||||
<menuitem id="menu_soong_other_setting_board"
|
||||
sequence="3"
|
||||
name="其他配置"
|
||||
parent="menu_soong_workflow_root_board"/>
|
||||
<menuitem id="menu_soong_workflow_board"
|
||||
name="工作流配置"
|
||||
parent="menu_soong_other_setting_board"
|
||||
action="soong_workflow.action_soong_workflow"
|
||||
sequence="1"/>
|
||||
<menuitem id="menu_soong_approval_note_board"
|
||||
name="常用审批意见"
|
||||
parent="menu_soong_other_setting_board"
|
||||
action="soong_workflow.soong_note_action"
|
||||
sequence="3"/>
|
||||
<menuitem id="menu_soong_approval_group_board"
|
||||
name="审批分组"
|
||||
parent="menu_soong_other_setting_board"
|
||||
action="soong_workflow.soong_approval_group_action"
|
||||
sequence="5"/>
|
||||
<menuitem id="soong_workflow_record_menu_board"
|
||||
name="工作流记录"
|
||||
parent="menu_soong_workflow_root_board"
|
||||
action="soong_workflow.soong_workflow_record_action"
|
||||
sequence="5"/>
|
||||
<!-- 议题库 -->
|
||||
<menuitem id="tianhe_issue_library_menu_root_board"
|
||||
name="议题库"
|
||||
parent="spreadsheet_dashboard.spreadsheet_dashboard_menu_root"
|
||||
sequence="7"/>
|
||||
<menuitem id="tianhe_issue_library_all_board"
|
||||
parent="tianhe_issue_library_menu_root_board"
|
||||
name="全部"
|
||||
action="yuthon_issue.issue_library_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="tianhe_issue_library_menu_root_board_will_board"
|
||||
parent="tianhe_issue_library_menu_root_board"
|
||||
name="待上会"
|
||||
action="yuthon_issue.issue_library_action_will"
|
||||
sequence="5"/>
|
||||
<menuitem id="tianhe_issue_library_menu_root_board_on_meet_board"
|
||||
parent="tianhe_issue_library_menu_root_board"
|
||||
name="已上会"
|
||||
action="yuthon_issue.issue_library_action_done"
|
||||
sequence="10"/>
|
||||
<menuitem id="tianhe_other_issue_library_menu_board"
|
||||
parent="tianhe_issue_library_menu_root_board"
|
||||
name="子部门议题库"
|
||||
sequence="3"/>
|
||||
<menuitem id="tianhe_issue_library_all2_board"
|
||||
parent="tianhe_other_issue_library_menu_board"
|
||||
name="全部"
|
||||
action="yuthon_issue.issue_library_action2"
|
||||
sequence="1"/>
|
||||
<menuitem id="other_issue_library_menu_will_board"
|
||||
parent="tianhe_other_issue_library_menu_board"
|
||||
name="待上会"
|
||||
action="yuthon_issue.issue_library_action_will2"
|
||||
sequence="3"/>
|
||||
<menuitem id="other_issue_library_menu_on_meet_board"
|
||||
parent="tianhe_other_issue_library_menu_board"
|
||||
name="已上会"
|
||||
action="yuthon_issue.issue_library_action_done2"
|
||||
sequence="5"/>
|
||||
<menuitem id="issue_approval_menu_board"
|
||||
parent="tianhe_issue_library_menu_root_board"
|
||||
name="议题审批"
|
||||
action="yuthon_issue.issue_library_action"
|
||||
sequence="9"/>
|
||||
<menuitem id="issue_approval_party_menu_board"
|
||||
parent="issue_approval_menu_board"
|
||||
name="党总支议题审批"
|
||||
action="yuthon_issue.issue_approval_party_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="issue_approval_class_menu_board"
|
||||
parent="issue_approval_menu_board"
|
||||
name="领导班子议题审批"
|
||||
action="yuthon_issue.issue_approval_class_action"
|
||||
sequence="3"/>
|
||||
<menuitem id="issue_approval_boss_menu_board"
|
||||
parent="issue_approval_menu_board"
|
||||
name="董事会议题审批"
|
||||
action="yuthon_issue.issue_approval_boss_action"
|
||||
sequence="5"/>
|
||||
<!-- 会议室 -->
|
||||
<menuitem id="room_menu_root_board"
|
||||
name="会议室"
|
||||
parent="spreadsheet_dashboard.spreadsheet_dashboard_menu_root"
|
||||
sequence="9"/>
|
||||
<menuitem id="room_booking_menu_board"
|
||||
name="预定"
|
||||
action="room.room_booking_action"
|
||||
parent="room_menu_root_board"
|
||||
sequence="1"/>
|
||||
<menuitem id="room_room_menu_board"
|
||||
name="房间"
|
||||
action="room.room_room_action"
|
||||
parent="room_menu_root_board"
|
||||
sequence="2"/>
|
||||
</odoo>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="yuthon_none_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.none.tree</field>
|
||||
<field name="model">yuthon.none</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="yuthon_none_action" model="ir.actions.act_window">
|
||||
<field name="name">待开发</field>
|
||||
<field name="res_model">yuthon.none</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user