[app_sample] v18

This commit is contained in:
Chill
2024-11-18 15:29:13 +08:00
parent c5eb74ebc8
commit 66a1a7d2f3
52 changed files with 1446 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Create new App security category, 创建应用 -->
<record model="ir.module.category" id="app_module_category_1">
<field name="name">App...</field>
<field name="description">Helps you manage your ...</field>
<field name="sequence">8</field>
</record>
<!-- Cretate new App security group, 权限组 -->
<!-- User group, 普通用记 -->
<record id="group_app_user" model="res.groups">
<field name="name">App User</field>
<field name="category_id" ref="app_module_category_1"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="comment">The user will be able to ...</field>
</record>
<!-- Admin group管理员可以配置 -->
<record id="group_app_admin" model="res.groups">
<field name="name">App Admin</field>
<field name="category_id" ref="app_module_category_1"/>
<field name="implied_ids" eval="[(4, ref('group_app_user'))]"/>
<field name="comment">The user will be able to config ...</field>
</record>
<!-- Auto set erp admin full accessgroup_erp_manager自动有完整权限 -->
<record id="base.group_erp_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_app_admin'))]"/>
</record>
<!-- IR Rules, user can only see my record记录集权限用户只能见到自已的记录 -->
<!-- <record id="rule_user" model="ir.rule">-->
<!-- <field name="name">Users are allowed to access their own record</field>-->
<!-- <field name="model_id" ref="model_app_order"/>-->
<!-- <field name="domain_force">['|', ('partner_id', 'in', [user.partner_id.id]), ('user_id.id', '=', user.id)]</field>-->
<!-- <field name="groups" eval="[(4, ref('base.group_user'))]"/>-->
<!-- </record>-->
<!--End -->
</data>
</odoo>

View File

@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_model_new,access_model_new,model_model_new,base.group_user,1,1,1,1
access_model_new_report,access_model_new_report,model_model_new_report,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_model_new access_model_new model_model_new base.group_user 1 1 1 1
3 access_model_new_report access_model_new_report model_model_new_report base.group_user 1 1 1 1