OCA-git-bot
5 years ago
committed by
Jesús Alan Ramos Rodríguez
4 changed files with 119 additions and 121 deletions
-
26base_user_role/data/ir_cron.xml
-
12base_user_role/data/ir_module_category.xml
-
136base_user_role/views/role.xml
-
66base_user_role/views/user.xml
@ -1,19 +1,17 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!-- Copyright 2016 ABF OSIELL <http://osiell.com> |
|||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|||
--> |
|||
<odoo noupdate="1"> |
|||
|
|||
<record model="ir.cron" id="cron_update_users"> |
|||
<field name='name'>Update user roles</field> |
|||
<field name='interval_number'>3</field> |
|||
<field name='interval_type'>hours</field> |
|||
<field name="numbercall">-1</field> |
|||
<field name="active">True</field> |
|||
<field name="doall" eval="False"/> |
|||
<field name="model_id" ref="base_user_role.model_res_users_role"/> |
|||
<field name="state">code</field> |
|||
<field name="code">model.cron_update_users()</field> |
|||
</record> |
|||
|
|||
<record model="ir.cron" id="cron_update_users"> |
|||
<field name='name'>Update user roles</field> |
|||
<field name='interval_number'>3</field> |
|||
<field name='interval_type'>hours</field> |
|||
<field name="numbercall">-1</field> |
|||
<field name="active">True</field> |
|||
<field name="doall" eval="False" /> |
|||
<field name="model_id" ref="base_user_role.model_res_users_role" /> |
|||
<field name="state">code</field> |
|||
<field name="code">model.cron_update_users()</field> |
|||
</record> |
|||
</odoo> |
@ -1,17 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!-- Copyright 2016 ABF OSIELL <http://osiell.com> |
|||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|||
--> |
|||
<odoo> |
|||
|
|||
<!-- |
|||
<!-- |
|||
This module category aims to be linked to role/group you create in your own |
|||
module (field 'res.groups.category_id'). |
|||
By doing this you'll have the section 'User roles' in the "Access rights" tab |
|||
on the user form which will regroup all roles/groups for a better visibility. |
|||
--> |
|||
<record model="ir.module.category" id="ir_module_category_role"> |
|||
<field name='name'>User roles</field> |
|||
</record> |
|||
|
|||
<record model="ir.module.category" id="ir_module_category_role"> |
|||
<field name='name'>User roles</field> |
|||
</record> |
|||
</odoo> |
@ -1,72 +1,74 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!-- Copyright 2014 ABF OSIELL <http://osiell.com> |
|||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|||
--> |
|||
<odoo> |
|||
|
|||
<record id="view_res_users_role_form" model="ir.ui.view"> |
|||
<field name="name">res.users.role.form</field> |
|||
<field name="model">res.users.role</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<sheet> |
|||
<group> |
|||
<field name="name"/> |
|||
<field name="group_id" required="0" readonly="1"/> |
|||
</group> |
|||
<notebook> |
|||
<page string="Groups"> |
|||
<field name="implied_ids" nolabel="1"/> |
|||
</page> |
|||
<page string="Users"> |
|||
<field name="line_ids" nolabel="1"> |
|||
<tree editable="bottom" decoration-muted="not is_enabled"> |
|||
<field name="user_id"/> |
|||
<field name="date_from"/> |
|||
<field name="date_to"/> |
|||
<field name="is_enabled"/> |
|||
<field name="company_id" groups="base.group_multi_company"/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_res_users_role_tree" model="ir.ui.view"> |
|||
<field name="name">res.users.role.tree</field> |
|||
<field name="model">res.users.role</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name"/> |
|||
<field name="user_ids"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_res_users_role_search" model="ir.ui.view"> |
|||
<field name="name">res.users.role.search</field> |
|||
<field name="model">res.users.role</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Roles"> |
|||
<field name="name"/> |
|||
<field name="user_ids"/> |
|||
<field name="implied_ids"/> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.actions.act_window" id="action_res_users_role_tree"> |
|||
<field name="name">Roles</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">res.users.role</field> |
|||
<field name="view_id" ref="view_res_users_role_tree"/> |
|||
</record> |
|||
|
|||
<menuitem id="menu_action_res_users_role_tree" |
|||
parent="base.menu_users" |
|||
action="action_res_users_role_tree"/> |
|||
|
|||
<record id="view_res_users_role_form" model="ir.ui.view"> |
|||
<field name="name">res.users.role.form</field> |
|||
<field name="model">res.users.role</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<sheet> |
|||
<group> |
|||
<field name="name" /> |
|||
<field name="group_id" required="0" readonly="1" /> |
|||
</group> |
|||
<notebook> |
|||
<page string="Groups"> |
|||
<field name="implied_ids" nolabel="1" /> |
|||
</page> |
|||
<page string="Users"> |
|||
<field name="line_ids" nolabel="1"> |
|||
<tree |
|||
editable="bottom" |
|||
decoration-muted="not is_enabled" |
|||
> |
|||
<field name="user_id" /> |
|||
<field name="date_from" /> |
|||
<field name="date_to" /> |
|||
<field name="is_enabled" /> |
|||
<field |
|||
name="company_id" |
|||
groups="base.group_multi_company" |
|||
/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="view_res_users_role_tree" model="ir.ui.view"> |
|||
<field name="name">res.users.role.tree</field> |
|||
<field name="model">res.users.role</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name" /> |
|||
<field name="user_ids" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="view_res_users_role_search" model="ir.ui.view"> |
|||
<field name="name">res.users.role.search</field> |
|||
<field name="model">res.users.role</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Roles"> |
|||
<field name="name" /> |
|||
<field name="user_ids" /> |
|||
<field name="implied_ids" /> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<record model="ir.actions.act_window" id="action_res_users_role_tree"> |
|||
<field name="name">Roles</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">res.users.role</field> |
|||
<field name="view_id" ref="view_res_users_role_tree" /> |
|||
</record> |
|||
<menuitem |
|||
id="menu_action_res_users_role_tree" |
|||
parent="base.menu_users" |
|||
action="action_res_users_role_tree" |
|||
/> |
|||
</odoo> |
@ -1,39 +1,39 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!-- Copyright 2014 ABF OSIELL <http://osiell.com> |
|||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
|||
--> |
|||
<odoo> |
|||
|
|||
<record id="view_res_users_form_inherit" model="ir.ui.view"> |
|||
<field name="name">res.users.form.inherit</field> |
|||
<field name="model">res.users</field> |
|||
<field name="inherit_id" ref="base.view_users_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//notebook/page[1]" position="before"> |
|||
<page string="Roles"> |
|||
<field name="role_line_ids" nolabel="1"> |
|||
<tree editable="bottom" decoration-muted="not is_enabled"> |
|||
<field name="role_id"/> |
|||
<field name="date_from"/> |
|||
<field name="date_to"/> |
|||
<field name="is_enabled"/> |
|||
<field name="company_id" groups="base.group_multi_company"/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_res_users_search_inherit" model="ir.ui.view"> |
|||
<field name="name">res.users.search.inherit</field> |
|||
<field name="model">res.users</field> |
|||
<field name="inherit_id" ref="base.view_users_search"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="company_ids" position="after"> |
|||
<field name="role_ids"/> |
|||
<record id="view_res_users_form_inherit" model="ir.ui.view"> |
|||
<field name="name">res.users.form.inherit</field> |
|||
<field name="model">res.users</field> |
|||
<field name="inherit_id" ref="base.view_users_form" /> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//notebook/page[1]" position="before"> |
|||
<page string="Roles"> |
|||
<field name="role_line_ids" nolabel="1"> |
|||
<tree editable="bottom" decoration-muted="not is_enabled"> |
|||
<field name="role_id" /> |
|||
<field name="date_from" /> |
|||
<field name="date_to" /> |
|||
<field name="is_enabled" /> |
|||
<field |
|||
name="company_id" |
|||
groups="base.group_multi_company" |
|||
/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</xpath> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
</record> |
|||
<record id="view_res_users_search_inherit" model="ir.ui.view"> |
|||
<field name="name">res.users.search.inherit</field> |
|||
<field name="model">res.users</field> |
|||
<field name="inherit_id" ref="base.view_users_search" /> |
|||
<field name="arch" type="xml"> |
|||
<field name="company_ids" position="after"> |
|||
<field name="role_ids" /> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue