@ -0,0 +1,47 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg |
||||
|
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
||||
|
:alt: License: LGPL-3 |
||||
|
|
||||
|
Base Machine Repair Management |
||||
|
============================== |
||||
|
* Machine Repair Management system is an application which is used to maintain the repairs of machine. It is also allow users to take machine requests through website and these requests are created in the backend .Also we can manage the job order,machine diagnosis and maintained the team. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* No additional configurations needed |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (LGPL v3). |
||||
|
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developers: (V17) Dhanya B ,(V18) Rosmy John, Afra MP ,Contacts: odoo@cybrosys.com |
||||
|
|
||||
|
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 <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
||||
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import controllers |
||||
|
from . import models |
||||
|
from . import report |
||||
|
from . import wizard |
||||
@ -0,0 +1,65 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': 'Machine Repair Management', |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'Sales,Website ,Human Resources ,Project', |
||||
|
'summary': """Machine Repair Management System Is An Application Which Is |
||||
|
Used To Maintain The Machine Repairs.""", |
||||
|
'description': """Machine Repair Management system is an application which is |
||||
|
used to maintain the repairs of machine. It is also allow users to take |
||||
|
machine requests through website and these requests are created in the |
||||
|
backend .Also we can manage the job order,machine diagnosis and maintained |
||||
|
the team.""", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': 'https://www.cybrosys.com', |
||||
|
'depends': ['website', 'hr', 'project', 'sale', 'contacts'], |
||||
|
'data': [ |
||||
|
'security/base_machine_repair_management_groups.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
'data/ir_sequence_data.xml', |
||||
|
'data/mail_data.xml', |
||||
|
'report/repair_report_templates.xml', |
||||
|
'report/machine_repair_report.xml', |
||||
|
'views/customer_portal_templates.xml', |
||||
|
'views/customer_review_templates.xml', |
||||
|
'views/machine_diagnosis_views.xml', |
||||
|
'views/machine_repair_views.xml', |
||||
|
'views/machine_service_type_views.xml', |
||||
|
'views/machine_service_views.xml', |
||||
|
'views/machine_workorder_views.xml', |
||||
|
'views/product_product_views.xml', |
||||
|
'views/repair_team_views.xml', |
||||
|
'views/res_partner_views.xml', |
||||
|
'views/sale_order_views.xml', |
||||
|
'views/website_repair_templates.xml', |
||||
|
'wizard/repair_report_views.xml', |
||||
|
'views/base_machine_repair_management_menus.xml', |
||||
|
], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'LGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': True, |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import base_machine_repair_management |
||||
|
from . import portal |
||||
@ -0,0 +1,95 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import http |
||||
|
from odoo.http import request |
||||
|
|
||||
|
|
||||
|
class RepairRequest(http.Controller): |
||||
|
"""This is used for manage the repair requests""" |
||||
|
|
||||
|
@http.route(['/repair'], type='http', auth="public", website=True) |
||||
|
def get_request(self): |
||||
|
"""function to get the repair request form""" |
||||
|
vals = ({ |
||||
|
'machine': request.env['product.product'].sudo().search( |
||||
|
[('is_machine', '=', True)]), |
||||
|
'service_id': request.env['machine.service'].sudo().search([]), |
||||
|
'customer_id': request.env['res.partner'].search([]),}) |
||||
|
return request.render( |
||||
|
"base_machine_repair_management.repair_request_form", vals) |
||||
|
|
||||
|
@http.route('/create/repair_request', type='http', methods=['POST'], |
||||
|
auth="public", website=True, csrf=False) |
||||
|
def submit_form_request(self, **POST): |
||||
|
"""function to redirect the submitted response page""" |
||||
|
if POST.get('customer_id') not in request.env['res.partner'].sudo().search([]).ids: |
||||
|
customer = request.env['res.partner'].sudo().create({ |
||||
|
'name': POST.get('customer_id'), |
||||
|
'email': POST.get('email'), |
||||
|
'phone': POST.get('phone') |
||||
|
}) |
||||
|
POST.update({'customer_id': customer.id, 'name': 'Repair from Website'}) |
||||
|
if POST: |
||||
|
request.env['machine.repair'].sudo().create(POST) |
||||
|
return request.redirect('/contactus-thank-you') |
||||
|
return None |
||||
|
|
||||
|
@http.route(['/review'], type='http', auth="public", website=True) |
||||
|
def get_customer_review(self): |
||||
|
"""function to redirect the review form""" |
||||
|
comments = ({ |
||||
|
'customer_rating': request.env['machine.repair'].sudo().search( |
||||
|
[('customer_id', '!=', False), ('customer_rating', '!=', False), |
||||
|
('customer_comments', '!=', False)]) |
||||
|
}) |
||||
|
return request.render( |
||||
|
"base_machine_repair_management.repair_review_form", comments) |
||||
|
|
||||
|
@http.route('/create/repair_reviews', methods=['POST'], type='http', |
||||
|
auth="public", website=True, csrf=False) |
||||
|
def submit_form(self, **POST): |
||||
|
"""This is used to submit the user reviews""" |
||||
|
if POST: |
||||
|
vals = request.env['machine.repair'].sudo().search( |
||||
|
[('customer_id.name', '=', request.env.user.name)], limit=1) |
||||
|
if POST.get('good') == 'on': |
||||
|
vals.write({ |
||||
|
'customer_rating': 'Good', |
||||
|
'customer_comments': POST['repair_review_comment'] |
||||
|
}) |
||||
|
elif POST.get('poor') == 'on': |
||||
|
vals.write({ |
||||
|
'customer_rating': 'Poor', |
||||
|
'customer_comments': POST['repair_review_comment'] |
||||
|
}) |
||||
|
elif POST.get('average') == 'on': |
||||
|
vals.write({ |
||||
|
'customer_rating': 'Average', |
||||
|
'customer_comments': POST['repair_review_comment'] |
||||
|
}) |
||||
|
elif POST.get('excellent') == 'on': |
||||
|
vals.sudo().write({ |
||||
|
'customer_rating': 'Excellent', |
||||
|
'customer_comments': POST['repair_review_comment'] |
||||
|
}) |
||||
|
return request.redirect('/contactus-thank-you') |
||||
|
return None |
||||
@ -0,0 +1,97 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import _, http |
||||
|
from odoo.exceptions import AccessError, MissingError |
||||
|
from odoo.http import request |
||||
|
from odoo.addons.portal.controllers.portal import CustomerPortal |
||||
|
from odoo.addons.portal.controllers.portal import pager as portal_pager |
||||
|
|
||||
|
|
||||
|
class PortalRepair(CustomerPortal): |
||||
|
"""Portal for customers""" |
||||
|
|
||||
|
def _prepare_home_portal_values(self, counters): |
||||
|
"""This is used to prepare the portal values""" |
||||
|
values = super()._prepare_home_portal_values(counters) |
||||
|
if 'repair_count' in counters: |
||||
|
repair_count = request.env['machine.repair'].search_count( |
||||
|
self._get_repair_domain()) |
||||
|
values['repair_count'] = repair_count |
||||
|
return values |
||||
|
|
||||
|
def _repair_get_page_view_values(self, repair, access_token, **kwargs): |
||||
|
"""This is used to view the repair page""" |
||||
|
values = {'page_name': 'repair', 'repair': repair} |
||||
|
return self._get_page_view_values(repair, access_token, values, |
||||
|
'my_repair_history', False, **kwargs) |
||||
|
|
||||
|
def _get_repair_domain(self): |
||||
|
"""This used add the domain for the page view""" |
||||
|
return [('customer_id', '=', request.env.user.partner_id.id)] |
||||
|
|
||||
|
@http.route(['/my/repair', '/my/repair/page/<int:page>'], type='http', |
||||
|
auth="user", website=True) |
||||
|
def portal_my_repair(self, page=1, date_begin=None, date_end=None, |
||||
|
sort=None): |
||||
|
"""This is used to view the all repairs""" |
||||
|
values = self._prepare_portal_layout_values() |
||||
|
machine_repair = request.env['machine.repair'].search([]) |
||||
|
domain = self._get_repair_domain() |
||||
|
searchbar_sorting = { |
||||
|
'state': {'label': _('Status'), 'repair': 'state'}, |
||||
|
} |
||||
|
if not sort: |
||||
|
sort = 'state' |
||||
|
repair_count = machine_repair.search_count(domain) |
||||
|
pager = portal_pager(url="/my/repair", |
||||
|
url_args={'date_begin': date_begin, 'date_end': date_end, 'sort': sort}, |
||||
|
total=repair_count, |
||||
|
page=page, |
||||
|
step=self._items_per_page) |
||||
|
repair = machine_repair.search(domain, |
||||
|
limit=self._items_per_page, |
||||
|
offset=pager['offset']) |
||||
|
request.session['my_repair_history'] = repair.ids[:100] |
||||
|
values.update({ |
||||
|
'date': date_begin, |
||||
|
'machine_repair': repair_count, |
||||
|
'repair': repair, |
||||
|
'page_name': 'repair', |
||||
|
'pager': pager, |
||||
|
'default_url': '/my/repair', |
||||
|
'searchbar_sorting': searchbar_sorting, |
||||
|
'sort': sort, |
||||
|
|
||||
|
}) |
||||
|
return request.render( |
||||
|
"base_machine_repair_management.portal_my_repair_request", values) |
||||
|
|
||||
|
@http.route(['/my/repair/<int:repair_id>'], type='http', auth="public", |
||||
|
website=True) |
||||
|
def portal_my_repair_detail(self, repair_id, access_token=None, **kw): |
||||
|
"""This is used to view a specified view of a repair""" |
||||
|
try: |
||||
|
repair_sudo = self._document_check_access('machine.repair', repair_id, access_token) |
||||
|
except (AccessError, MissingError): |
||||
|
return request.redirect('/my') |
||||
|
values = self._repair_get_page_view_values(repair_sudo, access_token,**kw) |
||||
|
return request.render("base_machine_repair_management.portal_repair_page", values) |
||||
@ -0,0 +1,23 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<data noupdate="1"> |
||||
|
<!-- This is for the sequence of machine diagnosis records--> |
||||
|
<record id="ir_sequence_machine_diagnosis" model="ir.sequence"> |
||||
|
<field name="name">Repair Sequence</field> |
||||
|
<field name="code">machine.diagnosis</field> |
||||
|
<field name="prefix">DGS/</field> |
||||
|
<field name="padding">3</field> |
||||
|
<field name="number_next">1</field> |
||||
|
<field name="number_increment">1</field> |
||||
|
</record> |
||||
|
<!-- This is used for the sequence for machine repair--> |
||||
|
<record id="ir_sequence_machine_repair" model="ir.sequence"> |
||||
|
<field name="name">Repair Sequence</field> |
||||
|
<field name="code">machine.repair</field> |
||||
|
<field name="prefix">MRP/</field> |
||||
|
<field name="padding">3</field> |
||||
|
<field name="number_next">1</field> |
||||
|
<field name="number_increment">1</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
||||
@ -0,0 +1,31 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<data noupdate="1"> |
||||
|
<!--Email template --> |
||||
|
<record id="repair_request_close_email_template" model="mail.template"> |
||||
|
<field name="name">Repair Request Closed: Send by email</field> |
||||
|
<field name="model_id" |
||||
|
ref="base_machine_repair_management.model_machine_repair"/> |
||||
|
<field name="email_from">{{ (object.technician_id.work_email or object.company_id.email_formatted or user.email_formatted) }}</field> |
||||
|
<field name="email_to">{{object.customer_id.email}}</field> |
||||
|
<field name="subject">Machine Repair Request Closing (Ref{{object.repair_seq}}) |
||||
|
</field> |
||||
|
<field name="body_html" type="html"> |
||||
|
<div style="margin: 0px; padding: 0px;"> |
||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;"> |
||||
|
Hi <t t-out="object.customer_id.name"/>, |
||||
|
<br/> |
||||
|
<br/> |
||||
|
Here is your repair request with reference |
||||
|
<t t-out="object.repair_seq"/> |
||||
|
is closed on |
||||
|
<t t-out="object.closing_date"/> |
||||
|
<br/> |
||||
|
<br/> |
||||
|
Do not hesitate to contact us if you have any questions. |
||||
|
</p> |
||||
|
</div> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
||||
@ -0,0 +1,6 @@ |
|||||
|
## Module <base_machine_repair_management> |
||||
|
|
||||
|
#### 16.12.2025 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
#### ADD |
||||
|
- Initial commit for Base Machine Repair Management |
||||
@ -0,0 +1,33 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import machine_consume |
||||
|
from . import machine_diagnosis |
||||
|
from . import machine_repair |
||||
|
from . import machine_service |
||||
|
from . import machine_service_type |
||||
|
from . import machine_workorder |
||||
|
from . import product_product |
||||
|
from . import repair_team |
||||
|
from . import repair_timesheet |
||||
|
from . import res_partner |
||||
|
from . import sale_order |
||||
|
from . import team_member |
||||
@ -0,0 +1,44 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class MachineConsume(models.Model): |
||||
|
"""This is the class for machine consume""" |
||||
|
_name = 'machine.consume' |
||||
|
_description = "Machine Consume" |
||||
|
_rec_name = "consume_id" |
||||
|
|
||||
|
consume_id = fields.Many2one('machine.repair', string="Consumer", |
||||
|
help="Reference to the machine repair record associated with this consumption.") |
||||
|
machine_id = fields.Many2one('product.product', string='Machine', |
||||
|
domain=[('is_machine', '=', True)], |
||||
|
help="Select the machine being consumed. Only products marked as machines are available.") |
||||
|
qty = fields.Float(string='Quantity', |
||||
|
help="The amount of the selected machine consumed in the repair or diagnosis process.") |
||||
|
uom = fields.Many2one('uom.uom', string="UoM", |
||||
|
help="Unit of Measure for the quantity consumed.") |
||||
|
dia_estimate_id = fields.Many2one('machine.diagnosis', |
||||
|
string="Machine Diagnosis", |
||||
|
help="Reference to the machine diagnosis record related to this consumption.") |
||||
|
hour = fields.Float(string='Duration', |
||||
|
help="The number of hours the machine was used during the repair or diagnosis.") |
||||
@ -0,0 +1,94 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
|
||||
|
class MachineDiagnosis(models.Model): |
||||
|
"""The class is used for the machine diagnosis""" |
||||
|
_name = 'machine.diagnosis' |
||||
|
_description = "Machine Diagnosis" |
||||
|
_rec_name = 'diagnosis_seq' |
||||
|
|
||||
|
project_id = fields.Many2one('project.project', string='Project', |
||||
|
help="The project associated with this machine diagnosis or repair.") |
||||
|
customer_id = fields.Many2one('res.partner', string="Customer", |
||||
|
help="The customer for whom this project is being carried out.", |
||||
|
required=True) |
||||
|
deadline = fields.Date(string='Deadline', |
||||
|
help="The final due date for completing the project.", |
||||
|
required=True) |
||||
|
diagnosis_seq = fields.Char(string='Diagnosis Sequence', copy=False, |
||||
|
help="Unique sequence number assigned to each diagnosis record.", |
||||
|
readonly=True, index=True, |
||||
|
default=lambda self: 'New') |
||||
|
note = fields.Html(string="Note", |
||||
|
help="Additional details or comments regarding the project.") |
||||
|
notes = fields.Html(string="Notes", |
||||
|
help="General notes related to the project.") |
||||
|
part_ids = fields.One2many('machine.consume', 'dia_estimate_id', |
||||
|
string="Parts", |
||||
|
help="List of machine parts consumed during the repair or diagnosis process.") |
||||
|
timesheet_ids = fields.One2many('repair.timesheet', 'diagnosis_id', |
||||
|
string="Timesheet", |
||||
|
help="Timesheet entries that log the time spent on machine repairs.") |
||||
|
seq = fields.Char(string='Sequence', |
||||
|
help="Unique identifier for this record.") |
||||
|
assigning_date = fields.Date(string="Assigning Date", |
||||
|
help="The date on which the project or diagnosis was assigned.") |
||||
|
machine_repair_ref_id = fields.Many2one('machine.repair', |
||||
|
string="Reference", |
||||
|
help="Reference to the related machine repair record.") |
||||
|
|
||||
|
@api.model_create_multi |
||||
|
def create(self, vals_list): |
||||
|
"""Sequence generator""" |
||||
|
for vals in vals_list: |
||||
|
if vals.get('diagnosis_seq', 'New') == 'New': |
||||
|
vals['diagnosis_seq'] = self.env['ir.sequence'].next_by_code( |
||||
|
'machine.diagnosis') or 'New' |
||||
|
result = super().create(vals_list) |
||||
|
return result |
||||
|
|
||||
|
def action_create_quotation(self): |
||||
|
"""Function to create quotation from machine diagnosis""" |
||||
|
quotation = self.env['sale.order'].create({ |
||||
|
'partner_id': self.customer_id.id, |
||||
|
'date_order': self.deadline, |
||||
|
'machine_diagnosis_ref': self.diagnosis_seq, |
||||
|
}) |
||||
|
quotation.order_line = [(5, 0, 0)] |
||||
|
for rec in self.part_ids: |
||||
|
vals = { |
||||
|
'product_id': rec.machine_id.id, |
||||
|
'name': rec.machine_id.default_code if rec.machine_id.default_code else '', |
||||
|
'product_uom_qty': rec.qty, |
||||
|
'price_unit': rec.machine_id.list_price, |
||||
|
} |
||||
|
quotation.order_line = [(0, 0, vals)] |
||||
|
return { |
||||
|
'res_model': 'sale.order', |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'res_id': quotation.id, |
||||
|
'view_mode': 'form', |
||||
|
'target': 'current', |
||||
|
'context': "{'create': False ,}" |
||||
|
} |
||||
@ -0,0 +1,251 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import _, api, fields, models |
||||
|
from odoo.exceptions import ValidationError |
||||
|
|
||||
|
|
||||
|
class MachineRepair(models.Model): |
||||
|
"""This is used for the machine repair management""" |
||||
|
_name = 'machine.repair' |
||||
|
_description = "Machine Repair" |
||||
|
_rec_name = "repair_seq" |
||||
|
|
||||
|
name = fields.Char(string='Name', help="Name of the repair request.", |
||||
|
required=True) |
||||
|
repair_seq = fields.Char(string='Repair Sequence', copy=False, |
||||
|
help="Unique sequence number assigned to each repair request.", |
||||
|
readonly=True, index=True, |
||||
|
default=lambda self: 'New') |
||||
|
customer_id = fields.Many2one('res.partner', string="Customer", |
||||
|
help="The customer who requested the repair.", |
||||
|
required=True) |
||||
|
customer_email = fields.Char(string='Customer E-mail', |
||||
|
related="customer_id.email", |
||||
|
help="Email address of the customer.") |
||||
|
phone = fields.Char(string='Phone', related="customer_id.phone", |
||||
|
help="Phone number of the customer.") |
||||
|
repairing_reason = fields.Char(string='Repairing Reason', |
||||
|
help="The reason why the repair is needed.") |
||||
|
machine_brand = fields.Char(string='Machine Brand', |
||||
|
help="The brand of the machine being repaired.") |
||||
|
machine_model = fields.Char(string="Model", |
||||
|
help="The specific model of the machine.") |
||||
|
manufacturing_year = fields.Date(string='Manufacturing Year', |
||||
|
help="The year in which the machine was manufactured.") |
||||
|
priority = fields.Selection( |
||||
|
[('high', 'High'), ('normal', 'Normal'),('low', 'Low')], |
||||
|
string="Priority", help="Priority level of the repair request.", |
||||
|
required=True) |
||||
|
repair_detail = fields.Text(string='Repair Reason In Detail', |
||||
|
help="Detailed description of the repair issue.", |
||||
|
required=True) |
||||
|
technician_id = fields.Many2one('hr.employee', string="Technician", |
||||
|
help="The technician assigned to perform the repair.") |
||||
|
technician_member_ids = fields.Many2many('hr.employee', |
||||
|
string="Technical Members", |
||||
|
help="Additional technical members assisting in the repair.") |
||||
|
email = fields.Char('Email', related='technician_id.work_email', |
||||
|
help="Email address of the assigned technician.") |
||||
|
company_id = fields.Many2one('res.company', string="Company", |
||||
|
help="The company responsible for the repair.", |
||||
|
default=lambda self: self.env.company) |
||||
|
project_id = fields.Many2one('project.project', string="Project", |
||||
|
help="Project associated with this repair request.") |
||||
|
department_id = fields.Many2one('hr.department', string="Department", |
||||
|
help="The department responsible for handling the repair.") |
||||
|
repair_req_date = fields.Date(string='Repair Date', |
||||
|
help="The date on which the repair was requested.") |
||||
|
closing_date = fields.Date(string='Closing Date', required=True, |
||||
|
help="The date when the repair was completed and closed.") |
||||
|
repairing_duration = fields.Float(string="Repairing Duration", |
||||
|
help="Total time taken for the repair process (in hours).") |
||||
|
is_repaired = fields.Boolean(string='Is Repaired', |
||||
|
help="Indicates whether the repair request has been successfully completed.") |
||||
|
machine_id = fields.Many2one('product.product', string="Machine", |
||||
|
help="The machine that needs to be repaired.", |
||||
|
domain=[('is_machine', '=', True)]) |
||||
|
machine_categ_id = fields.Many2one('product.category', |
||||
|
string='Machine Category', |
||||
|
help="The category to which the machine belongs.") |
||||
|
color = fields.Char(string='Color', help="The color of the machine.") |
||||
|
damage = fields.Char(string='Damage', |
||||
|
help="Description of the damage on the machine.") |
||||
|
warranty = fields.Boolean(string='Warranty', |
||||
|
help="Indicates whether the machine is under warranty.") |
||||
|
Warranty_exp_date = fields.Date(string="Warranty Expiration Date", |
||||
|
help="The date when the machine's warranty expires.") |
||||
|
authority_name = fields.Char(string='Authority Name', |
||||
|
help="Name of the authority responsible for approving the repair.") |
||||
|
service_id = fields.Many2one('machine.service', string="Service", |
||||
|
help="The type of service required for the machine.") |
||||
|
customer_rating = fields.Char(string='Customer Rating', |
||||
|
help="Customer's rating for the repair service.") |
||||
|
customer_comments = fields.Char(string='Customer Comments', |
||||
|
help="Additional feedback or comments provided by the customer.") |
||||
|
extra_info = fields.Html(string="Information", |
||||
|
help="Additional details or documentation related to the repair.") |
||||
|
repair_team_id = fields.Many2one('repair.team', string="Repair Team", |
||||
|
help="The team assigned to carry out the repair.") |
||||
|
nature_of_service_id = fields.Many2one('machine.service', |
||||
|
string="Nature of Service", |
||||
|
help="Defines the type of service the machine requires.") |
||||
|
repair_type_id = fields.Many2many('machine.service.type', |
||||
|
string="Repair Types", |
||||
|
help="Different types of repairs applicable to this machine.") |
||||
|
problem = fields.Char(string='Problem', |
||||
|
help="A brief description of the issue faced by the machine.") |
||||
|
note = fields.Html(string='Note', |
||||
|
help="Additional notes regarding the repair process.") |
||||
|
state = fields.Selection(string='Status', required=True, readonly=True, |
||||
|
copy=False, selection=[('new', 'New'), |
||||
|
('assigned', 'Assigned'), |
||||
|
('closed', 'Closed'), |
||||
|
('send', 'Mail Sent'), |
||||
|
('reopen', 'Reopened'), ], |
||||
|
default='new', |
||||
|
help="Current status of the repair request.") |
||||
|
image1 = fields.Binary(string='Image 1', |
||||
|
help="First image of the machine before or after repair.") |
||||
|
image2 = fields.Binary(string='Image 2', |
||||
|
help="Second image of the machine before or after repair.") |
||||
|
image3 = fields.Binary(string='Image 3', |
||||
|
help="Third image of the machine before or after repair.") |
||||
|
image4 = fields.Binary(string='Image 4', |
||||
|
help="Fourth image of the machine before or after repair.") |
||||
|
image5 = fields.Binary(string='Image 5', |
||||
|
help="Fifth image of the machine before or after repair.") |
||||
|
timesheet_ids = fields.One2many('repair.timesheet', 'inverse_id', |
||||
|
string="Timesheet", |
||||
|
help="Records the working hours spent on this repair.") |
||||
|
consume_part_ids = fields.One2many('machine.consume', 'consume_id', |
||||
|
string="Consumer Parts", |
||||
|
help="List of machine parts consumed during the repair.") |
||||
|
is_team_assigned = fields.Boolean(string='Is Team Assigned', |
||||
|
help="Indicates whether a repair team has been assigned to this repair request.") |
||||
|
diagnosis_ids = fields.One2many('machine.diagnosis','machine_repair_ref_id', |
||||
|
help="List of diagnosis records related to this machine repair.") |
||||
|
workorder_ids = fields.One2many('machine.workorder','repair_id', |
||||
|
help="List of workorder records related to this machine repair.") |
||||
|
|
||||
|
@api.constrains('repair_req_date', 'closing_date') |
||||
|
def _check_date_order(self): |
||||
|
"""Ensures that 'closing_date' is later than 'repair_req_date'. |
||||
|
Raises:ValidationError: If 'closing_date' is less than to 'repair_req_date'.""" |
||||
|
for record in self: |
||||
|
if record.repair_req_date and record.closing_date and record.closing_date < record.repair_req_date: |
||||
|
raise ValidationError( _("Close Date must be greater than Repair Date.")) |
||||
|
|
||||
|
@api.model_create_multi |
||||
|
def create(self, vals_list): |
||||
|
"""Sequence generator""" |
||||
|
for vals in vals_list: |
||||
|
if vals.get('repair_seq', 'New') == 'New' or vals.get('repair_seq','') == '': |
||||
|
vals['repair_seq'] = self.env['ir.sequence'].next_by_code('machine.repair') or 'New' |
||||
|
result = super().create(vals_list) |
||||
|
return result |
||||
|
|
||||
|
@api.onchange('repair_team_id') |
||||
|
def onchange_repair_team(self): |
||||
|
val = self.env['repair.team'].search( |
||||
|
[('id', '=', self.repair_team_id.id)]).mapped('member_ids').mapped('member_id').ids |
||||
|
self.technician_member_ids = val |
||||
|
|
||||
|
def action_create_diagnosis(self): |
||||
|
"""This is used to create the diagnosis""" |
||||
|
diagnosis = self.env['machine.diagnosis'].create({ |
||||
|
'machine_repair_ref_id': self.id, |
||||
|
'project_id': self.project_id.id, |
||||
|
'customer_id': self.customer_id.id, |
||||
|
'deadline': self.closing_date, |
||||
|
}) |
||||
|
return {'res_model': 'machine.diagnosis', |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'res_id': diagnosis.id, |
||||
|
'view_mode': 'form', |
||||
|
'target': 'current', |
||||
|
'context': "{'create': False ,}"} |
||||
|
|
||||
|
def action_create_work_order(self): |
||||
|
"""Creating job order from repair request""" |
||||
|
self.env['machine.workorder'].create({ |
||||
|
'repair_id': self.id, |
||||
|
'customer_id': self.customer_id.id, |
||||
|
'date': self.repair_req_date, |
||||
|
'priority': self.priority, |
||||
|
}) |
||||
|
return {'res_model': 'machine.workorder', |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'res_id': self.id, |
||||
|
'view_mode': 'form', |
||||
|
'target': 'current', |
||||
|
'context': "{'create': False ,}"} |
||||
|
|
||||
|
def action_reopen(self): |
||||
|
"""Reopen the repair""" |
||||
|
self.state = 'reopen' |
||||
|
|
||||
|
def action_close_repairing(self): |
||||
|
"""Repair closed""" |
||||
|
self.state = 'closed' |
||||
|
|
||||
|
def action_assign_teams(self): |
||||
|
"""Assigning repair to teams""" |
||||
|
if self.repair_team_id: |
||||
|
val = self.env['repair.team'].browse(self.repair_team_id.id) |
||||
|
val.write({'repair_work_ids': [(4, self.id)],}) |
||||
|
self.is_team_assigned = True |
||||
|
self.state = 'assigned' |
||||
|
else: |
||||
|
self.state = 'new' |
||||
|
raise ValidationError("There Is No Repair Team Is Specified") |
||||
|
|
||||
|
def action_send_email(self): |
||||
|
"""Sending mails to customers by informing closing the repair request""" |
||||
|
template_id = self.env.ref('base_machine_repair_management.repair_request_close_email_template').id |
||||
|
self.env['mail.template'].browse(template_id).send_mail(self.id, force_send=True) |
||||
|
self.state = "send" |
||||
|
|
||||
|
def get_machine_diagnosis(self): |
||||
|
"""Opens a window action displaying all diagnosis records related to |
||||
|
the current machine repair.""" |
||||
|
self.ensure_one() |
||||
|
return { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'name': 'Machine Diagnosis', |
||||
|
'view_mode': 'list,form', |
||||
|
'res_model': 'machine.diagnosis', |
||||
|
'domain': [('machine_repair_ref_id', '=', self.id)], |
||||
|
'context': "{'create': False}" |
||||
|
} |
||||
|
|
||||
|
def get_machine_workorder(self): |
||||
|
"""Opens a window action displaying all work order records related to |
||||
|
the current machine repair.""" |
||||
|
self.ensure_one() |
||||
|
return { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'name': 'Machine workorder', |
||||
|
'view_mode': 'list,form', |
||||
|
'res_model': 'machine.workorder', |
||||
|
'domain': [('repair_id', '=', self.id)], |
||||
|
'context': "{'create': False}" |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class MachineService(models.Model): |
||||
|
"""This model stores information about machine services.""" |
||||
|
_name = 'machine.service' |
||||
|
_description = 'Machine Service' |
||||
|
|
||||
|
name = fields.Char(string='Name', help="The name of the machine service.", |
||||
|
required=True) |
||||
|
service_type = fields.Many2one('machine.service.type', |
||||
|
string="Machine Service Type", |
||||
|
help="The type of machine service associated with this service.") |
||||
@ -0,0 +1,34 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class MachineServiceType(models.Model): |
||||
|
"""This class is used for the service type for the machine""" |
||||
|
_name = 'machine.service.type' |
||||
|
_description = "Machine Service Type" |
||||
|
_rec_name = "service_type_name" |
||||
|
|
||||
|
service_type_name = fields.Char(string='Name', |
||||
|
help="Name of the service type", |
||||
|
required=True) |
||||
|
code = fields.Char(string='Code', help="Code for the service type") |
||||
@ -0,0 +1,52 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class MachineWorkOrder(models.Model): |
||||
|
"""This model is used to manage machine work orders.""" |
||||
|
_name = 'machine.workorder' |
||||
|
_description = "Machine Work Order" |
||||
|
_rec_name = "work_order_id" |
||||
|
|
||||
|
work_order_id = fields.Many2one('machine.service', string="Work Order", |
||||
|
help="The service associated with this work order.") |
||||
|
customer_id = fields.Many2one('res.partner', string="Customer", |
||||
|
help="The customer requesting the work order.") |
||||
|
date = fields.Date(string="Date", help="The date when the work order is created.") |
||||
|
priority = fields.Selection([('high', 'High'), ('normal', 'Normal'),('low', 'Low')], |
||||
|
string="Priority", |
||||
|
help="The priority level of the work order.") |
||||
|
scheduled_date = fields.Date(string='Scheduled Date', |
||||
|
help="The scheduled start date for the work order.") |
||||
|
planned_end_date = fields.Date(string='Planned End Date', |
||||
|
help="The planned completion date of the work order.") |
||||
|
duration = fields.Float(string='Duration', |
||||
|
help="The estimated duration of the work order in hours.") |
||||
|
start_date = fields.Date(string='Start Date', |
||||
|
help="The actual start date of the work order.") |
||||
|
end_date = fields.Date(string='End Date', |
||||
|
help="The actual end date of the work order.") |
||||
|
hours_worked = fields.Float(string="Hours Spent", |
||||
|
help="The total number of hours worked on this order.") |
||||
|
repair_id = fields.Many2one('machine.repair', string="Repair", |
||||
|
help="Reference to the related machine repair record.") |
||||
@ -0,0 +1,31 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class Product(models.Model): |
||||
|
_inherit = 'product.product' |
||||
|
|
||||
|
is_machine = fields.Boolean(string="Is Machine", default=False, |
||||
|
help="which is used to identify the machines.") |
||||
|
is_machine_parts = fields.Boolean(string="Is Machine Part", default=False, |
||||
|
help="which is used to identify the machine parts.") |
||||
@ -0,0 +1,41 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class RepairTeam(models.Model): |
||||
|
"""This model is used to define repair teams responsible for handling machine repairs.""" |
||||
|
_name = 'repair.team' |
||||
|
_description = 'Repair Team' |
||||
|
_rec_name = "team_name" |
||||
|
|
||||
|
team_name = fields.Char(string='Name', |
||||
|
help="The name of the repair team.", required=True) |
||||
|
team_lead_id = fields.Many2one('hr.employee', string="Team Lead", |
||||
|
help="The leader of the repair team.", |
||||
|
required=True) |
||||
|
repair_work_ids = fields.Many2many('machine.repair', string='Repair Reference', |
||||
|
readonly=True, |
||||
|
help="References to machine repairs assigned to the team.") |
||||
|
member_ids = fields.One2many('team.member', 'inverse_id', |
||||
|
string="Members", copy=False, |
||||
|
help="Members assigned to the repair team.") |
||||
@ -0,0 +1,42 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class RepairTimesheet(models.Model): |
||||
|
"""This model is used to track timesheets for repair management.""" |
||||
|
_name = 'repair.timesheet' |
||||
|
_description = "Repair Timesheet" |
||||
|
_rec_name = 'user_id' |
||||
|
|
||||
|
inverse_id = fields.Many2one('machine.repair', string="Machine Repair", |
||||
|
help="Reference to the related machine repair.") |
||||
|
date = fields.Date(string='Date', help="Date of timesheet entry.") |
||||
|
user_id = fields.Many2one('res.users', string="User", |
||||
|
help="User associated with this timesheet.") |
||||
|
project_id = fields.Many2one('project.project', string="Project", |
||||
|
help="Project linked to this timesheet.") |
||||
|
description = fields.Char(string='Description', |
||||
|
help="Details of the work done.") |
||||
|
hours = fields.Float(string='Duration', help="Total hours worked.") |
||||
|
diagnosis_id = fields.Many2one('machine.diagnosis', string="Diagnosis", |
||||
|
help="Related machine diagnosis.") |
||||
@ -0,0 +1,38 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import models |
||||
|
|
||||
|
|
||||
|
class ResPartner(models.Model): |
||||
|
"""This is used to return the partner's repair requests""" |
||||
|
_inherit = 'res.partner' |
||||
|
|
||||
|
def action_repair_requests(self): |
||||
|
"""It returns the repair requests for the customers""" |
||||
|
return { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'name': 'Machine Repair Requests', |
||||
|
'view_mode': 'tree', |
||||
|
'res_model': 'machine.repair', |
||||
|
'domain': [('customer_id', '=', self.id)], |
||||
|
'context': "{'create': False}" |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class SaleOrder(models.Model): |
||||
|
"""Inheriting Sale order to add a new field""" |
||||
|
_inherit = 'sale.order' |
||||
|
|
||||
|
machine_diagnosis_ref = fields.Char( |
||||
|
string='Diagnosis Reference', |
||||
|
help="Unique reference identifier for the machine diagnosis." |
||||
|
) |
||||
@ -0,0 +1,51 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
|
||||
|
class TeamMember(models.Model): |
||||
|
"""This is used for the team members of repair team""" |
||||
|
_name = 'team.member' |
||||
|
_description = 'Team Member' |
||||
|
_rec_name = 'member_id' |
||||
|
|
||||
|
@api.onchange('member_id','inverse_id') |
||||
|
def _onchange_member_id(self): |
||||
|
""" On change of 'member_id' or 'inverse_id', links all member_ids from records |
||||
|
with the same inverse_id to the current record.""" |
||||
|
for rec in self: |
||||
|
if rec.inverse_id.ids: |
||||
|
member_ids = self.search([('inverse_id','=',rec.inverse_id.ids[0])]).member_id |
||||
|
else: |
||||
|
member_ids = [] |
||||
|
for member_id in member_ids: |
||||
|
rec.member_ids = [fields.Command.link(member_id.id)] |
||||
|
|
||||
|
inverse_id = fields.Many2one('repair.team', string="Repair Team", |
||||
|
help="The repair team associated with this member.") |
||||
|
member_id = fields.Many2one('hr.employee', string="Member", |
||||
|
help="The employee who is a member of the repair team.", |
||||
|
domain="[('id', 'not in', member_ids)]", |
||||
|
required=True) |
||||
|
member_ids = fields.Many2many('hr.employee',help="To store values for member_id") |
||||
|
login = fields.Char(related='member_id.work_email', string="Login", |
||||
|
help="The work email used as the login credential for the repair team member.") |
||||
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import machine_repair_report |
||||
@ -0,0 +1,57 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Afra MP (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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class MachineRepairReport(models.AbstractModel): |
||||
|
"""This is used to return the report data""" |
||||
|
_name = 'report.base_machine_repair_management.machine_repair_report' |
||||
|
_description = 'Report for machine repair management' |
||||
|
|
||||
|
def _get_report_values(self, docids, data=None): |
||||
|
"""This function is used to get the report data""" |
||||
|
data = data or {} |
||||
|
domain = [] |
||||
|
|
||||
|
if data.get('from_date') and data.get('to_date'): |
||||
|
domain.append(('repair_req_date', '>=', data['from_date'])) |
||||
|
domain.append(('repair_req_date', '<=', data['to_date'])) |
||||
|
elif data.get('from_date') and not data.get('to_date'): |
||||
|
domain.append(('repair_req_date', '>=', data['from_date'])) |
||||
|
elif data.get('to_date') and not data.get('from_date'): |
||||
|
domain.append(('repair_req_date', '<=', data['to_date'])) |
||||
|
|
||||
|
if data.get('company_id'): |
||||
|
domain.append(('company_id', '=', data['company_id'])) |
||||
|
if docids: |
||||
|
repairs = self.env['machine.repair'].browse(docids) |
||||
|
else: |
||||
|
repairs = self.env['machine.repair'].search(domain) |
||||
|
|
||||
|
return { |
||||
|
'date': fields.Date.today(), |
||||
|
'doc_ids': repairs.ids, |
||||
|
'doc_model': 'machine.repair', |
||||
|
'repair_requests': repairs, |
||||
|
'company': self.env.company, |
||||
|
'data': data, |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Which is used to create the machine repair report action--> |
||||
|
<record id="action_repair_report" model="ir.actions.report"> |
||||
|
<field name="name">Machine Repair Report</field> |
||||
|
<field name="model">machine.repair</field> |
||||
|
<field name="report_type">qweb-pdf</field> |
||||
|
<field name="report_name">base_machine_repair_management.machine_repair_report</field> |
||||
|
<field name="report_file">base_machine_repair_management.machine_repair_report</field> |
||||
|
<field name="print_report_name">'Machine Repair Report - %s' % (object.name) |
||||
|
</field> |
||||
|
<field name="binding_model_id" ref="model_machine_repair"/> |
||||
|
<field name="binding_type">report</field> |
||||
|
<field name="attachment_use">True</field> |
||||
|
</record> |
||||
|
</odoo> |
||||
@ -0,0 +1,173 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- This is the machine report template--> |
||||
|
<template id="machine_repair_report"> |
||||
|
<t t-call="web.external_layout"> |
||||
|
<t t-call="web.html_container"> |
||||
|
<div class="page"> |
||||
|
<div class="oe_structure"/> |
||||
|
<div class="text-center"> |
||||
|
<h2>Machine Repair Report</h2> |
||||
|
</div> |
||||
|
<t t-if="repair_requests"> |
||||
|
<t t-foreach="repair_requests" t-as="repair"> |
||||
|
<div> |
||||
|
<div> |
||||
|
<span>Customer Name:</span> |
||||
|
<t t-esc="repair.customer_id.name"/> |
||||
|
<br/> |
||||
|
<span>Customer Email:</span> |
||||
|
<t t-esc="repair.customer_email"/> |
||||
|
<br/> |
||||
|
<span>Phone:</span> |
||||
|
<t t-esc="repair.phone"/> |
||||
|
<br/> |
||||
|
</div> |
||||
|
<br/> |
||||
|
</div> |
||||
|
<h3> |
||||
|
<u>Machine Details</u> |
||||
|
</h3> |
||||
|
<table class="table table-sm o_main_table mt-4"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th name="th_description"> |
||||
|
Machine Name |
||||
|
</th> |
||||
|
<th name="th_quantity" |
||||
|
t-if="repair.machine_categ_id"> |
||||
|
Machine Category |
||||
|
</th> |
||||
|
<th name="th_description"> |
||||
|
Color |
||||
|
</th> |
||||
|
<th name="th_description"> |
||||
|
Brand |
||||
|
</th> |
||||
|
<th name="th_description"> |
||||
|
Model |
||||
|
</th> |
||||
|
<th name="th_description"> |
||||
|
Manufacturing Year |
||||
|
</th> |
||||
|
<th name="th_priority"> |
||||
|
Priority |
||||
|
</th> |
||||
|
<th name="th_description"> |
||||
|
Warranty |
||||
|
</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<span t-field="repair.machine_id.name"/> |
||||
|
</td> |
||||
|
<td t-if="repair.machine_categ_id"> |
||||
|
<t t-esc="repair.machine_categ_id.name"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="repair.color"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="repair.machine_brand"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="repair.machine_model"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-esc="repair.manufacturing_year"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<span t-field="repair.priority"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<t t-if="repair.warranty"> |
||||
|
Yes |
||||
|
</t> |
||||
|
<t t-else=""> |
||||
|
No |
||||
|
</t> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
<h3> |
||||
|
<u>Other Information</u> |
||||
|
</h3> |
||||
|
<div> |
||||
|
<span>Request Date:</span> |
||||
|
<t t-esc="repair.repair_req_date"/> |
||||
|
<br/> |
||||
|
<span>Repair Date:</span> |
||||
|
<t t-esc="repair.closing_date"/> |
||||
|
<br/> |
||||
|
<span>Is Repaired:</span> |
||||
|
<t t-if="repair.is_repaired"> |
||||
|
Yes |
||||
|
</t> |
||||
|
<t t-else=""> |
||||
|
No |
||||
|
</t> |
||||
|
<br/> |
||||
|
<span>Repairing Duration:</span> |
||||
|
<t t-esc="repair.repairing_duration"/> |
||||
|
<br/> |
||||
|
</div> |
||||
|
<div t-if="repair.timesheet_ids"> |
||||
|
<h3> |
||||
|
<u>Timesheets</u> |
||||
|
</h3> |
||||
|
<div> |
||||
|
<table class="table table-sm o_main_table mt-4"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th name="th_description"> |
||||
|
Date |
||||
|
</th> |
||||
|
<th name="th_description"> |
||||
|
User |
||||
|
</th> |
||||
|
<th name="th_description"> |
||||
|
Project |
||||
|
</th> |
||||
|
<th name="th_description"> |
||||
|
Duration |
||||
|
</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
<t t-foreach="repair.timesheet_ids" |
||||
|
t-as="timesheet_id"> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<span t-field="timesheet_id.date"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<span t-field="timesheet_id.user_id.name"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<span t-field="timesheet_id.project_id.name"/> |
||||
|
</td> |
||||
|
<td> |
||||
|
<span t-field="timesheet_id.hours"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
|
||||
|
</t> |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else=""> |
||||
|
<h3> |
||||
|
There is no repair request... |
||||
|
</h3> |
||||
|
</t> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
</template> |
||||
|
</odoo> |
||||
@ -0,0 +1,23 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- User Group Category --> |
||||
|
<record id="base_machine_repair_module_management" model="ir.module.category"> |
||||
|
<field name="name">Machine Repair</field> |
||||
|
<field name="description">Access to Machine Repair Features</field> |
||||
|
<field name="sequence">10</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Sales Person --> |
||||
|
<record id="repair_user_access" model="res.groups"> |
||||
|
<field name="name">Sales Persons</field> |
||||
|
<field name="category_id" ref="base_machine_repair_module_management"/> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Repair Manager --> |
||||
|
<record id="repair_manager_access" model="res.groups"> |
||||
|
<field name="name">Repair Manager</field> |
||||
|
<field name="category_id" ref="base_machine_repair_module_management"/> |
||||
|
<field name="implied_ids" eval="[(4, ref('repair_user_access'))]"/> |
||||
|
</record> |
||||
|
</odoo> |
||||
|
|
||||
|
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 210 KiB |
|
After Width: | Height: | Size: 209 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 495 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 624 B |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 929 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 542 B |
|
After Width: | Height: | Size: 576 B |
|
After Width: | Height: | Size: 733 B |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 911 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 600 B |
|
After Width: | Height: | Size: 673 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 926 B |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 878 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 800 B |
|
After Width: | Height: | Size: 905 B |
|
After Width: | Height: | Size: 189 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 839 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 427 B |
|
After Width: | Height: | Size: 627 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 988 B |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 875 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 776 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 697 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 80 KiB |