add res_users files

This commit is contained in:
pawan.sharma 2021-12-08 18:29:51 +05:30
parent e01362adf3
commit 1bc910b118
4 changed files with 28 additions and 1 deletions

View File

@ -31,6 +31,7 @@
'views/project_view.xml',
#'views/project_hours_view.xml',
'views/hr_employee_views.xml',
'views/res_users.xml',
'views/hr_timesheet_templates.xml',
'views/analytic_view.xml',
'views/hide_menus.xml',

View File

@ -8,4 +8,5 @@ from . import project_overview
from . import analytic
from . import product
from . import hr_employee
from . import sale
from . import sale
from . import res_users

10
cor_custom/models/res_users.py Executable file
View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from odoo import api, exceptions, fields, models, tools, _
class CorResUsers(models.Model):
_inherit = "res.users"
_description = "Custom Res Users"
timesheet_create = fields.Boolean()

15
cor_custom/views/res_users.xml Executable file
View File

@ -0,0 +1,15 @@
<odoo>
<data>
<!-- Form View -->
<record id="inherit_view_users_form" model="ir.ui.view">
<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="inside">
<field name="timesheet_create"/>
</xpath>
</field>
</record>
</data>
</odoo>