diff --git a/legal_case_management/README.rst b/legal_case_management/README.rst new file mode 100644 index 000000000..5e3eb8999 --- /dev/null +++ b/legal_case_management/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Legal Case Management +======================= +This module helps to manage all process of a legal case management firm. +In this way we can register a case and add their evidence, trial and payment also. +Assign the lawyers based on the wages and per case + +Configuration +============= +The user should be added to the security group: Admin(Settings/Users/Other/Case Management) inorder to get access to the new menu. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Credits +------- +Developer: LAJINA K V @cybrosys, + MOHAMMED DILSHAD TK @cybrosys + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/legal_case_management/__init__.py b/legal_case_management/__init__.py new file mode 100644 index 000000000..ecd523ffe --- /dev/null +++ b/legal_case_management/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from . import controllers +from . import models +from . import report +from . import wizard diff --git a/legal_case_management/__manifest__.py b/legal_case_management/__manifest__.py new file mode 100644 index 000000000..7a05ac739 --- /dev/null +++ b/legal_case_management/__manifest__.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@cybrosys.com) +# MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +{ + 'name': "Legal Case Management", + 'version': '16.0.1.0.0', + 'category': 'Industries', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'summary': 'Legal Case Management for odoo 16. This module will helps ' + 'to manage a legal case management firm. This will allows to ' + 'manage all details of case sucha as evidence, trial and overall' + ' payment of a case', + 'description': 'This module helps to manage all process of a legal case' + ' management firm.In this way we can register a case and add' + 'their evidence, trial and payment also. Assign the lawyers' + ' based on the wages and per case ', + 'depends': ['base', 'hr', 'contacts', 'account', 'website', 'mail'], + 'data': [ + 'security/legal_case_management_groups.xml', + 'security/legal_case_management_security.xml', + 'security/ir.model.access.csv', + 'data/case_register_menu.xml', + 'data/ir_sequence_data.xml', + 'wizard/invoice_payment_views.xml', + 'wizard/full_settlement_views.xml', + 'wizard/legal_case_report_views.xml', + 'views/legal_case_management_menus.xml', + 'report/case_registration_reports.xml', + 'report/case_registration_templates.xml', + 'report/case_registration_form_report_templates.xml', + 'report/legal_evidence_templates.xml', + 'report/legal_trial_report_templates.xml', + 'views/case_registration_views.xml', + 'views/hr_employee_views.xml', + 'views/res_partner_views.xml', + 'views/legal_evidence_views.xml', + 'views/legal_trial_views.xml', + 'views/legal_court_views.xml', + 'views/case_category_views.xml', + 'views/case_register_portal_template.xml', + 'views/case_register_template.xml', + 'views/account_move_views.xml', + 'views/thanks_template.xml', + 'views/legal_case_page_template.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True +} diff --git a/legal_case_management/controllers/__init__.py b/legal_case_management/controllers/__init__.py new file mode 100644 index 000000000..4257bad7f --- /dev/null +++ b/legal_case_management/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Lajina (odoo@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 . +# +############################################################################### +from . import legal_case_management +from . import portal diff --git a/legal_case_management/controllers/legal_case_management.py b/legal_case_management/controllers/legal_case_management.py new file mode 100644 index 000000000..20bd06e98 --- /dev/null +++ b/legal_case_management/controllers/legal_case_management.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Lajina (odoo@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 . +# +############################################################################### +import base64 + +from odoo import http +from odoo.http import request + + +class LegalCaseController(http.Controller): + """Legal Case Controller""" + @http.route('/legal/case/register', type="http", auth="user", website=True) + def legal_case_register(self): + """ Returns Case Registration Form""" + return request.render( + 'legal_case_management.legal_case_register_view') + + @http.route('/submit/create/case', type='http', website=True, auth='user') + def create_case_register(self, **kw): + """Creation of Cases""" + attached_files = request.httprequest.files.getlist('attachments') + case = request.env['case.registration'].sudo().create({ + 'client_id': request.env.user.partner_id.id, + 'email': request.env.user.partner_id.email, + 'contact_no': kw['contact'], + 'description': kw['description'], + 'case_category_id': int(kw['case_category']), + 'company_id': request.env.company.id, + }) + for attachment in attached_files: + request.env['ir.attachment'].sudo().create({ + 'name': attachment.filename, + 'res_model': 'case.registration', + 'res_id': case.id, + 'type': 'binary', + 'datas': base64.b64encode(attachment.read()) + }) + return request.render("legal_case_management.thanks_page") diff --git a/legal_case_management/controllers/portal.py b/legal_case_management/controllers/portal.py new file mode 100644 index 000000000..da661ee29 --- /dev/null +++ b/legal_case_management/controllers/portal.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Lajina (odoo@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 . +# +############################################################################### +from odoo.addons.portal.controllers.portal import CustomerPortal + +from odoo import http +from odoo.http import request + + +class PortalLegalCase(CustomerPortal): + """Customer Portal""" + + def _prepare_home_portal_values(self, counters): + """Returns the portal values""" + values = super()._prepare_home_portal_values(counters) + if 'case_count' in counters: + values['case_count'] = request.env[ + 'case.registration'].sudo().search_count( + [('state', '!=', 'invoiced'), + ('client_id.id', '=', request.env.user.partner_id.id)]) \ + if request.env['case.registration'].sudo(). \ + check_access_rights('read', raise_exception=False) else 0 + return values + + @http.route('/my/legal/case', + type='http', auth="user", website=True) + def legal_cases(self): + """Returns the case Records""" + records = request.env['case.registration'].sudo(). \ + search([('client_id', '=', request.env.user.partner_id.id)]) + values = { + 'records': records, + 'page_name': 'case' + } + return request.render( + "legal_case_management.portal_my_legal_case_requests", + values) + + @http.route(['/my/cases/'], type='http', auth="public", + website=True) + def portal_my_details_detail(self, case_id): + """ Returns the Portal details""" + case_record = request.env['case.registration'].sudo().browse(case_id) + evidences = request.env['legal.evidence'].sudo().search( + [('client_id', '=', case_record.client_id.id), + ('case_id', '=', case_record.id)]) + trials = request.env['legal.trial'].sudo().search( + [('client_id', '=', case_record.client_id.id), + ('case_id', '=', case_record.id)]) + records = { + 'case_record': case_record, + 'evidence': evidences, + 'trial': trials, + 'page_name': 'case' + } + return request.render("legal_case_management.portal_legal_case_page", + records) diff --git a/legal_case_management/data/case_register_menu.xml b/legal_case_management/data/case_register_menu.xml new file mode 100644 index 000000000..6c0d0eb84 --- /dev/null +++ b/legal_case_management/data/case_register_menu.xml @@ -0,0 +1,12 @@ + + + + + + Legal Case + /legal/case/register + + 30 + + + diff --git a/legal_case_management/data/ir_sequence_data.xml b/legal_case_management/data/ir_sequence_data.xml new file mode 100644 index 000000000..b1fd0b21d --- /dev/null +++ b/legal_case_management/data/ir_sequence_data.xml @@ -0,0 +1,24 @@ + + + + + + Case Sequence + case_registration + CASE000 + + + + Case Evidence Sequence + case_evidence + EV000 + + + + Legal Case Sequence + legal_trial + TR000 + + + + diff --git a/legal_case_management/doc/RELEASE_NOTES.md b/legal_case_management/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..9aef8b6f4 --- /dev/null +++ b/legal_case_management/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 27.07.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Legal Case Management \ No newline at end of file diff --git a/legal_case_management/models/__init__.py b/legal_case_management/models/__init__.py new file mode 100644 index 000000000..eb1c8007a --- /dev/null +++ b/legal_case_management/models/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +from . import account_move +from . import case_category +from . import case_registration +from . import case_sitting +from . import case_victim +from . import hr_employee +from . import legal_court +from . import legal_evidence +from . import legal_trial +from . import res_partner diff --git a/legal_case_management/models/account_move.py b/legal_case_management/models/account_move.py new file mode 100644 index 000000000..c8f07a9c3 --- /dev/null +++ b/legal_case_management/models/account_move.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +from odoo import fields, models + + +class AccountMove(models.Model): + """Inherit account move""" + _inherit = 'account.move' + + case_ref = fields.Char(readonly=True, string='Case Reference', + help='It is used to identify the case reference') diff --git a/legal_case_management/models/case_category.py b/legal_case_management/models/case_category.py new file mode 100644 index 000000000..d7ea3d26e --- /dev/null +++ b/legal_case_management/models/case_category.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class CaseCategory(models.Model): + """Create case category""" + _name = 'case.category' + _description = 'Case Category' + + name = fields.Char("Case Category", required=True, + help='Name of the case category') + + @api.ondelete(at_uninstall=False) + def _unlink_except_draft_or_cancel(self): + """ Prevent the deletion of a case category if it is used in any + cases. """ + cases = self.sudo().env['case.registration'].search_count([ + ('case_category_id', 'in', self.ids), + ('state', 'not in', ['draft']) + ]) + if cases: + raise UserError(_("You can not delete a case category," + " because it is used in case")) diff --git a/legal_case_management/models/case_registration.py b/legal_case_management/models/case_registration.py new file mode 100644 index 000000000..0fe7d650d --- /dev/null +++ b/legal_case_management/models/case_registration.py @@ -0,0 +1,317 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +from odoo import api, fields, models, _ +from odoo.exceptions import UserError, ValidationError + + +class CaseRegistration(models.Model): + """Case registration and invoice for trials and case""" + _name = 'case.registration' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Case Register' + + name = fields.Char('Case No', readonly=True, default=lambda self: _('New'), + help='Case number') + client_id = fields.Many2one('res.partner', string='Client', required=True, + help='Clients in the law firm') + email = fields.Char(related="client_id.email", required=True, string='Email', + help='Email of client', readonly=False) + contact_no = fields.Char(related="client_id.phone", required=True, + string='Contact No', readonly=False) + payment_method = fields.Selection(selection=[ + ('trial', "Per Trial"), + ('case', "Per Case"), + ('out_of_court', "Out of Court")], string='Payment Method', + states={'draft': [('invisible', True)]}) + lawyer_wage = fields.Char(invisible=True) + lawyer_id = fields.Many2one('hr.employee', string='Lawyer', + domain=[('is_lawyer', '=', True), + ('parent_id', '=', False)], + help="Lawyers in the law firm") + lawyer_unavailable = fields.Boolean(default=False) + junior_lawyer_id = fields.Many2one('hr.employee', string='Junior Lawyer', + help='Juniors lawyers in the law firm') + court_id = fields.Many2one('legal.court', string='Court', + help="Name of courts") + court_no_required = fields.Boolean(help='Makes court as Not required field', + default=True) + judge_id = fields.Many2one(related='court_id.judge_id', string='Judge', + store=True, help="Available judges") + register_date = fields.Date('Registration Date', required=True, + default=fields.Date.today, + help='Case registration date') + start_date = fields.Date('Start Date', default=fields.Date.today) + end_date = fields.Date('End Date') + case_category_id = fields.Many2one('case.category', 'Case Category', + required=True, + help="Category of case") + description = fields.Html('Description', required=True, + help="Case Details") + opposition_name = fields.Char('Name', help="Name of Opposite Party") + opposite_lawyer = fields.Char('Lawyer', help="Name of opposite Lawyer") + opp_party_contact = fields.Char('Contact No') + victim_ids = fields.One2many('case.victim', 'registration_id', + help="List of Victims") + sitting_detail_ids = fields.One2many('case.sitting', 'case_id') + evidence_count = fields.Integer(compute='_compute_evidence_count', + help="Count of evidence") + case_attachment_count = fields.Integer( + compute='_compute_case_attachment_count', + help="Count of attachments") + trial_count = fields.Integer(compute='_compute_trial_count', + help="Count of trials") + invoice_count = fields.Integer(compute='_compute_invoice_count', + help="Count of Invoices") + state = fields.Selection( + [('draft', 'Draft'), ('in_progress', 'In Progress'), + ('invoiced', 'Invoiced'), ('reject', 'Reject'), + ('won', 'Won'), ('lost', 'Lost'), ('cancel', 'Cancel')], + string='State', default='draft') + company_id = fields.Many2one("res.company", string="Company", + default=lambda self: self.env.company, + readonly=True) + + @api.onchange('payment_method') + def _onchange_payment_method(self): + """Court not required based on, + - if payment method = out of court + - if invoice through full settlement""" + if self.payment_method == 'out_of_court': + self.court_no_required = False + else: + self.court_no_required = True + + @api.onchange('lawyer_id') + def _onchange_lawyer_id(self): + """lawyer unavailable warning and lists his juniors""" + cases = self.sudo().search( + [('lawyer_id', '=', self.lawyer_id.id), ('state', '!=', 'draft'), + ('id', '!=', self._origin.id)]) + self.lawyer_id.not_available = False + self.lawyer_unavailable = False + if self.lawyer_id: + for case in cases: + if case.end_date and case.end_date <= fields.Date.today(): + self.lawyer_id.not_available = False + self.lawyer_unavailable = False + else: + self.lawyer_id.not_available = True + self.lawyer_unavailable = True + break + if self.lawyer_unavailable: + return { + 'warning': { + 'title': 'Lawyer Unavailable', + 'message': 'The selected lawyer is unavailable ' + 'at this time.' + 'You can choose his juniors.', + }, + 'domain': { + 'junior_lawyer_id': [('parent_id', '=', + self.lawyer_id.id), + ('is_lawyer', '=', True)], + }, + } + + @api.ondelete(at_uninstall=False) + def _unlink_except_draft_or_cancel(self): + """ Records can be deleted only draft and cancel state""" + case_records = self.filtered( + lambda x: x.state not in ['draft', 'cancel']) + if case_records: + raise UserError(_( + "You can not delete a Approved Case." + " You must first cancel it.")) + + def action_full_settlement(self): + """Returns the full settlement view""" + self.court_no_required = False + return { + 'type': 'ir.actions.act_window', + 'res_model': 'full.settlement', + 'view_mode': 'form', + 'target': 'new', + 'context': {'default_case_id': self.id} + } + + def action_cancel(self): + """State changed to cancel""" + self.write({'state': 'cancel'}) + self.lawyer_id.not_available = False + self.end_date = fields.Date.today() + + def action_reset_to_draft(self): + """ Stage reset to draft""" + self.write({'state': 'draft'}) + + def action_confirm(self): + """Confirmation of Cases""" + if self.name == 'New': + self.name = self.env['ir.sequence']. \ + next_by_code('case_registration') or 'New' + self.state = 'in_progress' + + def action_reject(self): + """Rejection of Cases""" + self.write({'state': 'reject'}) + + def validation_case_registration(self): + """Show Validation Until The Lawyer Details are Filled""" + if not self.lawyer_id: + raise ValidationError(_( + """Please assign a lawyer for the case""" + )) + + def action_invoice(self): + """button method to show invoice wizard""" + if not self.payment_method: + raise ValidationError(_( + """Please select a payment method for create invoice""" + )) + if self.payment_method == 'case': + self.lawyer_wage = self.lawyer_id.wage_per_case + elif self.payment_method == 'trial': + self.lawyer_wage = self.lawyer_id.wage_per_trial + else: + self.lawyer_wage = '' + self.validation_case_registration() + return { + 'name': 'Create Invoice', + 'type': 'ir.actions.act_window', + 'res_model': 'invoice.payment', + 'view_mode': 'form', + 'target': 'new', + 'context': {'default_case_id': self.id, + 'default_cost': self.lawyer_wage} + } + + def action_evidence(self): + """Button to add evidence""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Evidence', + 'view_mode': 'form', + 'res_model': 'legal.evidence', + 'context': {'default_case_id': self.id, + 'default_client_id': self.client_id.id} + } + + def get_attachments(self): + """Show attachments in smart tab which added in chatter""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Attachment', + 'view_mode': 'kanban,form', + 'res_model': 'ir.attachment', + 'domain': [('res_id', '=', self.id), + ('res_model', '=', self._name)], + 'context': {'create': False} + } + + def _compute_case_attachment_count(self): + """Compute the count of attachments""" + for attachment in self: + attachment.case_attachment_count = self.env['ir.attachment']. \ + sudo().search_count([('res_id', '=', self.id), + ('res_model', '=', self._name)]) + + def action_won(self): + """Changed to won state""" + self.state = 'won' + self.end_date = fields.Date.today() + self.lawyer_id.not_available = False + + def action_lost(self): + """Changed to lost state""" + self.state = 'lost' + self.end_date = fields.Date.today() + self.lawyer_id.not_available = False + + def _compute_evidence_count(self): + """Computes the count of evidence""" + for case in self: + case.evidence_count = case.env['legal.evidence'].search_count( + [('client_id', '=', self.client_id.id), + ('case_id', '=', self.id)]) + + def _compute_trial_count(self): + """Compute the count of trials""" + for case in self: + case.trial_count = case.env['legal.trial']. \ + search_count([('client_id', '=', self.client_id.id), + ('case_id', '=', self.id)]) + + def action_trial(self): + """Button to add trial""" + self.validation_case_registration() + return { + 'type': 'ir.actions.act_window', + 'name': 'Trial', + 'view_mode': 'form', + 'res_model': 'legal.trial', + 'context': {'default_case_id': self.id, + 'default_client_id': self.client_id.id} + } + + def _compute_invoice_count(self): + """Calculate the count of invoices""" + for inv in self: + inv.invoice_count = self.env['account.move'].search_count( + [('case_ref', '=', self.name)]) + + def get_invoice(self): + """Get the corresponding invoices""" + return { + 'name': 'Case Invoice', + 'type': 'ir.actions.act_window', + 'view_mode': 'tree,form', + 'res_model': 'account.move', + 'domain': [('case_ref', '=', self.name)], + } + + def get_evidence(self): + """Returns the evidences""" + evidence_ids_list = self.env['legal.evidence']. \ + search([('client_id', '=', self.client_id.id), + ('case_id', '=', self.id)]).ids + return { + 'type': 'ir.actions.act_window', + 'name': 'Evidence', + 'view_mode': 'tree,form', + 'res_model': 'legal.evidence', + 'domain': [('id', 'in', evidence_ids_list)], + 'context': "{'create': False}" + } + + def get_trial(self): + """Returns the Trials""" + trial_ids_list = self.env['legal.trial']. \ + search([('client_id', '=', self.client_id.id), + ('case_id', '=', self.id)]).ids + return { + 'type': 'ir.actions.act_window', + 'name': 'Trial', + 'view_mode': 'tree,form', + 'res_model': 'legal.trial', + 'domain': [('id', 'in', trial_ids_list)], + 'context': "{'create': False}" + } diff --git a/legal_case_management/models/case_sitting.py b/legal_case_management/models/case_sitting.py new file mode 100644 index 000000000..e11ed509c --- /dev/null +++ b/legal_case_management/models/case_sitting.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +from odoo import fields, models + + +class CaseSitting(models.Model): + """Create case sitting""" + _name = 'case.sitting' + _description = 'Case Sitting"' + + date = fields.Date('Date', help='Date') + details = fields.Text('Details', help='Details of sittings') + contact = fields.Char('Contact', help="Name of contact person") + done = fields.Boolean('Done', help="Is the sitting is completed or not") + case_id = fields.Many2one('case.registration', string='Connecting Field') diff --git a/legal_case_management/models/case_victim.py b/legal_case_management/models/case_victim.py new file mode 100644 index 000000000..88c1d51db --- /dev/null +++ b/legal_case_management/models/case_victim.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +from odoo import fields, models + + +class CaseVictim(models.Model): + """Create victim""" + _name = 'case.victim' + _description = 'Case Victim' + + name = fields.Char('Name', help='Victim Name') + contact = fields.Char('Contact No', help='Contact') + registration_id = fields.Many2one('case.registration') diff --git a/legal_case_management/models/hr_employee.py b/legal_case_management/models/hr_employee.py new file mode 100644 index 000000000..ad658e175 --- /dev/null +++ b/legal_case_management/models/hr_employee.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +from odoo import fields, models + + +class HrEmployee(models.Model): + """To create lawyers""" + _inherit = 'hr.employee' + + is_lawyer = fields.Boolean("Is Lawyer", help='Is this employee is a lawyer') + wage_per_trial = fields.Integer("Wage Per Trial", help='Wage per trial') + wage_per_case = fields.Integer("Wage Per Case", help='Wage per Case') + not_available = fields.Boolean('Not Available', default=False, + help='Lawyer Unavailable') diff --git a/legal_case_management/models/legal_court.py b/legal_case_management/models/legal_court.py new file mode 100644 index 000000000..8dcb94678 --- /dev/null +++ b/legal_case_management/models/legal_court.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: MOHAMMED DILSHAD TK (odoo@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 . +# +############################################################################### +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class LegalCourt(models.Model): + """Creation of legal court""" + _name = 'legal.court' + _description = 'legal court' + + name = fields.Char("Name", required=True, help='Name') + judge_id = fields.Many2one('res.partner', + domain="[('is_judge', '=', True)," + "('judge_unavailable', '=',False)]", + string='Judge', + help='Judges are available in the court') + + @api.onchange('judge_id') + def _onchange_judge_id(self): + """get judges""" + self.judge_id.is_judge = True + self.judge_id.judge_unavailable = True + + @api.ondelete(at_uninstall=False) + def _unlink_except_draft_or_cancel(self): + """ Prevent the deletion of a court if it is used in any cases. """ + cases = self.sudo().env['case.registration'].search_count([ + ('court_id', 'in', self.ids), + ('state', 'not in', ['draft']) + ]) + if cases: + raise UserError(_("You can not delete a court, " + "because it is used in case")) diff --git a/legal_case_management/models/legal_evidence.py b/legal_case_management/models/legal_evidence.py new file mode 100644 index 000000000..fdca1415c --- /dev/null +++ b/legal_case_management/models/legal_evidence.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class LegalEvidence(models.Model): + """Creation of legal evidence""" + _name = 'legal.evidence' + _description = 'legal evidence' + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char('Reference', copy=False, readonly=True, + default=lambda x: _('New')) + case_id = fields.Many2one("case.registration", "Case", + help='Name for cases', + required=True, + domain="[('state', 'not in'," + "['won', 'lost','invoiced'])]") + in_favor_id = fields.Many2one("res.partner", string="In Favor", + help=' Name of in favor for the evidence', + required=True) + client_id = fields.Many2one(related="case_id.client_id", string="Client", + help='Clients for the evidence') + description = fields.Text(help='Description of evidence') + attachment_count = fields.Integer(compute='_compute_attachment_count', + help="Count of attachments") + + @api.model + def create(self, vals): + """Generate Sequence For Evidence""" + if vals.get('name', 'New') == 'New': + vals['name'] = self.env['ir.sequence'].next_by_code( + 'case_evidence') or 'New' + return super(LegalEvidence, self).create(vals) + + @api.ondelete(at_uninstall=False) + def _unlink_except_draft_or_cancel(self): + """ Records can't be deleted""" + raise UserError(_("You can not delete a evidence")) + + def get_evidence_attachments(self): + """Get the corresponding attachments of evidence""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Attachments', + 'view_mode': 'kanban,form', + 'res_model': 'ir.attachment', + 'domain': [('res_id', '=', self.id), + ('res_model', '=', self._name)], + 'context': "{'create': False}" + } + + def _compute_attachment_count(self): + """Compute the count of attachments""" + for attachment in self: + attachment.attachment_count = self.env['ir.attachment']. \ + sudo().search_count([('res_id', '=', self.id), + ('res_model', '=', self._name)]) diff --git a/legal_case_management/models/legal_trial.py b/legal_case_management/models/legal_trial.py new file mode 100644 index 000000000..d32a2af09 --- /dev/null +++ b/legal_case_management/models/legal_trial.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class LegalTrial(models.Model): + """Creation of legal trial""" + _name = 'legal.trial' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Legal Trial' + + name = fields.Char("Name", readonly=True, default=lambda self: _('New'), + help='Trial number') + case_id = fields.Many2one('case.registration', string="Case", + help='Corresponding case', + required=True, + domain="[('state', 'not in'," + "['won', 'lost', 'invoiced'])]") + client_id = fields.Many2one(related="case_id.client_id", string="Client", + readonly=False, required=True, + help='Clients') + trial_date = fields.Datetime("Trial Date", help='Date for trial', + required=True) + judge_id = fields.Many2one(related="case_id.judge_id", string="Judge", + readonly=False, help="Judge for " + "corresponding case") + court_id = fields.Many2one(related="case_id.court_id", string="Court", + readonly=False, help="Court for " + "corresponding case") + description = fields.Html() + is_invoiced = fields.Boolean('is invoiced', help="Is trial invoiced", + default=False) + + @api.model + def create(self, vals): + """Generate Sequence For Evidence""" + if vals.get('name', 'New') == 'New': + vals['name'] = self.env['ir.sequence'].next_by_code( + 'legal_trial') or 'New' + return super(LegalTrial, self).create(vals) + + @api.ondelete(at_uninstall=False) + def _unlink_except_draft_or_cancel(self): + """ Records can't be deleted""" + raise UserError(_("You can not delete a trial")) diff --git a/legal_case_management/models/res_partner.py b/legal_case_management/models/res_partner.py new file mode 100644 index 000000000..f95bdf92c --- /dev/null +++ b/legal_case_management/models/res_partner.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from odoo import fields, models + + +class ResPartner(models.Model): + """Inherit res partner""" + _inherit = 'res.partner' + + is_judge = fields.Boolean('Is Judge', help='Is he a Judge') + judge_unavailable = fields.Boolean(default=False, + help="Check the availability of judge") diff --git a/legal_case_management/report/__init__.py b/legal_case_management/report/__init__.py new file mode 100644 index 000000000..0cf499ba0 --- /dev/null +++ b/legal_case_management/report/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from . import case_registration_form_report +from . import case_registration_report +from . import legal_evidence_report +from . import legal_trial_report diff --git a/legal_case_management/report/case_registration_form_report.py b/legal_case_management/report/case_registration_form_report.py new file mode 100644 index 000000000..e8b1c09a5 --- /dev/null +++ b/legal_case_management/report/case_registration_form_report.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from odoo import models + + +class LegalCasePdfDocumentReport(models.AbstractModel): + """Case registration report""" + _name = 'report.legal_case_management.report_case_register_document' + _description = "Report For Case Registration" + + def _get_report_values(self, docids, data=None): + """Return the Report Values""" + case_record = self.env['case.registration'].browse(docids) + evidences = self.env['legal.evidence']. \ + search([('client_id', '=', case_record.client_id.id), + ('case_id', '=', case_record.id)]) + trials = self.env['legal.trial']. \ + search([('client_id', '=', case_record.client_id.id), + ('case_id', '=', case_record.id)]) + return { + 'case_record': case_record, + 'evidence': evidences, + 'trial': trials + } diff --git a/legal_case_management/report/case_registration_form_report_templates.xml b/legal_case_management/report/case_registration_form_report_templates.xml new file mode 100644 index 000000000..91603f9d9 --- /dev/null +++ b/legal_case_management/report/case_registration_form_report_templates.xml @@ -0,0 +1,83 @@ + + + + + diff --git a/legal_case_management/report/case_registration_report.py b/legal_case_management/report/case_registration_report.py new file mode 100644 index 000000000..ccc2a3ad2 --- /dev/null +++ b/legal_case_management/report/case_registration_report.py @@ -0,0 +1,271 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from odoo import models + + +class LegalCasePdfReport(models.AbstractModel): + """Report of module""" + _name = 'report.legal_case_management.report_legal_case_details' + _description = "Report For Case Registration" + + def _get_report_values(self, docids, data=None): + """Get data to the pdf""" + query = """select case_reg.name as case_name,case_reg.start_date as start_date, + case_reg.end_date as end_date, res_client.name as client, + lawyer.name as lawyer, court.name as court,res_judge.name as judge, + INITCAP(case_reg.payment_method) as payment_method, INITCAP(case_reg.state) as state from case_registration case_reg + LEFT JOIN res_partner res_client ON case_reg.client_id = res_client.id + LEFT JOIN res_partner res_judge + ON case_reg.judge_id= res_judge.id LEFT JOIN + hr_employee lawyer ON lawyer.id = case_reg.lawyer_id LEFT JOIN + legal_court court ON case_reg.court_id = court.id""" + if data['lawyer_id'] and data['client_id'] and data['court_id'] \ + and data['judge_id'] and data['start_date'] and data['end_date'] \ + and data['payment_method'] and data['state']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + court.name ='%s' AND res_judge.name = '%s' AND + case_reg.start_date = '%s' AND + case_reg.end_date = '%s' AND + case_reg.payment_method = '%s' + AND case_reg.state = '%s' """ \ + % (data['lawyer_id'], data['client_id'], data['court_id'], + data['judge_id'], data['start_date'], data['end_date'], + data['payment_method'], data['state']) + elif data['lawyer_id'] and data['client_id'] and data['court_id'] \ + and data['judge_id'] and data['start_date'] and \ + data['end_date'] and data['payment_method']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + court.name ='%s' AND res_judge.name = '%s' AND + case_reg.start_date = '%s' AND case_reg.end_date = '%s' + AND case_reg.payment_method = '%s' """ \ + % (data['lawyer_id'], data['client_id'], data['court_id'], + data['judge_id'], data['start_date'], data['end_date'], + data['payment_method']) + elif data['lawyer_id'] and data['client_id'] and data['court_id'] \ + and data['judge_id'] and data['start_date'] and data['end_date']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + court.name ='%s' AND res_judge.name = '%s' AND + case_reg.start_date = '%s' AND + case_reg.end_date = '%s' """ % (data['lawyer_id'], + data['client_id'], + data['court_id'], + data['judge_id'], + data['start_date'], + data['end_date']) + elif data['lawyer_id'] and data['client_id'] and data['court_id'] \ + and data['judge_id'] and data['start_date']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + court.name ='%s' AND res_judge.name = '%s' AND + case_reg.start_date = '%s'""" % (data['lawyer_id'], + data['client_id'], + data['court_id'], + data['judge_id'], + data['start_date']) + elif data['lawyer_id'] and data['client_id'] and data['court_id'] \ + and data['judge_id']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + court.name ='%s' AND res_judge.name = '%s'""" \ + % (data['lawyer_id'], + data['client_id'], + data['court_id'], + data['judge_id']) + + elif data['lawyer_id'] and data['client_id'] and data['court_id']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + court.name ='%s'""" % (data['lawyer_id'], + data['client_id'], + data['court_id']) + elif data['lawyer_id'] and data['client_id'] and data['judge_id']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + res_judge.name ='%s'""" % (data['lawyer_id'], + data['client_id'], + data['judge_id']) + + elif data['lawyer_id'] and data['client_id'] and data['start_date']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + case_reg.start_date ='%s'""" \ + % (data['lawyer_id'], data['client_id'], + data['start_date']) + elif data['lawyer_id'] and data['client_id'] and data['end_date']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + case_reg.end_date ='%s'""" \ + % (data['lawyer_id'], data['client_id'], + data['start_date']) + elif data['lawyer_id'] and data['client_id'] and data['payment_method']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + case_reg.payment_method ='%s'""" \ + % (data['lawyer_id'], data['client_id'], + data['payment_method']) + elif data['lawyer_id'] and data['client_id'] and data['state']: + query += f""" WHERE lawyer.name = '%s' AND res_client.name='%s' AND + case_reg.state ='%s'""" % (data['lawyer_id'], + data['client_id'], + data['state']) + elif data['lawyer_id'] and data['client_id']: + query += f""" WHERE lawyer.name ='%s' AND + res_client.name='%s'""" % (data['lawyer_id'], + data['client_id']) + elif data['lawyer_id'] and data['judge_id']: + query += f""" WHERE lawyer.name ='%s' AND + res_judge.name='%s'""" % (data['lawyer_id'], + data['judge_id']) + + elif data['lawyer_id'] and data['court_id']: + query += f""" WHERE lawyer.name ='%s' AND + court.name='%s'""" % (data['lawyer_id'], + data['court_id']) + elif data['lawyer_id'] and data['start_date']: + query += f""" WHERE lawyer.name ='%s' AND + case_reg.start_date='%s'""" \ + % (data['lawyer_id'], data['start_date']) + elif data['lawyer_id'] and data['end_date']: + query += f""" WHERE lawyer.name ='%s' AND + case_reg.end_date='%s'""" \ + % (data['lawyer_id'], data['end_date']) + elif data['lawyer_id'] and data['payment_method']: + query += f""" WHERE lawyer.name ='%s' AND + case_reg.payment_method='%s'""" \ + % (data['lawyer_id'], data['payment_method']) + elif data['lawyer_id'] and data['state']: + query += f""" WHERE lawyer.name ='%s' AND + case_reg.state='%s'""" % (data['lawyer_id'], + data['state']) + elif data['client_id'] and data['judge_id']: + query += f""" WHERE res_client.name ='%s' AND + res_judge.name='%s'""" % (data['client_id'], + data['judge_id']) + elif data['client_id'] and data['court_id']: + query += f""" WHERE res_client.name ='%s' AND + court.name='%s'""" % (data['client_id'], + data['court_id']) + elif data['client_id'] and data['start_date']: + query += f""" WHERE res_client.name ='%s' AND + case_reg.start_date='%s'""" % (data['client_id'], + data['start_date']) + elif data['client_id'] and data['end_date']: + query += f""" WHERE res_client.name ='%s' AND + case_reg.end_date='%s'""" % (data['client_id'], + data['end_date']) + elif data['client_id'] and data['payment_method']: + query += f""" WHERE res_client.name ='%s' AND + case_reg.payment_method='%s'""" \ + % (data['client_id'], data['payment_method']) + elif data['client_id'] and data['state']: + query += f""" WHERE res_client.name ='%s' AND + case_reg.state='%s'""" % (data['client_id'], + data['state']) + elif data['judge_id'] and data['court_id']: + query += f""" WHERE res_judge.name ='%s' AND + court.name='%s'""" % (data['judge_id'], + data['court_id']) + elif data['judge_id'] and data['start_date']: + query += f""" WHERE res_judge.name ='%s' AND + case_reg.start_date='%s'""" \ + % (data['judge_id'], data['start_date']) + elif data['judge_id'] and data['end_date']: + query += f""" WHERE res_judge.name ='%s' AND + case_reg.end_date='%s'""" % (data['judge_id'], + data['end_date']) + elif data['judge_id'] and data['payment_method']: + query += f""" WHERE res_judge.name ='%s' AND + case_reg.payment_method='%s'""" \ + % (data['judge_id'], data['payment_method']) + elif data['judge_id'] and data['state']: + query += f""" WHERE res_judge.name ='%s' AND + case_reg.state='%s'""" % (data['judge_id'], + data['state']) + elif data['court_id'] and data['start_date']: + query += f""" WHERE court.name ='%s' AND + case_reg.start_date='%s'""" \ + % (data['court_id'], data['start_date']) + elif data['court_id'] and data['end_date']: + query += f""" WHERE court.name ='%s' AND + case_reg.end_date='%s'""" \ + % (data['court_id'], data['end_date']) + elif data['court_id'] and data['payment_method']: + query += f""" WHERE court.name ='%s' AND + case_reg.payment_method='%s'""" \ + % (data['court_id'], data['payment_method']) + elif data['court_id'] and data['state']: + query += f""" WHERE court.name ='%s' AND + case_reg.state='%s'""" % (data['court_id'], + data['state']) + elif data['start_date'] and data['end_date']: + query += f""" WHERE case_reg.start_date ='%s' AND + case_reg.end_date='%s'""" \ + % (data['start_date'], data['end_date']) + elif data['start_date'] and data['payment_method']: + query += f""" WHERE case_reg.start_date ='%s' AND + case_reg.payment_method='%s'""" \ + % (data['start_date'], data['payment_method']) + elif data['start_date'] and data['state']: + query += f""" WHERE case_reg.start_date ='%s' AND + case_reg.state='%s'""" \ + % (data['start_date'], data['state']) + elif data['start_date'] and data['payment_method']: + query += f""" WHERE case_reg.start_date ='%s' AND + case_reg.payment_method='%s'""" \ + % (data['start_date'], data['payment_method']) + elif data['end_date'] and data['payment_method']: + query += f""" WHERE case_reg.end_date ='%s' AND + case_reg.payment_method='%s'""" \ + % (data['end_date'], data['payment_method']) + elif data['end_date'] and data['state']: + query += f""" WHERE case_reg.end_date ='%s' AND + case_reg.state='%s'""" % (data['end_date'], + data['state']) + elif data['payment_method'] and data['state']: + query += f""" WHERE case_reg.payment_method='%s' AND + case_reg.state='%s'""" % (data['payment_method'], + data['state']) + elif data['lawyer_id']: + query += f""" WHERE lawyer.name ='%s' """ \ + % (data['lawyer_id']) + + elif data['client_id']: + query += f""" WHERE res_client.name ='%s' """ \ + % (data['client_id']) + + elif data['judge_id']: + query += f""" WHERE res_judge.name ='%s' """ \ + % (data['judge_id']) + + elif data['court_id']: + query += f""" WHERE court.name ='%s' """ \ + % (data['court_id']) + elif data['start_date']: + query += f""" WHERE case_reg.start_date ='%s' """ \ + % (data['start_date']) + elif data['end_date']: + query += f""" WHERE case_reg.end_date ='%s' """ \ + % (data['end_date']) + elif data['payment_method']: + query += f""" WHERE case_reg.payment_method ='%s' """ \ + % (data['payment_method']) + elif data['state']: + query += f""" WHERE case_reg.state ='%s' """ \ + % (data['state']) + self.env.cr.execute(query) + return { + 'data': data, + 'docs': self.env.cr.dictfetchall() + } diff --git a/legal_case_management/report/case_registration_reports.xml b/legal_case_management/report/case_registration_reports.xml new file mode 100644 index 000000000..50e557fba --- /dev/null +++ b/legal_case_management/report/case_registration_reports.xml @@ -0,0 +1,47 @@ + + + + + Legal Case Report + legal.case.report + qweb-pdf + legal_case_management.report_legal_case_details + legal_case_management.report_legal_case_details + + report + + + Case Report + case.registration + qweb-pdf + legal_case_management.report_case_register_document + + legal_case_management.report_case_register_document + + + form + report + + + Evidence Report + legal.evidence + qweb-pdf + legal_case_management.report_case_evidence_document + + legal_case_management.report_case_evidence_document + + + report + form + + + Trial Report + legal.trial + qweb-pdf + legal_case_management.report_case_trial_document + legal_case_management.report_case_trial_document + + report + form + + diff --git a/legal_case_management/report/case_registration_templates.xml b/legal_case_management/report/case_registration_templates.xml new file mode 100644 index 000000000..4555479ef --- /dev/null +++ b/legal_case_management/report/case_registration_templates.xml @@ -0,0 +1,76 @@ + + + + + diff --git a/legal_case_management/report/legal_evidence_report.py b/legal_case_management/report/legal_evidence_report.py new file mode 100644 index 000000000..92d58007e --- /dev/null +++ b/legal_case_management/report/legal_evidence_report.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from odoo import models + + +class LegalCasePdfDocumentEvidenceReport(models.AbstractModel): + """Evidence report""" + _name = 'report.legal_case_management.report_case_evidence_document' + _description = "Report For Evidence" + + def _get_report_values(self, docids, data=None): + """Return the Report Values For Evidence""" + evidence_record = self.env['legal.evidence'].browse(docids) + return { + 'evidence': evidence_record + } diff --git a/legal_case_management/report/legal_evidence_templates.xml b/legal_case_management/report/legal_evidence_templates.xml new file mode 100644 index 000000000..cc661e8aa --- /dev/null +++ b/legal_case_management/report/legal_evidence_templates.xml @@ -0,0 +1,50 @@ + + + + + diff --git a/legal_case_management/report/legal_trial_report.py b/legal_case_management/report/legal_trial_report.py new file mode 100644 index 000000000..13b91e0c4 --- /dev/null +++ b/legal_case_management/report/legal_trial_report.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: LAJINA.K.V (odoo@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 . +# +############################################################################### +from odoo import models + + +class LegalCasePdfDocumentTrialReport(models.AbstractModel): + """Trial Report""" + _name = 'report.legal_case_management.report_case_trial_document' + _description = "Report For Trial" + + def _get_report_values(self, docids, data=None): + """Return the Report Values""" + trial_record = self.env['legal.trial'].browse(docids) + + return { + 'trial': trial_record, + } diff --git a/legal_case_management/report/legal_trial_report_templates.xml b/legal_case_management/report/legal_trial_report_templates.xml new file mode 100644 index 000000000..22e05a58a --- /dev/null +++ b/legal_case_management/report/legal_trial_report_templates.xml @@ -0,0 +1,47 @@ + + + + + diff --git a/legal_case_management/security/ir.model.access.csv b/legal_case_management/security/ir.model.access.csv new file mode 100644 index 000000000..4e4785838 --- /dev/null +++ b/legal_case_management/security/ir.model.access.csv @@ -0,0 +1,40 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_legal_evidence_admin,access.legal.evidence.admin,model_legal_evidence,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_legal_evidence_lawyer,access.legal.evidence.lawyer,model_legal_evidence,legal_case_management.legal_case_management_group_lawyer,1,1,1,0 +access_legal_evidence_clerk,access.legal.evidence.clerk,model_legal_evidence,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + +access_legal_trial_admin,access.legal.trial.admin,model_legal_trial,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_legal_trial_lawyer,access.legal.trial.lawyer,model_legal_trial,legal_case_management.legal_case_management_group_lawyer,1,1,1,0 +access_legal_trial_admin_clerk,access.legal.trial.admin_clerk,model_legal_trial,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + +access_legal_court_admin,access.legal.court.admin,model_legal_court,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_legal_court_lawyer,access.legal.court.lawyer,model_legal_court,legal_case_management.legal_case_management_group_lawyer,1,1,0,0 +access_legal_court_clerk,access.legal.court.clerk,model_legal_court,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + +access_case_category_admin,access.case.category.admin,model_case_category,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_case_category_lawyer,access.case.category.lawyer,model_case_category,legal_case_management.legal_case_management_group_lawyer,1,1,1,0 +access_case_category_clerk,access.case.category.clerk,model_case_category,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + +access_case_registration_admin,access.case.registration.admin,model_case_registration,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_case_registration_lawyer,access.case.registration.lawyer,model_case_registration,legal_case_management.legal_case_management_group_lawyer,1,1,0,0 +access_case_registration_clerk,access.case.registration.clerk,model_case_registration,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + + +access_case_sitting_admin,access.case.sitting.admin,model_case_sitting,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_case_sitting_lawyer,access.case.sitting.lawyer,model_case_sitting,legal_case_management.legal_case_management_group_lawyer,1,1,1,1 +access_case_sitting_clerk,access.case.sitting.clerk,model_case_sitting,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + +access_case_victim_admin,access.case.victim.admin,model_case_victim,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_case_victim_lawyer,access.case.victim.lawyer,model_case_victim,legal_case_management.legal_case_management_group_lawyer,1,1,1,1 +access_case_victim_clerk,access.case.victim.clerk,model_case_victim,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + + +access_invoice_payment_admin,access.invoice.payment.admin,model_invoice_payment,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_invoice_payment_lawyer,access.invoice.payment.lawyer,model_invoice_payment,legal_case_management.legal_case_management_group_lawyer,1,1,1,1 +access_invoice_payment_clerk,access.invoice.payment.clerk,model_invoice_payment,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + +access_full_settlement_admin,access.full.settlement.admin,model_full_settlement,legal_case_management.legal_case_management_group_admin,1,1,1,1 +access_full_settlement_lawyer,access.full.settlement.lawyer,model_full_settlement,legal_case_management.legal_case_management_group_lawyer,1,1,1,1 +access_full_settlement_clerk,access.full.settlement.clerk,model_full_settlement,legal_case_management.legal_case_management_group_clerk,1,0,0,0 + +access_legal_case_report,access.legal.case.report,model_legal_case_report,base.group_user,1,1,1,1 diff --git a/legal_case_management/security/legal_case_management_groups.xml b/legal_case_management/security/legal_case_management_groups.xml new file mode 100644 index 000000000..f14dd124d --- /dev/null +++ b/legal_case_management/security/legal_case_management_groups.xml @@ -0,0 +1,26 @@ + + + + Case Management + Legal Case Management + 120 + + + + Clerk + + + + Lawyer + + + + + Admin + + + + diff --git a/legal_case_management/security/legal_case_management_security.xml b/legal_case_management/security/legal_case_management_security.xml new file mode 100644 index 000000000..00f20550a --- /dev/null +++ b/legal_case_management/security/legal_case_management_security.xml @@ -0,0 +1,64 @@ + + + + + Legal Case: multi-company + + + ['|',('company_id','=',False),('company_id', 'in', company_ids)] + + + + + Admin All Document only view Rule + + [(1,'=',1)] + + + + + Own Case view Rule + + [('lawyer_id.user_id','=',user.id)] + + + + + + Admin All Document only view Rule + + [(1,'=',1)] + + + + + Own Evidence view Rule + + + [('case_id.lawyer_id.user_id','=',user.id)] + + + + + + Admin All Document only view Rule + + [(1,'=',1)] + + + + + Own Trial view Rule + + + [('case_id.lawyer_id.user_id','=',user.id)] + + + + diff --git a/legal_case_management/static/description/assets/icons/check.png b/legal_case_management/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/legal_case_management/static/description/assets/icons/check.png differ diff --git a/legal_case_management/static/description/assets/icons/chevron.png b/legal_case_management/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/legal_case_management/static/description/assets/icons/chevron.png differ diff --git a/legal_case_management/static/description/assets/icons/cogs.png b/legal_case_management/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/legal_case_management/static/description/assets/icons/cogs.png differ diff --git a/legal_case_management/static/description/assets/icons/consultation.png b/legal_case_management/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/legal_case_management/static/description/assets/icons/consultation.png differ diff --git a/legal_case_management/static/description/assets/icons/ecom-black.png b/legal_case_management/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/legal_case_management/static/description/assets/icons/ecom-black.png differ diff --git a/legal_case_management/static/description/assets/icons/education-black.png b/legal_case_management/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/legal_case_management/static/description/assets/icons/education-black.png differ diff --git a/legal_case_management/static/description/assets/icons/hotel-black.png b/legal_case_management/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/legal_case_management/static/description/assets/icons/hotel-black.png differ diff --git a/legal_case_management/static/description/assets/icons/license.png b/legal_case_management/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/legal_case_management/static/description/assets/icons/license.png differ diff --git a/legal_case_management/static/description/assets/icons/lifebuoy.png b/legal_case_management/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/legal_case_management/static/description/assets/icons/lifebuoy.png differ diff --git a/legal_case_management/static/description/assets/icons/manufacturing-black.png b/legal_case_management/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/legal_case_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/legal_case_management/static/description/assets/icons/pos-black.png b/legal_case_management/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/legal_case_management/static/description/assets/icons/pos-black.png differ diff --git a/legal_case_management/static/description/assets/icons/puzzle.png b/legal_case_management/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/legal_case_management/static/description/assets/icons/puzzle.png differ diff --git a/legal_case_management/static/description/assets/icons/restaurant-black.png b/legal_case_management/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/legal_case_management/static/description/assets/icons/restaurant-black.png differ diff --git a/legal_case_management/static/description/assets/icons/service-black.png b/legal_case_management/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/legal_case_management/static/description/assets/icons/service-black.png differ diff --git a/legal_case_management/static/description/assets/icons/trading-black.png b/legal_case_management/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/legal_case_management/static/description/assets/icons/trading-black.png differ diff --git a/legal_case_management/static/description/assets/icons/training.png b/legal_case_management/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/legal_case_management/static/description/assets/icons/training.png differ diff --git a/legal_case_management/static/description/assets/icons/update.png b/legal_case_management/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/legal_case_management/static/description/assets/icons/update.png differ diff --git a/legal_case_management/static/description/assets/icons/user.png b/legal_case_management/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/legal_case_management/static/description/assets/icons/user.png differ diff --git a/legal_case_management/static/description/assets/icons/wrench.png b/legal_case_management/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/legal_case_management/static/description/assets/icons/wrench.png differ diff --git a/legal_case_management/static/description/assets/misc/categories.png b/legal_case_management/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/legal_case_management/static/description/assets/misc/categories.png differ diff --git a/legal_case_management/static/description/assets/misc/check-box.png b/legal_case_management/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/legal_case_management/static/description/assets/misc/check-box.png differ diff --git a/legal_case_management/static/description/assets/misc/compass.png b/legal_case_management/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/legal_case_management/static/description/assets/misc/compass.png differ diff --git a/legal_case_management/static/description/assets/misc/corporate.png b/legal_case_management/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/legal_case_management/static/description/assets/misc/corporate.png differ diff --git a/legal_case_management/static/description/assets/misc/customer-support.png b/legal_case_management/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/legal_case_management/static/description/assets/misc/customer-support.png differ diff --git a/legal_case_management/static/description/assets/misc/cybrosys-logo.png b/legal_case_management/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/legal_case_management/static/description/assets/misc/cybrosys-logo.png differ diff --git a/legal_case_management/static/description/assets/misc/features.png b/legal_case_management/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/legal_case_management/static/description/assets/misc/features.png differ diff --git a/legal_case_management/static/description/assets/misc/logo.png b/legal_case_management/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/legal_case_management/static/description/assets/misc/logo.png differ diff --git a/legal_case_management/static/description/assets/misc/pictures.png b/legal_case_management/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/legal_case_management/static/description/assets/misc/pictures.png differ diff --git a/legal_case_management/static/description/assets/misc/pie-chart.png b/legal_case_management/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/legal_case_management/static/description/assets/misc/pie-chart.png differ diff --git a/legal_case_management/static/description/assets/misc/right-arrow.png b/legal_case_management/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/legal_case_management/static/description/assets/misc/right-arrow.png differ diff --git a/legal_case_management/static/description/assets/misc/star.png b/legal_case_management/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/legal_case_management/static/description/assets/misc/star.png differ diff --git a/legal_case_management/static/description/assets/misc/support.png b/legal_case_management/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/legal_case_management/static/description/assets/misc/support.png differ diff --git a/legal_case_management/static/description/assets/misc/whatsapp.png b/legal_case_management/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/legal_case_management/static/description/assets/misc/whatsapp.png differ diff --git a/legal_case_management/static/description/assets/modules/l1.png b/legal_case_management/static/description/assets/modules/l1.png new file mode 100644 index 000000000..ed175b076 Binary files /dev/null and b/legal_case_management/static/description/assets/modules/l1.png differ diff --git a/legal_case_management/static/description/assets/modules/l2.png b/legal_case_management/static/description/assets/modules/l2.png new file mode 100644 index 000000000..a3194264c Binary files /dev/null and b/legal_case_management/static/description/assets/modules/l2.png differ diff --git a/legal_case_management/static/description/assets/modules/l3.png b/legal_case_management/static/description/assets/modules/l3.png new file mode 100644 index 000000000..e894393ef Binary files /dev/null and b/legal_case_management/static/description/assets/modules/l3.png differ diff --git a/legal_case_management/static/description/assets/modules/l4.png b/legal_case_management/static/description/assets/modules/l4.png new file mode 100644 index 000000000..f3c986fc1 Binary files /dev/null and b/legal_case_management/static/description/assets/modules/l4.png differ diff --git a/legal_case_management/static/description/assets/modules/l5.png b/legal_case_management/static/description/assets/modules/l5.png new file mode 100644 index 000000000..b21837312 Binary files /dev/null and b/legal_case_management/static/description/assets/modules/l5.png differ diff --git a/legal_case_management/static/description/assets/modules/l6.png b/legal_case_management/static/description/assets/modules/l6.png new file mode 100644 index 000000000..e64a5b55c Binary files /dev/null and b/legal_case_management/static/description/assets/modules/l6.png differ diff --git a/legal_case_management/static/description/assets/screenshots/hero.gif b/legal_case_management/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..90e9efecc Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/hero.gif differ diff --git a/legal_case_management/static/description/assets/screenshots/legal6.png b/legal_case_management/static/description/assets/screenshots/legal6.png new file mode 100644 index 000000000..8319a0999 Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal6.png differ diff --git a/legal_case_management/static/description/assets/screenshots/legal_1.1.png b/legal_case_management/static/description/assets/screenshots/legal_1.1.png new file mode 100644 index 000000000..addc2e4fe Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal_1.1.png differ diff --git a/legal_case_management/static/description/assets/screenshots/legal_1.png b/legal_case_management/static/description/assets/screenshots/legal_1.png new file mode 100644 index 000000000..afea663cb Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal_1.png differ diff --git a/legal_case_management/static/description/assets/screenshots/legal_2.png b/legal_case_management/static/description/assets/screenshots/legal_2.png new file mode 100644 index 000000000..eb23a0c22 Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal_2.png differ diff --git a/legal_case_management/static/description/assets/screenshots/legal_3.png b/legal_case_management/static/description/assets/screenshots/legal_3.png new file mode 100644 index 000000000..8b6615092 Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal_3.png differ diff --git a/legal_case_management/static/description/assets/screenshots/legal_4.1.png b/legal_case_management/static/description/assets/screenshots/legal_4.1.png new file mode 100644 index 000000000..a9eb58486 Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal_4.1.png differ diff --git a/legal_case_management/static/description/assets/screenshots/legal_4.png b/legal_case_management/static/description/assets/screenshots/legal_4.png new file mode 100644 index 000000000..02a884741 Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal_4.png differ diff --git a/legal_case_management/static/description/assets/screenshots/legal_5.png b/legal_case_management/static/description/assets/screenshots/legal_5.png new file mode 100644 index 000000000..30ac90f88 Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal_5.png differ diff --git a/legal_case_management/static/description/assets/screenshots/legal_7.png b/legal_case_management/static/description/assets/screenshots/legal_7.png new file mode 100644 index 000000000..9ce0a0b2f Binary files /dev/null and b/legal_case_management/static/description/assets/screenshots/legal_7.png differ diff --git a/legal_case_management/static/description/banner.png b/legal_case_management/static/description/banner.png new file mode 100644 index 000000000..c61ac9571 Binary files /dev/null and b/legal_case_management/static/description/banner.png differ diff --git a/legal_case_management/static/description/icon.png b/legal_case_management/static/description/icon.png new file mode 100644 index 000000000..784b9ddc3 Binary files /dev/null and b/legal_case_management/static/description/icon.png differ diff --git a/legal_case_management/static/description/index.html b/legal_case_management/static/description/index.html new file mode 100644 index 000000000..2b5998cef --- /dev/null +++ b/legal_case_management/static/description/index.html @@ -0,0 +1,682 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ + + +

