mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 10:52:03 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 ACSONE SA/NV
|
||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). -->
|
||||
<odoo>
|
||||
|
||||
<record model="ir.model.access" id="fastapi_endpoint_access_view">
|
||||
<field name="name">fastapi.endpoint view</field>
|
||||
<field name="model_id" ref="model_fastapi_endpoint" />
|
||||
<field name="group_id" ref="group_fastapi_user" />
|
||||
<field name="perm_read" eval="1" />
|
||||
<field name="perm_create" eval="0" />
|
||||
<field name="perm_write" eval="0" />
|
||||
<field name="perm_unlink" eval="0" />
|
||||
</record>
|
||||
|
||||
<record model="ir.model.access" id="fastapi_endpoint_access_manage">
|
||||
<field name="name">fastapi.endpoint manage</field>
|
||||
<field name="model_id" ref="model_fastapi_endpoint" />
|
||||
<field name="group_id" ref="group_fastapi_manager" />
|
||||
<field name="perm_read" eval="1" />
|
||||
<field name="perm_create" eval="1" />
|
||||
<field name="perm_write" eval="1" />
|
||||
<field name="perm_unlink" eval="1" />
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 ACSONE SA/NV
|
||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). -->
|
||||
<odoo>
|
||||
<!-- give access to the user running the demo app to the res.user model -->
|
||||
<record id="res_user_fastapi_running_user" model="ir.model.access">
|
||||
<field name="name">Fastapi: Running user read users</field>
|
||||
<field name="model_id" ref="base.model_res_users" />
|
||||
<field name="group_id" ref="group_fastapi_endpoint_runner" />
|
||||
<field name="perm_read" eval="True" />
|
||||
<field name="perm_write" eval="False" />
|
||||
<field name="perm_create" eval="False" />
|
||||
<field name="perm_unlink" eval="False" />
|
||||
</record>
|
||||
|
||||
<!-- restrict the access by the user running the demo app to its own user -->
|
||||
<record id="res_user_fastapi_running_user_rule" model="ir.rule">
|
||||
<field name="name">Fastapi: Running user rule</field>
|
||||
<field name="model_id" ref="base.model_res_users" />
|
||||
<field name="domain_force"> [('id', '=', user.id)]</field>
|
||||
<field name="groups" eval="[(4, ref('group_fastapi_endpoint_runner'))]" />
|
||||
</record>
|
||||
|
||||
<!-- give access to the user running the demo app to the res.partner model -->
|
||||
<record id="res_partner_fastapi_running_user" model="ir.model.access">
|
||||
<field name="name">Fastapi: Running user read partners</field>
|
||||
<field name="model_id" ref="base.model_res_partner" />
|
||||
<field name="group_id" ref="group_fastapi_endpoint_runner" />
|
||||
<field name="perm_read" eval="True" />
|
||||
<field name="perm_write" eval="False" />
|
||||
<field name="perm_create" eval="False" />
|
||||
<field name="perm_unlink" eval="False" />
|
||||
</record>
|
||||
|
||||
<!-- restrict the access by the user running the demo app to its own partner
|
||||
and the authenticated one-->
|
||||
<record id="res_partner_fastapi_running_user_rule" model="ir.rule">
|
||||
<field name="name">Fastapi: Running user rule</field>
|
||||
<field name="model_id" ref="base.model_res_partner" />
|
||||
<field
|
||||
name="domain_force"
|
||||
> ['|', ('user_ids', '=', user.id), ('id', '=', authenticated_partner_id)]</field>
|
||||
<field name="groups" eval="[(4, ref('group_fastapi_endpoint_runner'))]" />
|
||||
</record>
|
||||
|
||||
<!-- give access by the user running the demo app to the fastapi.enddoint model -->
|
||||
<record id="fastapi_endpoint_fastapi_running_user" model="ir.model.access">
|
||||
<field name="name">Fastapi: Running user read endpoints</field>
|
||||
<field name="model_id" ref="fastapi.model_fastapi_endpoint" />
|
||||
<field name="group_id" ref="group_fastapi_endpoint_runner" />
|
||||
<field name="perm_read" eval="True" />
|
||||
<field name="perm_write" eval="False" />
|
||||
<field name="perm_create" eval="False" />
|
||||
<field name="perm_unlink" eval="False" />
|
||||
</record>
|
||||
|
||||
<!-- restrict the access by the user running the demo app to its own endpoints -->
|
||||
<record id="fastapi_endpoint_fastapi_running_user_rule" model="ir.rule">
|
||||
<field name="name">Fastapi: Running user rule</field>
|
||||
<field name="model_id" ref="fastapi.model_fastapi_endpoint" />
|
||||
<field name="domain_force"> [('user_id', '=', user.id)]</field>
|
||||
<field name="groups" eval="[(4, ref('group_fastapi_endpoint_runner'))]" />
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2022 ACSONE SA/NV
|
||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). -->
|
||||
<odoo>
|
||||
<record model="ir.module.category" id="module_category_fastapi">
|
||||
<field name="name">FastAPI</field>
|
||||
<field name="description">Helps you manage your Fastapi Endpoints</field>
|
||||
<field name="sequence">99</field>
|
||||
</record>
|
||||
|
||||
<record id="group_fastapi_user" model="res.groups">
|
||||
<field name="name">User</field>
|
||||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
|
||||
<field name="category_id" ref="module_category_fastapi" />
|
||||
</record>
|
||||
|
||||
<record id="group_fastapi_manager" model="res.groups">
|
||||
<field name="name">Administrator</field>
|
||||
<field name="category_id" ref="module_category_fastapi" />
|
||||
<field name="implied_ids" eval="[(4, ref('group_fastapi_user'))]" />
|
||||
<field
|
||||
name="users"
|
||||
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
|
||||
/>
|
||||
</record>
|
||||
|
||||
<!-- create a basic group providing the minimal access rights to retrieve
|
||||
the user running the endpoint handlers and performs authentication -->
|
||||
<record id="group_fastapi_endpoint_runner" model="res.groups">
|
||||
<field name="name">FastAPI Endpoint Runner</field>
|
||||
<field name="category_id" ref="module_category_fastapi" />
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue