@ -0,0 +1,54 @@ |
|||||
|
.. image:: https://img.shields.io/badge/licence-LGPL--3-green.svg |
||||
|
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
||||
|
:alt: License: LGPL-3 |
||||
|
|
||||
|
Employee Ideas |
||||
|
============= |
||||
|
* This module allows to share the ideas of an employee to others. The other |
||||
|
employees can vote the ideas to approve it. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* Set the groups for the users |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
- www.odoo.com/documentation/18.0/setup/install.html |
||||
|
- Install our custom addon |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (LGPL v3). |
||||
|
( https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developer:(v16) Anjana P V, |
||||
|
(v17) Akhil Ashok, |
||||
|
(v18) Akhil Ashok, |
||||
|
Contact : odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
|
||||
|
For support and more information, please visit https://www.cybrosys.com |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import models |
||||
|
from . import wizard |
@ -0,0 +1,47 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': 'Employee Ideas', |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'Human Resources', |
||||
|
'summary': """ Share the ideas """, |
||||
|
'description': """ Can easily share the ideas of an employee to others""", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'depends': ['base', 'mail', 'hr'], |
||||
|
'data': [ |
||||
|
'security/employee_ideas_security.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
'data/ir_sequence_data.xml', |
||||
|
'views/employee_idea_views.xml', |
||||
|
'views/idea_type_views.xml', |
||||
|
'wizard/give_vote_views.xml', |
||||
|
'report/employee_idea_report_templates.xml', |
||||
|
], |
||||
|
'images': ['static/description/banner.png'], |
||||
|
'license': 'LGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': True, |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo noupdate="1"> |
||||
|
<!-- Record for creating sequence number for the model employee.idea--> |
||||
|
<record id="employee_idea_sequence" model="ir.sequence"> |
||||
|
<field name="name">Employee Ideas</field> |
||||
|
<field name="code">employee.idea</field> |
||||
|
<field name="prefix">EI</field> |
||||
|
<field name="padding">5</field> |
||||
|
<field name="company_id" eval="False"/> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,5 @@ |
|||||
|
## Module <employee_ideas> |
||||
|
#### 29.01.2025 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
##### ADD |
||||
|
- Initial Commit for Employee Ideas |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import employee_idea |
||||
|
from . import idea_type |
@ -0,0 +1,237 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import api, fields, models, _ |
||||
|
|
||||
|
|
||||
|
class EmployeeIdeas(models.Model): |
||||
|
"""This class is used for creating ideas under the idea type""" |
||||
|
_name = 'employee.idea' |
||||
|
_description = 'Employee Ideas' |
||||
|
_inherit = 'mail.thread' |
||||
|
_rec_name = "reference_no" |
||||
|
|
||||
|
def get_employee_name(self): |
||||
|
"""This function is used to get the name of current employee""" |
||||
|
employee_rec_id = self.env['hr.employee'].search( |
||||
|
[('user_id', '=', self.env.user.id)]) |
||||
|
return employee_rec_id |
||||
|
|
||||
|
def get_idea_type_domain(self): |
||||
|
"""This function is used to get the idea types""" |
||||
|
employee_rec_id = self.env['hr.employee'].search( |
||||
|
[('user_id', '=', self.env.user.id)]) |
||||
|
idea_type_list = [] |
||||
|
employee_dept = employee_rec_id.department_id |
||||
|
idea_type_rec = self.idea_type_id.search([]) |
||||
|
for rec in idea_type_rec: |
||||
|
department_rec = rec.hr_department_ids.ids |
||||
|
if employee_dept.id in department_rec: |
||||
|
idea_type_list.append(rec.id) |
||||
|
return [('id', 'in', idea_type_list)] |
||||
|
|
||||
|
title = fields.Char(string="Title", help='Title of your idea', |
||||
|
required=True) |
||||
|
employee_id = fields.Many2one('hr.employee', string='Employee', |
||||
|
help='Employee created the idea', |
||||
|
default=get_employee_name) |
||||
|
idea_type_id = fields.Many2one('idea.type', help='Idea type of the idea', |
||||
|
domain=get_idea_type_domain, |
||||
|
required=True) |
||||
|
details = fields.Text(string="Details", |
||||
|
help='Enter the details of your idea', required=True) |
||||
|
vote_count = fields.Integer(compute='_compute_vote_count', help='Shows the ' |
||||
|
'number of ' |
||||
|
'votes ' |
||||
|
'obtained') |
||||
|
is_vote = fields.Boolean(string="Voted", compute='_compute_is_vote', |
||||
|
help='Shows whether the employee is voted or not') |
||||
|
state = fields.Selection(selection=[('draft', 'Draft'), |
||||
|
('approval', 'Approval'), |
||||
|
('post', 'Posted'), |
||||
|
('rejected', 'Rejected')], |
||||
|
default='draft', help='Stages of ideas') |
||||
|
reference_no = fields.Char(string='Order Reference', readonly=True, |
||||
|
copy=False, help='Sequence number', |
||||
|
default=lambda self: _('New')) |
||||
|
employee_vote_ids = fields.One2many('give.vote', 'employee_ideas_id', |
||||
|
string="Vote", |
||||
|
help='Connect with the model give.vote ' |
||||
|
'to check the voting status of ' |
||||
|
'employee') |
||||
|
have_minimum_vote = fields.Text(string='Status', help='This field shows, ' |
||||
|
'that whether the ' |
||||
|
'idea has minimum ' |
||||
|
'vote or not') |
||||
|
is_visible_give_vote = fields.Boolean(string='Visible Give Vote', |
||||
|
compute='_compute_is_visible_give_vote', |
||||
|
help='Check whether need to show' |
||||
|
'the Give Vote button ') |
||||
|
company_id = fields.Many2one('res.company', help='Company', readonly=True, |
||||
|
default=lambda self: self.env.company) |
||||
|
is_send_approval_visibility = fields.Boolean(string="send approval", |
||||
|
readonly=False, |
||||
|
compute='_compute_is_send_approval_visibility', |
||||
|
help='Check Whether, need to' |
||||
|
' show the Send ' |
||||
|
'Approval button for' |
||||
|
' employee', store=True) |
||||
|
|
||||
|
@api.model |
||||
|
def create(self, vals): |
||||
|
"""This function create the reference number""" |
||||
|
if vals.get('reference_no', _('New')) == _('New'): |
||||
|
vals['reference_no'] = self.env['ir.sequence'].next_by_code( |
||||
|
'employee.idea') or _('New') |
||||
|
res = super(EmployeeIdeas, self).create(vals) |
||||
|
return res |
||||
|
|
||||
|
def _compute_is_send_approval_visibility(self): |
||||
|
"""This function is used to determine the visibility of send for |
||||
|
approval button""" |
||||
|
for rec in self: |
||||
|
if rec.create_uid.id == self.env.user.id: |
||||
|
rec.is_send_approval_visibility = True |
||||
|
else: |
||||
|
rec.is_send_approval_visibility = False |
||||
|
|
||||
|
def action_send_approval(self): |
||||
|
"""Change the state of a record in to Post""" |
||||
|
self.write({'state': 'approval'}) |
||||
|
|
||||
|
def action_approve(self): |
||||
|
"""Change the state of a record in to Approved""" |
||||
|
self.write({'state': 'post'}) |
||||
|
|
||||
|
def action_reject(self): |
||||
|
"""Change the state of a record in to Rejected""" |
||||
|
self.write({'state': 'rejected'}) |
||||
|
|
||||
|
def action_give_vote(self): |
||||
|
"""This function opens a wizard while click on 'Give Vote' button, |
||||
|
where provides an interface to vote or to comment""" |
||||
|
employee = self.env['hr.employee'].search( |
||||
|
[('user_id', '=', self.env.user.id)] |
||||
|
) |
||||
|
give_votes_rec = self.env['give.vote'].create({ |
||||
|
'employee_id': employee.id, |
||||
|
'reference': self.reference_no, |
||||
|
'employee_ideas_id': self.id |
||||
|
}) |
||||
|
return { |
||||
|
'name': 'Give Vote', |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'res_model': 'give.vote', |
||||
|
'view_mode': 'form', |
||||
|
'res_id': give_votes_rec.id, |
||||
|
'target': 'new' |
||||
|
} |
||||
|
|
||||
|
def _compute_is_vote(self): |
||||
|
"""This function is used to allow an employee to do single vote""" |
||||
|
employee = self.env['hr.employee'].search( |
||||
|
[('user_id', '=', self.env.user.id)]) |
||||
|
self.is_vote = False |
||||
|
for rec in self: |
||||
|
vote_employee = rec.employee_vote_ids.search( |
||||
|
[('reference', '=', rec.reference_no), |
||||
|
('status', '=', 'Voted')]) |
||||
|
if not vote_employee: |
||||
|
rec.is_vote = False |
||||
|
else: |
||||
|
for record in vote_employee: |
||||
|
if employee.id == record.employee_id.id: |
||||
|
rec.is_vote = True |
||||
|
else: |
||||
|
rec.is_vote = False |
||||
|
|
||||
|
def _compute_vote_count(self): |
||||
|
""" This compute function used to count the number of votes get to a |
||||
|
particular idea""" |
||||
|
for rec in self: |
||||
|
rec.vote_count = self.employee_vote_ids.search_count( |
||||
|
[('employee_ideas_id', '=', self.id), ('is_vote', '=', 'True')]) |
||||
|
if self.vote_count >= self.idea_type_id.minimum_vote: |
||||
|
self.have_minimum_vote = 'Go with this' |
||||
|
else: |
||||
|
self.have_minimum_vote = 'Does not have minimum vote' |
||||
|
|
||||
|
def _compute_is_visible_give_vote(self): |
||||
|
"""This function is used to make visible the Give Vote button only to |
||||
|
the employees, who are in specified department""" |
||||
|
employee = self.env['hr.employee'].search( |
||||
|
[('user_id', '=', self.env.user.id)] |
||||
|
) |
||||
|
for rec in self: |
||||
|
rec.is_visible_give_vote = False |
||||
|
if rec.create_uid.id == self.env.user.id: |
||||
|
rec.is_visible_give_vote = False |
||||
|
break |
||||
|
department = rec.idea_type_id.hr_department_ids.ids |
||||
|
if employee.department_id.id in department: |
||||
|
rec.is_visible_give_vote = True |
||||
|
|
||||
|
def action_get_votes_of_idea(self): |
||||
|
"""This function is used to return the tree view showing the votes |
||||
|
gained while clicking the smart button""" |
||||
|
self.ensure_one() |
||||
|
return { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'name': 'Votes', |
||||
|
'view_mode': 'list', |
||||
|
'res_model': 'give.vote', |
||||
|
'target': 'current', |
||||
|
'domain': [('employee_ideas_id', '=', self.id), |
||||
|
('status', '=', 'Voted')], |
||||
|
'context': {"create": False} |
||||
|
} |
||||
|
|
||||
|
def action_get_comments_of_idea(self): |
||||
|
"""This function is used to return the tree view showing the comments |
||||
|
""" |
||||
|
self.ensure_one() |
||||
|
return { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'name': 'Comments', |
||||
|
'view_mode': 'list', |
||||
|
'res_model': 'give.vote', |
||||
|
'target': 'current', |
||||
|
'domain': [('employee_ideas_id', '=', self.id), |
||||
|
('status', '=', 'Commented')], |
||||
|
'context': {"create": False} |
||||
|
} |
||||
|
|
||||
|
def action_print(self): |
||||
|
"""This function is responsible for the printing pdf reports""" |
||||
|
query = """ |
||||
|
select reference_no,hr_employee.name,title,details, |
||||
|
employee_idea.state |
||||
|
from employee_idea |
||||
|
inner join hr_employee on employee_id=hr_employee.id |
||||
|
where employee_idea.id = %s |
||||
|
""" % self.id |
||||
|
self.env.cr.execute(query) |
||||
|
data = { |
||||
|
'query_fetch': self.env.cr.dictfetchall(), |
||||
|
} |
||||
|
return self.env.ref( |
||||
|
'employee_ideas.employee_idea_action_report').report_action(None, |
||||
|
data=data) |
@ -0,0 +1,72 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class IdeaType(models.Model): |
||||
|
"""This class helps to create idea types by HR officer""" |
||||
|
_name = 'idea.type' |
||||
|
_inherit = 'mail.thread' |
||||
|
_description = 'Idea Type' |
||||
|
|
||||
|
name = fields.Char(string="Name", help='Enter the name of Idea Type', |
||||
|
required=True) |
||||
|
minimum_vote = fields.Integer(string="Minimum Vote", |
||||
|
help='Specify the number of minimum vote' |
||||
|
' that this idea type should acquire', |
||||
|
required=True, default=1) |
||||
|
employee_ideas_id = fields.Many2one('employee.idea', string='Employee Idea', |
||||
|
help='Connect with the model ' |
||||
|
'employee.idea and calculate ' |
||||
|
'total number of ideas') |
||||
|
total_ideas = fields.Integer(string="Total ideas", |
||||
|
compute='_compute_total_ideas', |
||||
|
help='Shows the total number of ideas' |
||||
|
'generated under this idea type') |
||||
|
company_id = fields.Many2one('res.company', required=True, |
||||
|
default=lambda self: self.env.company, |
||||
|
help='Shows the current company') |
||||
|
hr_department_ids = fields.Many2many('hr.department', string='Department', |
||||
|
help='Shows the allowed departments ' |
||||
|
'under each idea type') |
||||
|
|
||||
|
def _compute_total_ideas(self): |
||||
|
"""This function is used to calculate the total number of idea |
||||
|
created under this Idea Type""" |
||||
|
for rec in self: |
||||
|
rec.total_ideas = self.employee_ideas_id.search_count( |
||||
|
[('idea_type_id', '=', self.id)] |
||||
|
) |
||||
|
|
||||
|
def action_get_the_ideas(self): |
||||
|
"""This function is used to return the tree view of created ideas, |
||||
|
while clicking the smart button""" |
||||
|
self.ensure_one() |
||||
|
return { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'name': 'Employee Ideas', |
||||
|
'view_mode': 'tree', |
||||
|
'res_model': 'employee.idea', |
||||
|
'target': 'current', |
||||
|
'domain': [('idea_type_id', '=', self.id)], |
||||
|
'context': {"create": False} |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<record id="employee_idea_action_report" model="ir.actions.report"> |
||||
|
<field name="name">Employee Idea Report</field> |
||||
|
<field name="model">employee.idea</field> |
||||
|
<field name="report_type">qweb-pdf</field> |
||||
|
<field name="report_name">employee_ideas.employee_idea_report</field> |
||||
|
<field name="report_file">employee_ideas.employee_idea_report</field> |
||||
|
</record> |
||||
|
<!--template for the pdf report of employee ideas--> |
||||
|
<template id="employee_idea_report"> |
||||
|
<t t-call="web.html_container"> |
||||
|
<t t-call="web.external_layout"> |
||||
|
<div class="page"> |
||||
|
<div class="oe_structure"/> |
||||
|
<div class="text-center"> |
||||
|
<h1 style="font-size:30px;"> |
||||
|
<b>Employee Idea Report</b> |
||||
|
</h1> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<table class="table table-bordered" |
||||
|
style="table-layout: fixed" |
||||
|
id="hash_config_table"> |
||||
|
<t t-foreach="query_fetch" t-as="line"> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<h2> |
||||
|
<span t-esc="line['reference_no']"/> |
||||
|
</h2> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-if="line['state']=='approval'"> |
||||
|
<span>Approval</span> |
||||
|
</t> |
||||
|
<t t-if="line['state']=='post'"> |
||||
|
<span>Posted</span> |
||||
|
</t> |
||||
|
<t t-if="line['state']=='rejected'"> |
||||
|
<span>Rejected</span> |
||||
|
</t> |
||||
|
<t t-if="line['state']=='draft'"> |
||||
|
<span>Draft</span> |
||||
|
</t> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<strong>Title</strong> |
||||
|
</td> |
||||
|
<td> |
||||
|
<span t-esc="line['title']"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<strong>Employee</strong> |
||||
|
</td> |
||||
|
<td> |
||||
|
<span t-esc="line['name']"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<strong>Details</strong> |
||||
|
</td> |
||||
|
<td> |
||||
|
<span t-esc="line['details']"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</t> |
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
</template> |
||||
|
</odoo> |
@ -0,0 +1,41 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- Enabled multi company rule--> |
||||
|
<record id="employee_ideas_company_rule" model="ir.rule"> |
||||
|
<field name="name">Employee-Idea-Multi-Company</field> |
||||
|
<field name="model_id" ref="model_employee_idea"/> |
||||
|
<field name="domain_force">['|',('company_id','=',False),('company_id', |
||||
|
'in', company_ids)] |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="idea_type_company_rule" model="ir.rule"> |
||||
|
<field name="name">Idea-Type-Multi-Company</field> |
||||
|
<field name="model_id" ref="model_idea_type"/> |
||||
|
<field name="domain_force">['|',('company_id','=',False),('company_id', |
||||
|
'in', company_ids)] |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="give_vote_company_rule" model="ir.rule"> |
||||
|
<field name="name">Give-Votes-Multi-Company</field> |
||||
|
<field name="model_id" ref="model_give_vote"/> |
||||
|
<field name="domain_force">['|',('company_id','=',False),('company_id', |
||||
|
'in', company_ids)] |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Record rule for restrict the rejected,draft and approval records for the employees in employee.idea--> |
||||
|
<record id="employee_ideas_user_view_rule" model="ir.rule"> |
||||
|
<field name="name">Employee Idea View</field> |
||||
|
<field ref="model_employee_idea" name="model_id"/> |
||||
|
<field name="domain_force">['|', ('state','=','post'),('employee_id.user_id', '=', user.id), ('idea_type_id.hr_department_ids', 'in', [user.department_id.id])]</field> |
||||
|
<field name="groups" eval="[(4, ref('base.group_user'))]"/> |
||||
|
</record> |
||||
|
Record rule for allowing the access of all records in employee.idea |
||||
|
<record id="employee_ideas_hr_view_rule" model="ir.rule"> |
||||
|
<field name="name">Employee Idea View Hr</field> |
||||
|
<field ref="model_employee_idea" name="model_id"/> |
||||
|
<field name="domain_force"> |
||||
|
[('state', 'in', ['draft', 'post', 'approval', 'rejected'])] |
||||
|
</field> |
||||
|
<field name="groups" eval="[(4, ref('hr.group_hr_user'))]"/> |
||||
|
</record> |
||||
|
</odoo> |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 239 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 767 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 760 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 697 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 10 KiB |