+ Legal Case Management

+

+ This module helps to manage a legal case management firm

+ + + +
+ + +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module helps to manage a legal case management firm.Set different access rights for the module. + You can create invoices for different payment methods.If the lawyer is busy with other case, user can assign junior lawyers + for particular case. + +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Different access rights for admin,lawyer and clerk +
+
+ + Creation of lawyers and their wages for trial and case +
+
+ + Case registration through form +
+
+ + Adding Evidence ,Trial and attachment for corresponding cases +
+
+ + Invoicing For trial, case, out of court and full settlement +
+
+ + If the lawyers are busy with other cases, user can assign junior lawyers +
+
+ + Case registration through portal +
+
+ + Portal users can see the corresponding case details +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Different access rights for admin,lawyer and clerk

+

+ Go to Settings -> Users -> You can select different access rights for users

+ +
+
+

+ Create Lawyers and set wages for case and trial

+ +
+ + +
+

+ Case registration through form

+

+ You can register case with giving following details

+ +
+ +
+

+ Adding Evidence ,Trial and attachment for corresponding cases

+ +
+ +
+

+ Invoicing For trial, case, out of court and full settlement

+

+ 1.Select the payment method of case

+ +

+ 2.Invoice for corresponding payment method

+ +
+
+

+ If the lawyers are busy with other cases, user can assign junior lawyer

