Merge branch 'dev' into dev_zhou
# Conflicts: # soong_workflow/wizard/soong_bounced_wizard.py
This commit is contained in:
@@ -216,7 +216,7 @@ export class KsDashboardNinja extends Component {
|
||||
grid_initiate(){
|
||||
var self=this;
|
||||
const ks_element = this.main_body.el;
|
||||
var $gridstackContainer = $(".grid-stack");
|
||||
var $gridstackContainer = $(`.grid-stack-${this.ks_dashboard_id}`);
|
||||
if($gridstackContainer.length){
|
||||
this.grid = GridStack.init(this.gridstack_options,$gridstackContainer[0]);
|
||||
var item = self.ksSortItems(self.ks_dashboard_data.ks_item_data)
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
|
||||
<div class="ks_dashboard_main_content" t-ref="ks_main_body">
|
||||
<t t-if="state.ks_dashboard_item_length != 0">
|
||||
<div class="ks_dashboard_item_content grid-stack ks_dashboard_items_list m-3" gs-w="36"/>
|
||||
<div class="ks_dashboard_item_content grid-stack ks_dashboard_items_list m-3" t-attf-class="grid-stack-{{ks_dashboard_id}}" gs-w="36"/>
|
||||
<t t-call="ks_dashboard_item_template"/>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
@@ -869,7 +869,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
id_el = etree.Element("field")
|
||||
id_el.set("name", "log_ids")
|
||||
id_el.set("invisible", "1")
|
||||
field_inst.set("readonly", "state in %s and log_ids" % readonly_arr)
|
||||
field_inst.set("readonly", "state in %s" % readonly_arr)
|
||||
if required_arr:
|
||||
field_inst.set("required", "state in %s" % required_arr)
|
||||
if invisible_arr:
|
||||
@@ -991,6 +991,7 @@ class SoongWorkflowLine(models.Model):
|
||||
"view_mode": "form",
|
||||
}
|
||||
|
||||
|
||||
class ProjectProjectLine(models.Model):
|
||||
_name = "project.project.line"
|
||||
|
||||
|
||||
@@ -28,14 +28,13 @@
|
||||
</page>
|
||||
<page string="关联流程">
|
||||
<field name="soong_record_ids" style="width:100%%; margin-top: 10px;">
|
||||
<tree edit="true" delete="true" editable="bottom" action="open_record" type="object">
|
||||
<tree edit="true" delete="true" editable="bottom" type="object">
|
||||
<field name="code"/>
|
||||
<field name="workflow_record_id" domain="[('users_ids', 'in', uid)]" options="{'no_open': True}"/>
|
||||
<field name="approvals_group_id"/>
|
||||
<field name="create_uid"/>
|
||||
<field name="write_date2"/>
|
||||
<button name="open_record" type="object" string="详情" class="btn-primary"/>
|
||||
<button name="unlink" type="object" string="删除" class="btn-primary"/>
|
||||
<button name="open_record" type="object" string="详情" class="btn-primary"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
'depends': ['base', 'documents', 'soong_workflow', 'yuthon_wechat', 'hr'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'security/yuthon_notice_group.xml',
|
||||
'data/notice_code_data.xml',
|
||||
'data/notice_cron_data.xml',
|
||||
'data/notice_type_data.xml',
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
from . import yuthon_notice
|
||||
from . import yuthon_notice_type
|
||||
from . import yuthon_confirm_users
|
||||
from . import yuthon_cs_tree
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
from odoo import api, fields, models, tools, _
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
|
||||
|
||||
class YuthonCsTree(models.Model):
|
||||
_name = 'yuthon.cs.tree'
|
||||
_description = 'Yuthon Customer Service Tree'
|
||||
|
||||
name = fields.Char(string='Name', required=True)
|
||||
@@ -5,6 +5,7 @@ import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class YuthonNotice(models.Model):
|
||||
_name = "yuthon.notice"
|
||||
_description = '通知公告'
|
||||
@@ -25,8 +26,7 @@ class YuthonNotice(models.Model):
|
||||
department_ids = fields.Many2many('hr.department', string='部门范围')
|
||||
users_role_ids = fields.Many2many('soong.user.role', string='角色范围')
|
||||
users_role_group_ids = fields.Many2many('soong.user.role.group', string='角色组')
|
||||
notice_state = fields.Selection([('no', '未发布'), ('yes', '已发布'), ('stop', '已终止')], default='no',
|
||||
string="公告状态")
|
||||
notice_state = fields.Selection([('no', '未发布'), ('yes', '已发布'), ('stop', '已终止')], default='no', string="公告状态")
|
||||
notice_documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
is_notice_roger = fields.Selection([('yes', '已读'), ('no', '未读')], default='no', string="确认状态")
|
||||
is_change_notice = fields.Boolean(string="是否发送通知", default=True)
|
||||
@@ -44,7 +44,7 @@ class YuthonNotice(models.Model):
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
for i in vals_list:
|
||||
if i['department_ids'] == i['employee_ids'] == i['users_role_ids']:
|
||||
if i['department_ids'] == i['employee_ids'] == i['users_role_ids'] == i['users_role_group_ids']:
|
||||
raise UserError('请填写发布的范围')
|
||||
return super().create(vals_list)
|
||||
|
||||
@@ -158,3 +158,10 @@ class YuthonNotice(models.Model):
|
||||
'notice_state': 'stop',
|
||||
'end_date': fields.Date.today(),
|
||||
})
|
||||
|
||||
|
||||
class YuthonCsTree(models.Model):
|
||||
_name = 'yuthon.cs.tree'
|
||||
_description = 'Yuthon Customer Service Tree'
|
||||
|
||||
name = fields.Char(string='Name', required=True)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="module_category_yuthon_notice" model="ir.module.category">
|
||||
<field name="name">通知公告组</field>
|
||||
</record>
|
||||
<record id="group_notice_admin" model="res.groups">
|
||||
<field name="name">通知管理员</field>
|
||||
<field name="category_id" ref="module_category_yuthon_notice"/>
|
||||
<field name="users" eval="[(4, ref('base.user_admin'))]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -22,7 +22,6 @@
|
||||
id="yuthon_notice_type_setting"
|
||||
parent="yuthon_notice_menu_config_root"
|
||||
name="配置"
|
||||
groups="group_notice_admin"
|
||||
sequence="7"/>
|
||||
|
||||
<menuitem id="yuthon_notice_type_menu"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
decoration-muted="notice_state == 'stop'">
|
||||
<field name="name" required="1"/>
|
||||
<field name="notice_type_id" string="类型" class="list_ids_width"/>
|
||||
<field name="users_id" string="发布人" widget="ztree_select" class="list_ids_width"/>
|
||||
<field name="users_id" string="发布人" class="list_ids_width"/>
|
||||
<field name="department_id" column_invisible="1"/>
|
||||
<field name="users_ids" column_invisible="1"/>
|
||||
<field name="create_date1"/>
|
||||
@@ -53,10 +53,10 @@
|
||||
</div>
|
||||
<group col="4">
|
||||
<group>
|
||||
<field name="notice_type_id" required="1"/>
|
||||
<field name="notice_type_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="users_id" required="1" widget="ztree_select"/>
|
||||
<field name="users_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="work_end" invisible="1"/>
|
||||
@@ -110,7 +110,7 @@
|
||||
js_class="custom_notice_tree_button">
|
||||
<field name="name"/>
|
||||
<field name="notice_type_id" string="类型"/>
|
||||
<field name="users_id" string="发布人" widget="ztree_select" class="list_ids_width"/>
|
||||
<field name="users_id" string="发布人" class="list_ids_width"/>
|
||||
<field name="is_notice_roger"/>
|
||||
<field name="department_id" column_invisible="1"/>
|
||||
<field name="users_ids" column_invisible="1"/>
|
||||
@@ -128,10 +128,10 @@
|
||||
<form create="false" edit="false" delete="false" string="公告管理">
|
||||
<group col="4">
|
||||
<group>
|
||||
<field name="notice_type_id" required="1" string="发布类型"/>
|
||||
<field name="notice_type_id" string="发布类型"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="users_id" required="1" widget="ztree_select"/>
|
||||
<field name="users_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="read_number"/>
|
||||
|
||||
Reference in New Issue
Block a user