upload new module

This commit is contained in:
eman 2024-08-21 17:02:15 +03:00
parent 1534fff0da
commit f37822679e
16 changed files with 1136 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# This module you will Support for Odoo Open source platform.
# Error control and bug fixes.
# It will process the data entered and return a message indicating whether
# the company is eligible or not.
#
# Copyright (C) 2020- todooweb.com (https://www.todooweb.com)
# @author ToDOO (https://www.linkedin.com/company/todooweb)
#
# 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
{
'name': "System Bugs Management",
'summary': """System Bugs Management""",
'description': """
System Bugs Management. Error control and bug fixes in the Odoo Open source platform
""",
'version': '14.0.0.0.1',
'category': 'Tools',
'license': 'LGPL-3',
'author': "ToDOO (www.todooweb.com)",
'website': "https://todooweb.com/",
'contributors': [
"Equipo Dev <devtodoo@gmail.com>",
"Edgar Naranjo <edgarnaranjof@gmail.com>",
"Tatiana Rosabal <tatianarosabal@gmail.com>",
],
'support': 'devtodoo@gmail.com',
'depends': [
'base',
'project',
],
'data': [
'security/ir.model.access.csv',
'security/management_bug_security.xml',
'views/management_bug.xml',
'data/bugs_data.xml',
],
'images': [
'static/description/screenshot_management_bug.png',
],
'installable': True,
'application': True,
'auto_install': False,
}

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record model="configuration.bug" id="configuration01">
<field name="name">Route log odoo</field>
<field name="active">True</field>
<field name="route">/var/log/odoo</field>
</record>
<record model="project.project" id="project01">
<field name="name">Bugs and Issues</field>
<field name="privacy_visibility">followers</field>
</record>
<record model="team.support" id="support01">
<field name="name">Support Team</field>
</record>
<record model="team.support" id="support02">
<field name="name">Development Team</field>
</record>
<record model="team.support" id="support03">
<field name="name">QA Testing Team</field>
</record>
<!-- ir cron -->
<record id="ir_cron_check_log_odoo" model="ir.cron">
<field name="name">Check Log System Odoo</field>
<field name="model_id" ref="model_management_bug"/>
<field name="state">code</field>
<field name="code">model.action_check_all_bugs()</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">30</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="nextcall" eval="(DateTime.now() + timedelta(minutes=30)).strftime('%Y-%m-%d %H:%M:%S')"/>
<field eval="False" name="doall"/>
</record>
</odoo>

View File

@ -0,0 +1,330 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * management_bugs
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0-20190207\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-06 17:31+0000\n"
"PO-Revision-Date: 2020-04-06 17:31+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_assign_form
#: model:ir.ui.view,arch_db:management_bugs.management_bug_assign_form_me
msgid "Accept"
msgstr "Aceptar"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_active
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_active
msgid "Active"
msgstr "Activo"
#. module: management_bugs
#: selection:management.bug.assign,type_assign:0
msgid "Agent"
msgstr "Agente"
#. module: management_bugs
#: model:ir.ui.menu,name:management_bugs.menu_projects_management_bug
msgid "All Bugs"
msgstr "Listado Bugs"
#. module: management_bugs
#: model:ir.actions.act_window,name:management_bugs.action_management_bug
msgid "All bugs"
msgstr "Listado bugs"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_type_assign
msgid "Assign"
msgstr "Asignar"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_form
#: model:ir.ui.view,arch_db:management_bugs.management_bug_search
#: model:ir.ui.view,arch_db:management_bugs.management_bug_tree
msgid "Bugs"
msgstr "Bugs"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_form
msgid "CLAIM"
msgstr "RECLAMAR"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_assign_form
#: model:ir.ui.view,arch_db:management_bugs.management_bug_assign_form_me
msgid "Cancel"
msgstr "Cancelar"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_code
msgid "Code"
msgstr "Código"
#. module: management_bugs
#: model:ir.model,name:management_bugs.model_configuration_bug
msgid "Configuration Bug"
msgstr "Configuracion Bug"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.configuration_bug_form
#: model:ir.ui.view,arch_db:management_bugs.configuration_bug_search
#: model:ir.ui.view,arch_db:management_bugs.configuration_bug_tree
msgid "Configuration bug"
msgstr "Configuracion bug"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_create_uid
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_create_uid
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_create_uid
#: model:ir.model.fields,field_description:management_bugs.field_team_support_create_uid
msgid "Created by"
msgstr "Creado por"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_create_date
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_create_date
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_create_date
#: model:ir.model.fields,field_description:management_bugs.field_team_support_create_date
msgid "Created on"
msgstr "Creado el"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_date_error
msgid "Date error"
msgstr "Fecha error"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_description
msgid "Description"
msgstr "Descripción"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_display_name
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_display_name
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_display_name
#: model:ir.model.fields,field_description:management_bugs.field_team_support_display_name
msgid "Display Name"
msgstr "Nombre a mostrar"
#. module: management_bugs
#: code:addons/management_bugs/models/bug_digest.py:16
#, python-format
msgid "Do not have access, skip this data for user's digest email"
msgstr "No tiene acceso, omita estos datos para el correo electrónico de resumen del usuario
"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_form
msgid "Document Name"
msgstr "Nombre documento"
#. module: management_bugs
#: selection:management.bug,type_bug:0
msgid "Error"
msgstr "Error"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_hour_error
msgid "Hours"
msgstr "Horas"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_id
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_id
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_id
#: model:ir.model.fields,field_description:management_bugs.field_team_support_id
msgid "ID"
msgstr "ID"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug___last_update
#: model:ir.model.fields,field_description:management_bugs.field_management_bug___last_update
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign___last_update
#: model:ir.model.fields,field_description:management_bugs.field_team_support___last_update
msgid "Last Modified on"
msgstr "Última modificación en"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_write_uid
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_write_uid
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_write_uid
#: model:ir.model.fields,field_description:management_bugs.field_team_support_write_uid
msgid "Last Updated by"
msgstr "Última actualización por"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_write_date
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_write_date
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_write_date
#: model:ir.model.fields,field_description:management_bugs.field_team_support_write_date
msgid "Last Updated on"
msgstr "Última actualización el"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_team_support_leader_id
msgid "Leader"
msgstr "Jefe de equipo"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_line
msgid "Line"
msgstr "Linea"
#. module: management_bugs
#: model:ir.ui.menu,name:management_bugs.menu_projects_all_bugs
msgid "Management Bugs"
msgstr "Administrar Bugs"
#. module: management_bugs
#: model:ir.model,name:management_bugs.model_management_bug
msgid "Management bug"
msgstr "Administrar bug"
#. module: management_bugs
#: model:ir.model,name:management_bugs.model_management_bug_assign
#: model:ir.ui.view,arch_db:management_bugs.management_bug_assign_form
#: model:ir.ui.view,arch_db:management_bugs.management_bug_assign_form_me
#: model:ir.ui.view,arch_db:management_bugs.management_bug_assign_tree
msgid "Management bug assign"
msgstr "Administrar asignacion bug"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_team_support_member_ids
msgid "Members"
msgstr "Socios"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_name
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_name
#: model:ir.model.fields,field_description:management_bugs.field_team_support_name
msgid "Name"
msgstr "Nombre"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_note
msgid "Note"
msgstr "Nota"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_note
msgid "Notes"
msgstr "Notas"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_form
msgid "Other data"
msgstr "Otros datos"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_project_id
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_project_id
msgid "Projects"
msgstr "Proyectos"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_search
#: selection:management.bug,state:0
msgid "Resolved"
msgstr "Resuelta"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_configuration_bug_route
msgid "Route"
msgstr "Ruta"
#. module: management_bugs
#: model:configuration.bug,name:management_bugs.configuration01
msgid "Route log odoo"
msgstr "Ruta log odoo"
#. module: management_bugs
#: model:ir.actions.act_window,name:management_bugs.action_configuration_bug
#: model:ir.ui.menu,name:management_bugs.menu_projects_configuration_bug
msgid "Setting"
msgstr "Configracion"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_state
msgid "Status"
msgstr "Estado"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_form
msgid "TRANSFER / ASIGN"
msgstr "TRANSFERIR / ASIGNAR"
#. module: management_bugs
#: model:ir.model,name:management_bugs.model_project_task
msgid "Task"
msgstr "Tarea"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.team_support_form
msgid "Team Members"
msgstr "Miembros equipo"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_support_id
#: model:ir.model.fields,field_description:management_bugs.field_project_task_support_id
#: selection:management.bug.assign,type_assign:0
msgid "Team Support"
msgstr "Equipo soporte"
#. module: management_bugs
#: model:ir.actions.act_window,name:management_bugs.action_team_support
#: model:ir.model,name:management_bugs.model_team_support
#: model:ir.ui.menu,name:management_bugs.menu_projects_team_support
#: model:ir.ui.view,arch_db:management_bugs.team_support_form
#: model:ir.ui.view,arch_db:management_bugs.team_support_search
#: model:ir.ui.view,arch_db:management_bugs.team_support_tree
msgid "Team support"
msgstr "Equipo soporte"
#. module: management_bugs
#: model:ir.model.fields,help:management_bugs.field_configuration_bug_route
msgid "The path to the file should contain the container folders, Ex: /var/log/.."
msgstr "La ruta al archivo debe contener las carpetas del contenedor, Ej: / var / log / .."
#. module: management_bugs
#: code:addons/management_bugs/models/management_bug.py:230
#, python-format
msgid "The support team does not has a members"
msgstr "El equipo de soporte no tiene miembros"
#. module: management_bugs
#: code:addons/management_bugs/models/management_bug.py:228
#, python-format
msgid "The support team does not has a team leader"
msgstr "El equipo de soporte no tiene una líder de equipo"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_type_bug
msgid "Type Bug"
msgstr "Tipo Bug"
#. module: management_bugs
#: model:ir.ui.view,arch_db:management_bugs.management_bug_search
#: selection:management.bug,state:0
msgid "Unresolved"
msgstr "No resuelta"
#. module: management_bugs
#: model:ir.model.fields,field_description:management_bugs.field_management_bug_assign_user_id
msgid "User"
msgstr "Usuario"
#. module: management_bugs
#: selection:management.bug,type_bug:0
msgid "Warning"
msgstr "Warning"

