1
This commit is contained in:
@@ -14,8 +14,10 @@
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'security/yuthon_notice_group.xml',
|
||||
'security/yuthon_notice_rule.xml',
|
||||
'data/notice_code_data.xml',
|
||||
'data/notice_cron_data.xml',
|
||||
'data/notice_type_data.xml',
|
||||
'views/yuthon_notice_views.xml',
|
||||
'views/yuthon_notice_type_views.xml',
|
||||
'views/yuthon_confirm_users_views.xml',
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="yuthon_notice_type1" model="yuthon.notice.type"><field name="name">通知</field></record>
|
||||
<record id="yuthon_notice_type2" model="yuthon.notice.type"><field name="name">公告</field></record>
|
||||
<record id="yuthon_notice_type3" model="yuthon.notice.type"><field name="name">决定</field></record>
|
||||
<record id="yuthon_notice_type4" model="yuthon.notice.type"><field name="name">其他</field></record>
|
||||
</odoo>
|
||||
@@ -4,7 +4,7 @@
|
||||
<field name="name">通知公告组</field>
|
||||
</record>
|
||||
|
||||
<record id="module_category_yuthon_notice_user" model="res.groups">
|
||||
<record id="group_notice_user" model="res.groups">
|
||||
<field name="name">用户</field>
|
||||
<field name="category_id" ref="module_category_yuthon_notice"/>
|
||||
</record>
|
||||
@@ -12,7 +12,7 @@
|
||||
<record id="group_notice_admin" model="res.groups">
|
||||
<field name="name">通知管理员</field>
|
||||
<field name="category_id" ref="module_category_yuthon_notice"/>
|
||||
<field name="implied_ids" eval="[(4, ref('module_category_yuthon_notice_user'))]"/>
|
||||
<field name="implied_ids" eval="[(4, ref('group_notice_user'))]"/>
|
||||
<field name="users" eval="[(4, ref('base.user_admin'))]"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="yuthon_notice_company_rule_user" model="ir.rule">
|
||||
<field name="name">yuthon_notice_company_rule_user</field>
|
||||
<field name="model_id" ref="model_yuthon_notice"/>
|
||||
<field name="domain_force">[('employee_ids', 'in', [user.employee_id.id])]</field>
|
||||
<field name="groups" eval="[(4, ref('group_notice_user'))]"/>
|
||||
</record>
|
||||
<record id="yuthon_notice_company_rule_manager" model="ir.rule">
|
||||
<field name="name">yuthon_notice_company_rule_admin</field>
|
||||
<field name="model_id" ref="model_yuthon_notice"/>
|
||||
<field name="domain_force">[('yuthon_company', '=', user.employee_id.yuthon_company)]</field>
|
||||
<field name="groups" eval="[(4, ref('group_notice_admin'))]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -22,7 +22,7 @@
|
||||
id="yuthon_notice_type_setting"
|
||||
parent="yuthon_notice_menu_config_root"
|
||||
name="配置"
|
||||
groups="yuthon_notice.group_notice_admin"
|
||||
groups="group_notice_admin"
|
||||
sequence="7"/>
|
||||
|
||||
<menuitem id="yuthon_notice_type_menu"
|
||||
@@ -31,10 +31,4 @@
|
||||
action="approval_notice_type_action"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem id="yuthon_confirm_users_menu"
|
||||
parent="yuthon_notice_type_setting"
|
||||
name="公告确认信息"
|
||||
action="yuthon_confirm_users_action"
|
||||
sequence="2"/>
|
||||
|
||||
</odoo>
|
||||
@@ -138,41 +138,40 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="approval_notice_action2" model="ir.actions.act_window">
|
||||
<field name="name">我的通知公告</field>
|
||||
<record id="approval_notice_action" model="ir.actions.act_window">
|
||||
<field name="name">通知公告管理</field>
|
||||
<field name="res_model">yuthon.notice</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('notice_state', '=', 'yes'), ('yuthon_company', '=', user.employee_id.yuthon_company)]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_notice.view_yuthon_notice_tree2')}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_notice.view_yuthon_notice_form2')})]"/>
|
||||
</record>
|
||||
|
||||
<record id="approval_notice_action" model="ir.actions.act_window">
|
||||
<field name="name">通知公告管理</field>
|
||||
<record id="approval_notice_action2" model="ir.actions.act_window">
|
||||
<field name="name">我的通知公告</field>
|
||||
<field name="res_model">yuthon.notice</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('employee_ids', 'in', [user.employee_id.id])]</field>
|
||||
<field name="domain">[('notice_state', '=', 'yes')]</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="yuthon_notice_menu_config_root"
|
||||
name="通知公告"
|
||||
web_icon="yuthon_notice,static/description/icon.png"
|
||||
groups="module_category_yuthon_notice_user"
|
||||
groups="group_notice_user"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem id="yuthon_notice_menu1"
|
||||
parent="yuthon_notice_menu_config_root"
|
||||
name="通知公告管理"
|
||||
action="approval_notice_action"
|
||||
action="approval_notice_action2"
|
||||
groups="group_notice_admin"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem id="yuthon_notice_my_menu"
|
||||
parent="yuthon_notice_menu_config_root"
|
||||
name="通知公告"
|
||||
action="approval_notice_action2"
|
||||
groups="module_category_yuthon_notice_user"
|
||||
action="approval_notice_action"
|
||||
groups="group_notice_user"
|
||||
sequence="2"/>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user