diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/mail_bot_hr | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/mail_bot_hr')
| -rw-r--r-- | addons/mail_bot_hr/__init__.py | 0 | ||||
| -rw-r--r-- | addons/mail_bot_hr/__manifest__.py | 17 | ||||
| -rw-r--r-- | addons/mail_bot_hr/views/res_users_views.xml | 28 |
3 files changed, 45 insertions, 0 deletions
diff --git a/addons/mail_bot_hr/__init__.py b/addons/mail_bot_hr/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/addons/mail_bot_hr/__init__.py diff --git a/addons/mail_bot_hr/__manifest__.py b/addons/mail_bot_hr/__manifest__.py new file mode 100644 index 00000000..10bdad66 --- /dev/null +++ b/addons/mail_bot_hr/__manifest__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +{ + 'name': "mail_bot_hr", + 'summary': """Bridge module between hr and mailbot.""", + 'description': """This module adds the OdooBot state and notifications in the user form modified by hr.""", + 'website': "https://www.odoo.com/page/discuss", + 'category': 'Productivity/Discuss', + 'version': '1.0', + 'depends': ['mail_bot', 'hr'], + 'application': False, + 'installable': True, + 'auto_install': True, + 'data': [ + 'views/res_users_views.xml', + ], + 'license': 'LGPL-3', +} diff --git a/addons/mail_bot_hr/views/res_users_views.xml b/addons/mail_bot_hr/views/res_users_views.xml new file mode 100644 index 00000000..2a981524 --- /dev/null +++ b/addons/mail_bot_hr/views/res_users_views.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" ?> +<odoo> + <data> + <record id="res_users_view_form_simple_modif" model="ir.ui.view"> + <field name="name">res.users.preferences.form.simplified.inherit</field> + <field name="model">res.users</field> + <field name="inherit_id" ref="hr.res_users_view_form_simple_modif" /> + <field name="priority">15</field> + <field name="arch" type="xml"> + <widget name="notification_alert" position="replace" /> + </field> + </record> + + <record id="res_users_view_form_profile" model="ir.ui.view"> + <field name="name">res.users.preferences.form.inherit</field> + <field name="model">res.users</field> + <field name="inherit_id" ref="hr.res_users_view_form_profile" /> + <field name="arch" type="xml"> + <xpath expr="//field[@name='odoobot_state']" position="attributes"> + <attribute name="attrs">{'readonly': [('can_edit', '=', False)]}</attribute> + </xpath> + <sheet position="before"> + <widget name="notification_alert" class="mb-0" /> + </sheet> + </field> + </record> + </data> +</odoo> |