View File

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import management_bug

View File

@ -0,0 +1,281 @@
# -*- coding: utf-8 -*-
import glob
import os
import shutil
from odoo import api, fields, models, tools, SUPERUSER_ID, _
from odoo.exceptions import UserError, AccessError, ValidationError
class ManagementBug(models.Model):
_name = 'management.bug'
_description = 'Management bug'
_order = 'id'
name = fields.Char(string='Name', required=True, translate=True)
code = fields.Char('Code')
date_error = fields.Date('Date error')
hour_error = fields.Char('Hours')
description = fields.Text('Description')
type_bug = fields.Selection([
('error', 'Error'),
('warning', 'Warning')], 'Type Bug', track_visibility='always', default=lambda self: self._context.get('type', 'warning'))
line = fields.Char('Line')
project_id = fields.Many2one('project.project', 'Projects', track_visibility='onchange')
active = fields.Boolean('Active', default=True)
state = fields.Selection([
('unresolved', 'Unresolved'),
('resolved', 'Resolved')], 'Status', track_visibility='onchage', default='unresolved')
note = fields.Text('Notes')
def read_route_file(self, route):
name_route = ''
if glob.glob(route + '/*'):
list_path = glob.glob(route + '/*.log')
for name in list_path:
separate_name = name.split('/')[-1:]
if separate_name[0] == 'odoo.log':
name_route = name
return name_route
def action_check_all_bugs(self):
dict_error = {
'name': '',
'code': '',
'date_error': False,
'hour_error': False,
'description': '',
'type_bug': False,
'line': ''
}
dict_init = {
'name': '',
'code': '',
'date_error': False,
'hour_error': False,
'description': '',
'type_bug': False,
'line': ''
}
details_line = 0
name_error = 'ERROR-'
name_warn = 'WARNING-'
list_display = []
# data configuration
obj_setting_id = self.env['configuration.bug'].search([('active', '=', True)])
if obj_setting_id:
for obj_setting in obj_setting_id:
route = obj_setting.route
file_touch = self.read_route_file(route)
if file_touch:
# copy log
destination_route = '/tmp/' + 'new_log.log'
if os.path.exists(file_touch):
with open(file_touch, 'rb') as forigen:
with open(destination_route, 'wb') as fdestino:
shutil.copyfileobj(forigen, fdestino)
# read log new
if os.path.exists(destination_route):
file_lines = open(destination_route, 'r')
for line in file_lines:
details_line += 1
count_character = 0
line = line.split(' ')
if 'ERROR' in line or 'WARNING' in line:
dict_error['date_error'] = line[0]
dict_error['hour_error'] = line[1]
dict_error['code'] = line[2]
dict_error['description'] = line[-1]
dict_error['line'] = details_line
if 'ERROR' in line:
dict_error['name'] = name_error + line[2]
dict_error['type_bug'] = 'error'
for i in line:
list_display = line
if i != 'ERROR':
count_character += 1
if count_character <= 4:
list_display.pop(0)
dict_error['description'] = " ".join(list_display)
else:
dict_error['name'] = name_warn + line[2]
dict_error['type_bug'] = 'warning'
for i in line:
list_display = line
if i != 'WARNING':
count_character += 1
if count_character <= 4:
list_display.pop(0)
dict_error['description'] = " ".join(list_display)
create_bug = self.env['management.bug']
# create model (data)
if len(dict_error) > 0:
# eliminar los que tengan valor False
dict_error = dict(filter(lambda x: x[1] != False, dict_error.items()))
# crear bug
create_bug.create(dict_error)
dict_error.update(dict_init)
# delete new log
file_lines.close()
os.remove(destination_route)
def action_claim_bug(self):
self.ensure_one()
ir_model_data = self.env['ir.model.data']
try:
compose_form_id = ir_model_data.get_object_reference('management_bugs', 'management_bug_assign_form_me')[1]
except ValueError:
compose_form_id = False
return {
"name": "Claim a Bugs",
"view_type": "form",
"view_mode": "form",
"res_model": "management.bug.assign",
"type": "ir.actions.act_window",
'view_id': compose_form_id,
'target': 'new',
}
def action_to_assign_bug(self):
self.ensure_one()
ir_model_data = self.env['ir.model.data']
try:
compose_form_id = ir_model_data.get_object_reference('management_bugs', 'management_bug_assign_form')[1]
except ValueError:
compose_form_id = False
return {
"name": "Transfer or Assign",
"view_type": "form",
"view_mode": "form",
"res_model": "management.bug.assign",
"type": "ir.actions.act_window",
'view_id': compose_form_id,
'target': 'new',
}
class ConfigurationBug(models.Model):
_name = "configuration.bug"
_description = "Configuration Bug"
name = fields.Char(string='Name', required=True, translate=True)
active = fields.Boolean('Active')
route = fields.Char('Route', required=True, help='The path to the file should contain the container folders, Ex: /var/log/..')
@api.constrains('route')
def _add_constrains_fields(self):
if self.route:
if not self.route == '/var/log/odoo':
raise ValidationError("The route of the file should are '/var/log/odoo' .")
class ManagementBugAssign(models.TransientModel):
_name = "management.bug.assign"
_description = "Management bug assign"
_rec_name = 'type_assign'
type_assign = fields.Selection([
('agent', 'Agent'),
('team', 'Team Support')], 'Assign', track_visibility='onchage', default='agent', required=True, index=True)
user_id = fields.Many2one('res.users', 'User')
support_id = fields.Many2one('team.support', 'Team Support')
project_id = fields.Many2one('project.project', 'Projects', track_visibility='onchange')
note = fields.Text('Note')
def action_do_transfer(self):
self.ensure_one()
dict_task = {
'name': '',
'project_id': '',
'user_id': '',
'support_id': '',
'description': ''
}
name_task = ''
active_bug_ids = self.env.context.get('active_ids', [])
for bug in self.env['management.bug'].sudo().browse(active_bug_ids):
# make sure that each bug appears at most once in the list
if self.note:
if not bug.note:
bug.note = ''
bug.note += str(self.env.user.name) + ': ' + self.note + ' \n' + ' \n'
create_task = self.env['project.task']
if bug.type_bug:
if bug.type_bug == 'error':
name_task = '[Develop] ' + bug.name
if bug.type_bug == 'warning':
name_task = '[Support] ' + bug.name
dict_task['name'] = name_task
if self.project_id:
for project in self.env['project.project'].sudo().browse(self.project_id):
dict_task['project_id'] = project.id['id']
if self.project_id.user_id:
obj_support_id = self.env['team.support'].search([('leader_id', '=', self.project_id.user_id.id)])
if obj_support_id:
for support in obj_support_id:
list_members = support.member_ids
if list_members:
if self.user_id in list_members:
if self.type_assign == 'agent':
dict_task['user_id'] = self.user_id.id
dict_task['support_id'] = support.id
# else:
# raise UserError(_('The support team does not has a team leader'))
# else:
# raise UserError(_('The support team does not has a members'))
if self.support_id:
obj_support_id = self.env['team.support'].search([('id', '=', self.support_id.id)])
if obj_support_id:
for obj_support in obj_support_id:
dict_task['support_id'] = obj_support.id
dict_task['user_id'] = self.project_id.user_id.id
dict_task['description'] = bug.description
create_task.create(dict_task)
bug.state = 'resolved'
def action_do_claim(self):
self.ensure_one()
dict_task = {
'name': '',
'project_id': '',
'user_id': '',
'description': ''
}
name_task = ''
active_bug_ids = self.env.context.get('active_ids', [])
for bug in self.env['management.bug'].sudo().browse(active_bug_ids):
# make sure that each bug appears at most once in the list
if self.note:
if not bug.note:
bug.note = ''
bug.note += str(self.env.user.name) + ': ' + self.note + ' \n' + ' \n'
create_task = self.env['project.task']
if bug.type_bug:
if bug.type_bug == 'error':
name_task = '[Develop] ' + bug.name
if bug.type_bug == 'warning':
name_task = '[Support] ' + bug.name
dict_task['name'] = name_task
if self.project_id:
for project in self.env['project.project'].sudo().browse(self.project_id):
dict_task['project_id'] = project.id['id']
dict_task['user_id'] = self.env.user.id
dict_task['description'] = bug.description
create_task.create(dict_task)
bug.state = 'resolved'
class TeamSupport(models.Model):
_name = 'team.support'
_description = 'Team support'
name = fields.Char('Name', index=True, required=True)
leader_id = fields.Many2one('res.users', 'Leader')
member_ids = fields.Many2many('res.users', 'team_user_support_rel', 'support_id', 'user_id', 'Members')
class Task(models.Model):
_inherit = "project.task"
support_id = fields.Many2one('team.support', 'Team Support')