+ +
+
+

+ Case registration through portal

+ +
+
+

+ Portal users can see the corresponding case details

+ +
+
+
+ + + +
+
+ +
+

+ Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

+ Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/legal_case_management/views/account_move_views.xml b/legal_case_management/views/account_move_views.xml new file mode 100644 index 000000000..d3e26f6d1 --- /dev/null +++ b/legal_case_management/views/account_move_views.xml @@ -0,0 +1,17 @@ + + + + + + account.move.view.form.inherit.legal.case.management + + account.move + + + + + + + + diff --git a/legal_case_management/views/case_category_views.xml b/legal_case_management/views/case_category_views.xml new file mode 100644 index 000000000..4bb887f93 --- /dev/null +++ b/legal_case_management/views/case_category_views.xml @@ -0,0 +1,13 @@ + + + + + case.category.tree + case.category + + + + + + + diff --git a/legal_case_management/views/case_register_portal_template.xml b/legal_case_management/views/case_register_portal_template.xml new file mode 100644 index 000000000..89820d92a --- /dev/null +++ b/legal_case_management/views/case_register_portal_template.xml @@ -0,0 +1,132 @@ + + + + + + + diff --git a/legal_case_management/views/case_register_template.xml b/legal_case_management/views/case_register_template.xml new file mode 100644 index 000000000..a214509da --- /dev/null +++ b/legal_case_management/views/case_register_template.xml @@ -0,0 +1,145 @@ + + + +