View File

@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_management_bug,access_management_bug,model_management_bug,project.group_project_manager,1,1,1,1
access_configuration_bug,access_configuration_bug,model_configuration_bug,project.group_project_manager,1,1,1,1
access_team_support,access_team_support,model_team_support,project.group_project_manager,1,1,1,1
access_management_bug_assign,access_management_bug_assign,model_management_bug_assign,project.group_project_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_management_bug access_management_bug model_management_bug project.group_project_manager 1 1 1 1
3 access_configuration_bug access_configuration_bug model_configuration_bug project.group_project_manager 1 1 1 1
4 access_team_support access_team_support model_team_support project.group_project_manager 1 1 1 1
5 access_management_bug_assign access_management_bug_assign model_management_bug_assign project.group_project_manager 1 1 1 1

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Rules -->
<record id="management_bug_rule_all_user" model="ir.rule">
<field name="name">Management bug all user</field>
<field name="model_id" ref="model_management_bug"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('project.group_project_manager'))]"/>
</record>
<record id="configuration_bug_rule_all_user" model="ir.rule">
<field name="name">Configuration bug all user</field>
<field name="model_id" ref="model_configuration_bug"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('project.group_project_manager'))]"/>
</record>
<record id="team_support_rule_all_user" model="ir.rule">
<field name="name">Team Support all user</field>
<field name="model_id" ref="model_team_support"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('project.group_project_manager'))]"/>
</record>
<record id="model_management_bug_assign_all_user" model="ir.rule">
<field name="name">Management Bug Assign all user</field>
<field name="model_id" ref="model_management_bug_assign"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('project.group_project_manager'))]"/>
</record>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<h1 class="text-center">Management System Bugs. Error control and bug fixes in the Odoo Open source platform.</h1>
<hr>
<div>
<p class="lead">For this module helps to manage bugs in "Project" module:</p>
<ul>
<li>Offers the ability to keep track of the bug.</li>
<li>You can see number of bugs assigned to the employee.</li>
<li>The automatics task generate and contact.</li>
<li>Manage team support and members.</li>
<li>A cron that runs every 30 min reading the odoo ".log".</li>
<li>Classify bugs into "error" and "warning".</li>
<li>Bugs are generated in the "All bugs" menu.</li>
<li>Once the bugs are generated, the tasks corresponding to a support team or agent are generated.</li>
<li>You can "Transfer", "Assign" or "Claim" a bug. Generating a new task associated with a Support Team or Agent.</li>
</ul>
</div>
<br/>
<div>
<p class="lead"><b>Key Features:</b></p>
<ul>
<li>Issues</li>
<li>Stages</li>
<li>Bugs assigned to employee in kanban and tree view</li>
</ul>
</div>
<br/>
<div style="background-color:#dbecf0">
<a href="https://apps.odoo.com/apps/modules/browse?author=ToDOO%20(www.todooweb.com)" target="_blank" style="padding-top: 10px;padding-right: 30px;padding-bottom: 10px;padding-left: 30px;"><h3 class="oe_slogan">Click for more APPS</h3></a>
</div>
<div>
<h3 class="oe_slogan">Our Services</h3>
</div>
<div style=" display: flex; padding-top: 10px; justify-content: space-between;" class="oe_slogan">
<div style="flex-basis: 15%;">
<a href="https://todooweb.com" target="_blank"><div><img class="img-responsive left-block" src="odoo-customization.png"></div>
<h3 class="oe_slogan">Odoo Customization</h3></a>
</div>
<div style="flex-basis: 15%;">
<a href="https://todooweb.com" target="_blank"><div><img class="img-responsive left-block" src="odoo-integration.png"></div>
<h3 class="oe_slogan">Odoo Integration</h3></a>
</div>
<div style="flex-basis: 15%;">
<a href="https://todooweb.com" target="_blank"><div><img class="img-responsive left-block" src="odoo-implementation.png"></div>
<h3 class="oe_slogan">Odoo Implementation</h3></a>
</div>
</div>
<br/>
<div>
<h3 class="oe_slogan">Help and Support</h3>
<h5 class="oe_slogan" style="font-size: 20px;">Feel free to contact us, if you need any help with your Odoo integration or addiontal features.</h5>
<div class="oe_slogan">
<a class="btn btn-primary btn-lg mt8" href="https://todooweb.com/" target="_blank">
<i class="fa fa-globe"></i> Website
</a>
<a class="btn btn-primary btn-lg mt8" href="mailto:devtodoo@gmail.com">
<i class="fa fa-envelope"></i> Contact Us
</a>
<a class="btn btn-primary btn-lg mt8" href="https://github.com/todooweb" target="_blank">
<i class="fa fa-github"></i> Issues
</a>
</div>
<img src="logo.png" style="width: 200px; margin-bottom: 20px; display: block;" class="mx-auto center-block">
</div>
</body>
<footer>
<hr>
<p class="text-center">
Power by <a href="https://todooweb.com/" title="Develop ToDOO">Develop ToDOO</a> from <a href="https://todooweb.com/" title="ToDOO">ToDOO</a>
</p>
</footer>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -0,0 +1,316 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!--Project form inherit-->
<record id="project_project_inherit_form" model="ir.ui.view">
<field name="name">project.project.inherit.form</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="attributes">
<attribute name="required">True</attribute>
</xpath>
</field>
</record>
<!--task form inherit-->
<record id="project_task_inherit_form" model="ir.ui.view">
<field name="name">project.task.inherit.form</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="after">
<field name="support_id" options='{"no_create": True}'/>
</xpath>
</field>
</record>
<!-- View Form management.bug -->
<record model="ir.ui.view" id="management_bug_form">
<field name="name">management.bug.form</field>
<field name="model">management.bug</field>
<field name="arch" type="xml">
<form string="Bugs">
<header>
<button name="action_to_assign_bug" string="TRANSFER / ASIGN" type="object" class="oe_highlight" attrs="{'invisible': ['|', ('state','=','resolved'), ('project_id', '=', False)]}"/>
<button name="action_claim_bug" string="CLAIM" type="object" attrs="{'invisible': ['|', ('state','=','resolved'), ('project_id', '=', False)]}"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options="{&quot;terminology&quot;: &quot;archive&quot;}"/>
</button>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" placeholder="Document Name" required="True"/></h1>
</div>
<group name="group_general">
<group name="group_f">
<field name="code"/>
<field name="type_bug"/>
<field name="project_id" options='{"no_create": True}' required="True"/>
</group>
<group name="group_s">
<field name="date_error"/>
<field name="hour_error"/>
<field name="line"/>
</group>
<field name="description" readonly="True"/>
</group>
<notebook>
<page string="Other data">
<field name="note" readonly="True"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- View Tree management.bug -->
<record model="ir.ui.view" id="management_bug_tree">
<field name="name">management.bug.tree</field>
<field name="model">management.bug</field>
<field name="arch" type="xml">
<tree string="Bugs" decoration-primary="state=='unresolved'" decoration-danger="state=='unresolved' and project_id==False">
<field name="name"/>
<field name="code"/>
<field name="type_bug"/>
<field name="project_id"/>
<field name="date_error"/>
<field name="hour_error"/>
<field name="line"/>
<field name="state"/>
<field name="create_date"/>
</tree>
</field>
</record>
<!-- View search management.bug -->
<record model="ir.ui.view" id="management_bug_search">
<field name="name">management.bug.search</field>
<field name="model">management.bug</field>
<field name="arch" type="xml">
<search string="Bugs">
<field name="name"/>
<field name="code"/>
<field name="type_bug"/>
<field name="project_id"/>
<field name="date_error"/>
<field name="hour_error"/>
<field name="line"/>
<filter string="Unresolved" domain="[('state', '=', 'unresolved')]" name="unresolved"/>
<filter string="Resolved" domain="[('state', '=', 'resolved')]" name="resolved"/>
</search>
</field>
</record>
<record id="action_management_bug" model="ir.actions.act_window">
<field name="name">All bugs</field>
<field name="res_model">management.bug</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="management_bug_search"/>
<field name="context">{'search_default_unresolved': 1}</field>
</record>
<!-- View Form configuration.bug -->
<record model="ir.ui.view" id="configuration_bug_form">
<field name="name">configuration.bug.form</field>
<field name="model">configuration.bug</field>
<field name="arch" type="xml">
<form string="Configuration bug">
<sheet>
<group>
<group>
<field name="name"/>
<field name="route"/>
</group>
<group>
<field name="active"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<!-- View Tree configuration.bug -->
<record model="ir.ui.view" id="configuration_bug_tree">
<field name="name">configuration.bug.tree</field>
<field name="model">configuration.bug</field>
<field name="arch" type="xml">
<tree string="Configuration bug">
<field name="name"/>
<field name="route"/>
<field name="active"/>
</tree>
</field>
</record>
<!-- View search configuration.bug -->
<record model="ir.ui.view" id="configuration_bug_search">
<field name="name">configuration.bug.search</field>
<field name="model">configuration.bug</field>
<field name="arch" type="xml">
<search string="Configuration bug">
<field name="name"/>
</search>
</field>
</record>
<record id="action_configuration_bug" model="ir.actions.act_window">
<field name="name">Setting</field>
<field name="res_model">configuration.bug</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="configuration_bug_search"/>
</record>
<!-- View Form management.bug.assign -->
<record model="ir.ui.view" id="management_bug_assign_form">
<field name="name">management.bug.assign.form</field>
<field name="model">management.bug.assign</field>
<field name="arch" type="xml">
<form string="Management bug assign">
<sheet>
<group>
<group>
<field name="type_assign"/>
<field name="user_id" options='{"no_create": True}' attrs="{'invisible': [('type_assign', '=', 'team')], 'required': [('type_assign', '=', 'agent')]}"/>
<field name="support_id" options='{"no_create": True}' attrs="{'invisible': [('type_assign', '=', 'agent')], 'required': [('type_assign', '=', 'team')]}"/>
</group>
<group>
<field name="project_id" required="True" options='{"no_create": True}'/>
</group>
<field name="note"/>
</group>
</sheet>
<footer>
<button type="object" name="action_do_transfer" string="Accept" class="oe_highlight o_wow"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<!-- View Form management.bug.assign me -->
<record model="ir.ui.view" id="management_bug_assign_form_me">
<field name="name">management.bug.assign.me.form</field>
<field name="model">management.bug.assign</field>
<field name="arch" type="xml">
<form string="Management bug assign">
<sheet>
<group>
<group>
<field name="project_id" required="True" options='{"no_create": True}'/>
</group>
<group>
</group>
<field name="note"/>
</group>
</sheet>
<footer>
<button type="object" name="action_do_claim" string="Accept" class="oe_highlight o_wow"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<!-- View Tree management.bug.assign -->
<record model="ir.ui.view" id="management_bug_assign_tree">
<field name="name">management.bug.assign.tree</field>
<field name="model">management.bug.assign</field>
<field name="arch" type="xml">
<tree string="Management bug assign">
<field name="type_assign"/>
</tree>
</field>
</record>
<!-- View Form team support -->
<record model="ir.ui.view" id="team_support_form">
<field name="name">team.support.form</field>
<field name="model">team.support</field>
<field name="arch" type="xml">
<form string="Team support">
<sheet>
<group>
<group>
<field name="name"/>
</group>
<group>
<field name="leader_id" options="{'no_create': True}"/>
</group>
</group>
<notebook>
<page name="members" string="Team Members">
<field name="member_ids" widget="many2many_kanban" options="{'not_delete': True}">
<kanban quick_create="false" create="true" delete="true">
<field name="name"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click" style="position: relative">
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
<div class="oe_module_vignette">
<!--<img t-att-src="kanban_image('res.users', 'image_small', record.id.value)" class="oe_avatar oe_kanban_avatar_smallbox"/>-->
<div class="oe_module_desc">
<field name="name"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- View Tree team support -->
<record model="ir.ui.view" id="team_support_tree">
<field name="name">team.support.tree</field>
<field name="model">team.support</field>
<field name="arch" type="xml">
<tree string="Team support">
<field name="name"/>
<field name="leader_id"/>
</tree>
</field>
</record>
<!-- View search team support -->
<record model="ir.ui.view" id="team_support_search">
<field name="name">team.support.search</field>
<field name="model">team.support</field>
<field name="arch" type="xml">
<search string="Team support">
<field name="name"/>
<field name="leader_id"/>
</search>
</field>
</record>
<record id="action_team_support" model="ir.actions.act_window">
<field name="name">Team support</field>
<field name="res_model">team.support</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="team_support_search"/>
</record>
<!--menu-->
<menuitem id="menu_projects_all_bugs" name="Management Bugs" parent="project.menu_main_pm" sequence="10"/>
<menuitem id="menu_projects_management_bug" sequence="1" name="All Bugs" parent="menu_projects_all_bugs" action="action_management_bug"/>
<menuitem id="menu_projects_team_support" sequence="2" name="Team support" parent="menu_projects_all_bugs" action="action_team_support"/>
<menuitem id="menu_projects_configuration_bug" sequence="3" name="Setting" parent="menu_projects_all_bugs" action="action_configuration_bug"/>
</odoo>