From 8a3d5fde4efab8ed48bb337e792a3ced58c641e9 Mon Sep 17 00:00:00 2001
From: AjmalCybro
Date: Wed, 22 Nov 2023 16:40:21 +0530
Subject: [PATCH] Nov 22 : [ADD] Initial Commit 'mobile_service_shop'
---
mobile_service_shop/README.rst | 36 +
mobile_service_shop/__init__.py | 24 +
mobile_service_shop/__manifest__.py | 55 ++
.../data/mobile_service_data.xml | 23 +
.../data/mobile_service_email_template.xml | 21 +
mobile_service_shop/doc/RELEASE_NOTES.md | 6 +
mobile_service_shop/models/__init__.py | 31 +
mobile_service_shop/models/brand_model.py | 37 +
mobile_service_shop/models/mobile_brand.py | 32 +
.../models/mobile_complaint.py | 33 +
.../models/mobile_complaint_description.py | 36 +
.../models/mobile_complaint_tree.py | 43 +
mobile_service_shop/models/mobile_service.py | 363 +++++++++
.../models/product_order_line.py | 92 +++
.../models/product_template.py | 41 +
mobile_service_shop/models/service_ticket.py | 46 ++
mobile_service_shop/models/terms_condition.py | 40 +
.../reports/mobile_service_email_template.xml | 78 ++
.../reports/mobile_service_ticket.xml | 13 +
.../security/ir.model.access.csv | 15 +
.../security/mobile_service_shop_security.xml | 35 +
.../description/assets/icons/capture (1).png | Bin 0 -> 36623 bytes
.../static/description/assets/icons/check.png | Bin 0 -> 3676 bytes
.../description/assets/icons/chevron.png | Bin 0 -> 310 bytes
.../static/description/assets/icons/cogs.png | Bin 0 -> 1377 bytes
.../description/assets/icons/consultation.png | Bin 0 -> 1458 bytes
.../description/assets/icons/ecom-black.png | Bin 0 -> 576 bytes
.../assets/icons/education-black.png | Bin 0 -> 733 bytes
.../description/assets/icons/hotel-black.png | Bin 0 -> 911 bytes
.../static/description/assets/icons/img.png | Bin 0 -> 1173 bytes
.../description/assets/icons/license.png | Bin 0 -> 1095 bytes
.../description/assets/icons/lifebuoy.png | Bin 0 -> 1199 bytes
.../assets/icons/manufacturing-black.png | Bin 0 -> 673 bytes
.../assets/icons/photo-capture.png | Bin 0 -> 10898 bytes
.../description/assets/icons/pos-black.png | Bin 0 -> 878 bytes
.../description/assets/icons/puzzle.png | Bin 0 -> 653 bytes
.../assets/icons/restaurant-black.png | Bin 0 -> 905 bytes
.../assets/icons/service-black.png | Bin 0 -> 839 bytes
.../assets/icons/trading-black.png | Bin 0 -> 427 bytes
.../description/assets/icons/training.png | Bin 0 -> 627 bytes
.../description/assets/icons/update.png | Bin 0 -> 1225 bytes
.../static/description/assets/icons/user.png | Bin 0 -> 988 bytes
.../description/assets/icons/wrench.png | Bin 0 -> 1205 bytes
.../description/assets/misc/Cybrosys R.png | Bin 0 -> 82191 bytes
.../static/description/assets/misc/email.svg | 33 +
.../static/description/assets/misc/phone.svg | 3 +
.../description/assets/misc/star (1) 2.svg | 9 +
.../description/assets/misc/support (1) 1.svg | 9 +
.../description/assets/misc/support-email.svg | 6 +
.../description/assets/misc/tick-mark.svg | 17 +
.../description/assets/misc/whatsapp 1.svg | 9 +
.../description/assets/misc/whatsapp.svg | 33 +
.../static/description/assets/modules/1.png | Bin 0 -> 73295 bytes
.../static/description/assets/modules/2.png | Bin 0 -> 83659 bytes
.../static/description/assets/modules/3.png | Bin 0 -> 20375 bytes
.../static/description/assets/modules/4.png | Bin 0 -> 88146 bytes
.../static/description/assets/modules/5.png | Bin 0 -> 70058 bytes
.../static/description/assets/modules/6.png | Bin 0 -> 88721 bytes
.../description/assets/screenshots/11.png | Bin 0 -> 175264 bytes
.../assets/screenshots/config_settings.png | Bin 0 -> 57765 bytes
.../description/assets/screenshots/hero.gif | Bin 0 -> 184751 bytes
.../assets/screenshots/invoice.png | Bin 0 -> 147956 bytes
.../description/assets/screenshots/mail.png | Bin 0 -> 123299 bytes
.../assets/screenshots/product.png | Bin 0 -> 36140 bytes
.../assets/screenshots/product_page.png | Bin 0 -> 146958 bytes
.../assets/screenshots/product_page_2.png | Bin 0 -> 114425 bytes
.../description/assets/screenshots/ss1.png | Bin 0 -> 76227 bytes
.../static/description/banner.jpg | Bin 0 -> 90339 bytes
.../static/description/icon.png | Bin 0 -> 8083 bytes
.../static/description/index.html | 741 ++++++++++++++++++
.../static/src/css/mobile_service.css | 6 +
.../views/brand_models_views.xml | 80 ++
.../views/mobile_brand_views.xml | 45 ++
.../mobile_complaint_description_views.xml | 47 ++
.../views/mobile_complaint_views.xml | 46 ++
.../views/mobile_service_views.xml | 276 +++++++
.../views/product_product_views.xml | 56 ++
.../views/product_template_views.xml | 30 +
.../views/terms_and_condition_views.xml | 44 ++
mobile_service_shop/wizard/__init__.py | 23 +
.../wizard/mobile_create_invoice.py | 157 ++++
.../wizard/mobile_create_invoice_views.xml | 37 +
82 files changed, 2807 insertions(+)
create mode 100644 mobile_service_shop/README.rst
create mode 100644 mobile_service_shop/__init__.py
create mode 100644 mobile_service_shop/__manifest__.py
create mode 100644 mobile_service_shop/data/mobile_service_data.xml
create mode 100644 mobile_service_shop/data/mobile_service_email_template.xml
create mode 100755 mobile_service_shop/doc/RELEASE_NOTES.md
create mode 100644 mobile_service_shop/models/__init__.py
create mode 100644 mobile_service_shop/models/brand_model.py
create mode 100644 mobile_service_shop/models/mobile_brand.py
create mode 100644 mobile_service_shop/models/mobile_complaint.py
create mode 100644 mobile_service_shop/models/mobile_complaint_description.py
create mode 100644 mobile_service_shop/models/mobile_complaint_tree.py
create mode 100644 mobile_service_shop/models/mobile_service.py
create mode 100644 mobile_service_shop/models/product_order_line.py
create mode 100644 mobile_service_shop/models/product_template.py
create mode 100755 mobile_service_shop/models/service_ticket.py
create mode 100644 mobile_service_shop/models/terms_condition.py
create mode 100644 mobile_service_shop/reports/mobile_service_email_template.xml
create mode 100644 mobile_service_shop/reports/mobile_service_ticket.xml
create mode 100644 mobile_service_shop/security/ir.model.access.csv
create mode 100644 mobile_service_shop/security/mobile_service_shop_security.xml
create mode 100644 mobile_service_shop/static/description/assets/icons/capture (1).png
create mode 100644 mobile_service_shop/static/description/assets/icons/check.png
create mode 100644 mobile_service_shop/static/description/assets/icons/chevron.png
create mode 100644 mobile_service_shop/static/description/assets/icons/cogs.png
create mode 100644 mobile_service_shop/static/description/assets/icons/consultation.png
create mode 100644 mobile_service_shop/static/description/assets/icons/ecom-black.png
create mode 100644 mobile_service_shop/static/description/assets/icons/education-black.png
create mode 100644 mobile_service_shop/static/description/assets/icons/hotel-black.png
create mode 100644 mobile_service_shop/static/description/assets/icons/img.png
create mode 100644 mobile_service_shop/static/description/assets/icons/license.png
create mode 100644 mobile_service_shop/static/description/assets/icons/lifebuoy.png
create mode 100644 mobile_service_shop/static/description/assets/icons/manufacturing-black.png
create mode 100644 mobile_service_shop/static/description/assets/icons/photo-capture.png
create mode 100644 mobile_service_shop/static/description/assets/icons/pos-black.png
create mode 100644 mobile_service_shop/static/description/assets/icons/puzzle.png
create mode 100644 mobile_service_shop/static/description/assets/icons/restaurant-black.png
create mode 100644 mobile_service_shop/static/description/assets/icons/service-black.png
create mode 100644 mobile_service_shop/static/description/assets/icons/trading-black.png
create mode 100644 mobile_service_shop/static/description/assets/icons/training.png
create mode 100644 mobile_service_shop/static/description/assets/icons/update.png
create mode 100644 mobile_service_shop/static/description/assets/icons/user.png
create mode 100644 mobile_service_shop/static/description/assets/icons/wrench.png
create mode 100644 mobile_service_shop/static/description/assets/misc/Cybrosys R.png
create mode 100644 mobile_service_shop/static/description/assets/misc/email.svg
create mode 100644 mobile_service_shop/static/description/assets/misc/phone.svg
create mode 100644 mobile_service_shop/static/description/assets/misc/star (1) 2.svg
create mode 100644 mobile_service_shop/static/description/assets/misc/support (1) 1.svg
create mode 100644 mobile_service_shop/static/description/assets/misc/support-email.svg
create mode 100644 mobile_service_shop/static/description/assets/misc/tick-mark.svg
create mode 100644 mobile_service_shop/static/description/assets/misc/whatsapp 1.svg
create mode 100644 mobile_service_shop/static/description/assets/misc/whatsapp.svg
create mode 100644 mobile_service_shop/static/description/assets/modules/1.png
create mode 100644 mobile_service_shop/static/description/assets/modules/2.png
create mode 100644 mobile_service_shop/static/description/assets/modules/3.png
create mode 100644 mobile_service_shop/static/description/assets/modules/4.png
create mode 100755 mobile_service_shop/static/description/assets/modules/5.png
create mode 100644 mobile_service_shop/static/description/assets/modules/6.png
create mode 100644 mobile_service_shop/static/description/assets/screenshots/11.png
create mode 100644 mobile_service_shop/static/description/assets/screenshots/config_settings.png
create mode 100644 mobile_service_shop/static/description/assets/screenshots/hero.gif
create mode 100644 mobile_service_shop/static/description/assets/screenshots/invoice.png
create mode 100644 mobile_service_shop/static/description/assets/screenshots/mail.png
create mode 100644 mobile_service_shop/static/description/assets/screenshots/product.png
create mode 100644 mobile_service_shop/static/description/assets/screenshots/product_page.png
create mode 100644 mobile_service_shop/static/description/assets/screenshots/product_page_2.png
create mode 100644 mobile_service_shop/static/description/assets/screenshots/ss1.png
create mode 100644 mobile_service_shop/static/description/banner.jpg
create mode 100644 mobile_service_shop/static/description/icon.png
create mode 100644 mobile_service_shop/static/description/index.html
create mode 100644 mobile_service_shop/static/src/css/mobile_service.css
create mode 100644 mobile_service_shop/views/brand_models_views.xml
create mode 100644 mobile_service_shop/views/mobile_brand_views.xml
create mode 100644 mobile_service_shop/views/mobile_complaint_description_views.xml
create mode 100644 mobile_service_shop/views/mobile_complaint_views.xml
create mode 100644 mobile_service_shop/views/mobile_service_views.xml
create mode 100644 mobile_service_shop/views/product_product_views.xml
create mode 100644 mobile_service_shop/views/product_template_views.xml
create mode 100644 mobile_service_shop/views/terms_and_condition_views.xml
create mode 100644 mobile_service_shop/wizard/__init__.py
create mode 100644 mobile_service_shop/wizard/mobile_create_invoice.py
create mode 100644 mobile_service_shop/wizard/mobile_create_invoice_views.xml
diff --git a/mobile_service_shop/README.rst b/mobile_service_shop/README.rst
new file mode 100644
index 000000000..e189f868c
--- /dev/null
+++ b/mobile_service_shop/README.rst
@@ -0,0 +1,36 @@
+Mobile Service Management
+=========================
+Module for mobile service shop daily activities
+
+Configuration
+=============
+* No additional configurations needed
+
+Company
+-------
+* `Cybrosys Techno Solutions `__
+
+Credits
+-------
+* Developers: Milind Mohan @ Cybrosys, odoo@cybrosys.com
+ Mohammed Shahil M P @cybrosys, odoo@cybrosys.com
+ Neenu Merlin Jose @cybrosys, odoo@cybrosys.com
+ Vishnu KP @ Cybrosys, odoo@cybrosys.com
+
+Bug Tracker
+-----------
+Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
+
+Maintainer
+==========
+.. image:: https://cybrosys.com/images/logo.png
+ :target: https://cybrosys.com
+
+This module is maintained by Cybrosys Technologies.
+
+For support and more information, please visit `Our Website `__
+
+Further information
+===================
+HTML Description: ``__
+
diff --git a/mobile_service_shop/__init__.py b/mobile_service_shop/__init__.py
new file mode 100644
index 000000000..215d7140d
--- /dev/null
+++ b/mobile_service_shop/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+
+from . import models
+from . import wizard
diff --git a/mobile_service_shop/__manifest__.py b/mobile_service_shop/__manifest__.py
new file mode 100644
index 000000000..629527777
--- /dev/null
+++ b/mobile_service_shop/__manifest__.py
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+{
+ 'name': 'Mobile Service Management',
+ 'version': '17.0.1.0.0',
+ 'summary': 'Module for managing mobile service shop daily activities.',
+ 'category': 'Industries',
+ 'author': 'Cybrosys Techno Solutions',
+ 'company': 'Cybrosys Techno Solutions',
+ 'website': 'https://www.cybrosys.com',
+ 'depends': ['base', 'stock_account', 'mail', 'product', 'account'],
+ 'data': ['security/mobile_service_shop_security.xml',
+ 'security/ir.model.access.csv',
+ 'views/mobile_service_views.xml',
+ 'views/product_template_views.xml',
+ 'views/product_product_views.xml',
+ 'views/terms_and_condition_views.xml',
+ 'views/mobile_complaint_description_views.xml',
+ 'views/mobile_complaint_views.xml',
+ 'views/brand_models_views.xml',
+ 'views/mobile_brand_views.xml',
+ 'wizard/mobile_create_invoice_views.xml',
+ 'reports/mobile_service_ticket.xml',
+ 'data/mobile_service_data.xml',
+ 'data/mobile_service_email_template.xml'],
+ 'images': ['static/description/banner.jpg'],
+ 'assets': {
+ 'web.assets_backend': [
+ 'mobile_service_shop/static/src/css/mobile_service.css',
+ ],
+ },
+ 'installable': True,
+ 'application': True,
+ 'auto_install': False,
+ 'license': 'LGPL-3',
+}
diff --git a/mobile_service_shop/data/mobile_service_data.xml b/mobile_service_shop/data/mobile_service_data.xml
new file mode 100644
index 000000000..25d4c4a75
--- /dev/null
+++ b/mobile_service_shop/data/mobile_service_data.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+ Mobile Service
+ sale
+ SERV
+ TRUE
+
+
+
+ Mobile Service Charge
+ service
+
+
+
+ Mobile Service Advance
+ service
+
+
+
+
\ No newline at end of file
diff --git a/mobile_service_shop/data/mobile_service_email_template.xml b/mobile_service_shop/data/mobile_service_email_template.xml
new file mode 100644
index 000000000..24724d4d1
--- /dev/null
+++ b/mobile_service_shop/data/mobile_service_email_template.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ Service Status Email
+
+ ${(object.user_id.email |safe}
+ ${object.person_name.email |safe}
+ Ref ${object.name or 'n/a' }
+
+ ${object.person_name.lang}
+ Dear ${object.person_name.name},
+ Your service request for ${object.brand_name.brand_name or 'n/a' } (${object.model_name.mobile_brand_models or 'n/a' }) with reference no ${object.name or 'n/a' } has been processed to ${object.service_state or 'n/a' } stage.
+ If you have any questions, please let us know.
+ Best regards,
]]>
+
+
+
+
\ No newline at end of file
diff --git a/mobile_service_shop/doc/RELEASE_NOTES.md b/mobile_service_shop/doc/RELEASE_NOTES.md
new file mode 100755
index 000000000..056bdabec
--- /dev/null
+++ b/mobile_service_shop/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module
+
+### 17.11.2023
+#### Version 17.0.1.0.0
+#### ADD
+Initial Commit for Mobile Service Management
diff --git a/mobile_service_shop/models/__init__.py b/mobile_service_shop/models/__init__.py
new file mode 100644
index 000000000..82b667825
--- /dev/null
+++ b/mobile_service_shop/models/__init__.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from . import brand_model
+from . import mobile_brand
+from . import mobile_complaint
+from . import mobile_complaint_description
+from . import mobile_complaint_tree
+from . import mobile_service
+from . import product_order_line
+from . import product_template
+from . import service_ticket
+from . import terms_condition
diff --git a/mobile_service_shop/models/brand_model.py b/mobile_service_shop/models/brand_model.py
new file mode 100644
index 000000000..fe540c0e4
--- /dev/null
+++ b/mobile_service_shop/models/brand_model.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class BrandModel(models.Model):
+ """This class represents a mobile brand model"""
+ _name = 'brand.model'
+ _description = 'Brand Model'
+ _rec_name = 'mobile_brand_models'
+
+ mobile_brand_name = fields.Many2one('mobile.brand',
+ string="Mobile Brand", required=True,
+ help="Brand name of the mobile")
+ mobile_brand_models = fields.Char(string="Model Name", required=True,
+ help="Model name of the mobile")
+ image_medium = fields.Binary(string='image', store=True, attachment=True,
+ help="Mobile image space")
diff --git a/mobile_service_shop/models/mobile_brand.py b/mobile_service_shop/models/mobile_brand.py
new file mode 100644
index 000000000..32c814215
--- /dev/null
+++ b/mobile_service_shop/models/mobile_brand.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class MobileBrand(models.Model):
+ """This model represents the Mobile Brand"""
+ _name = 'mobile.brand'
+ _description = 'Mobile Brand'
+ _rec_name = 'brand_name'
+
+ brand_name = fields.Char(string="Mobile Brand", required=True,
+ help="Mobile Brand name")
diff --git a/mobile_service_shop/models/mobile_complaint.py b/mobile_service_shop/models/mobile_complaint.py
new file mode 100644
index 000000000..ccfbec367
--- /dev/null
+++ b/mobile_service_shop/models/mobile_complaint.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class MobileComplaint(models.Model):
+ """This model represents for the mobile Complaint type managing"""
+ _name = 'mobile.complaint'
+ _description = 'Mobile Complaint'
+ _rec_name = 'complaint_type'
+
+ complaint_type = fields.Char(string="Complaint Type", required=True,
+ help="This field specifies the type of the "
+ "complaint.")
\ No newline at end of file
diff --git a/mobile_service_shop/models/mobile_complaint_description.py b/mobile_service_shop/models/mobile_complaint_description.py
new file mode 100644
index 000000000..0abb9f0aa
--- /dev/null
+++ b/mobile_service_shop/models/mobile_complaint_description.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class MobileComplaintDescription(models.Model):
+ """This model represents description about the mobile Complaint"""
+ _name = 'mobile.complaint.description'
+ _description = "Mobile Complaint Description"
+ _rec_name = 'description'
+
+ complaint_type_template = fields.Many2one('mobile.complaint',
+ string="Complaint Type",
+ required=True,
+ help="Complaint type template.")
+ description = fields.Text(string="Description",
+ help="Complaint description.")
diff --git a/mobile_service_shop/models/mobile_complaint_tree.py b/mobile_service_shop/models/mobile_complaint_tree.py
new file mode 100644
index 000000000..7c5c30f51
--- /dev/null
+++ b/mobile_service_shop/models/mobile_complaint_tree.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class MobileComplaintTree(models.Model):
+ _name = 'mobile.complaint.tree'
+ _description = 'Mobile Complaint Tree'
+ _rec_name = 'complaint_type_tree'
+
+ complaint_id = fields.Many2one('mobile.service',
+ string="Complaint ID",
+ help="Complaint id associated with this "
+ "record.")
+ complaint_type_tree = fields.Many2one('mobile.complaint',
+ string="Category",
+ required=True,
+ help="Complaint type tree records.")
+ description_tree = fields.Many2one('mobile.complaint.description',
+ string="Description",
+ domain="[('complaint_type_template',"
+ "'=',complaint_type_tree)]",
+ help="Description field for the "
+ "complaint.")
diff --git a/mobile_service_shop/models/mobile_service.py b/mobile_service_shop/models/mobile_service.py
new file mode 100644
index 000000000..df2e01875
--- /dev/null
+++ b/mobile_service_shop/models/mobile_service.py
@@ -0,0 +1,363 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from datetime import datetime
+from odoo import api, fields, models, _
+from odoo.exceptions import UserError
+import pytz
+
+
+class MobileService(models.Model):
+ _name = 'mobile.service'
+ _rec_name = 'name'
+ _description = "Mobile Service"
+ _inherit = ['mail.thread', 'mail.activity.mixin']
+
+ name = fields.Char(string='Service Number', copy=False, default="New",
+ help="Number of The Service.")
+ person_name = fields.Many2one('res.partner',
+ string="Customer Name", required=True,
+ help="Name of the customer.")
+ contact_no = fields.Char(related='person_name.mobile',
+ string="Contact Number",
+ help="Contact number of the customer.")
+ email_id = fields.Char(related='person_name.email', string="Email",
+ help="Email ID of the customer.")
+ street = fields.Char(related='person_name.street', string="Address",
+ help="Street of the customer.")
+ street2 = fields.Char(related='person_name.street2', string="Address",
+ help="Street2 of the customer.")
+ city = fields.Char(related='person_name.city', string="Address",
+ help="City of the customer.")
+ state_id = fields.Many2one(related='person_name.state_id', string="Address",
+ help="State of the customer.")
+ zip = fields.Char(related='person_name.zip', string="Address",
+ help="Zip number of the customer address.")
+ country_id = fields.Many2one(related='person_name.country_id',
+ string="Address",
+ help="Country of the customer.")
+ brand_name = fields.Many2one('mobile.brand',
+ string="Mobile Brand",
+ help="Brand name of the mobile.")
+ is_in_warranty = fields.Boolean(
+ 'In Warranty', default=False,
+ help="Specify if the product is in warranty.")
+ warranty_number = fields.Char(string="Warranty No ",
+ help="Warranty details.")
+ re_repair = fields.Boolean('Re-repair', default=False,
+ help="Re-repairing.")
+ imei_no = fields.Char(string="IMEI Number",
+ help="IMEI Number of the device.")
+ model_name = fields.Many2one('brand.model', string="Model",
+ domain="[('mobile_brand_name','=',brand_name)]"
+ , help="Model name of the device.")
+ image_medium = fields.Binary(related='model_name.image_medium', store=True,
+ attachment=True, help="Image of the device.")
+ date_request = fields.Date(string="Requested Date",
+ default=fields.Date.context_today,
+ help="Device submitted date.")
+ return_date = fields.Date(string="Return Date", required=True,
+ help="Device returned date.")
+ technician_name = fields.Many2one('res.users',
+ string="Technician Name",
+ default=lambda self: self.env.user,
+ help="Work assigned technician name.",
+ required=True)
+ service_state = fields.Selection(
+ [('draft', 'Draft'), ('assigned', 'Assigned'),
+ ('completed', 'Completed'), ('returned', 'Returned'),
+ ('not_solved', 'Not solved')],
+ string='Service Status', default='draft', track_visibility='always',
+ help='Service status of the work.')
+ complaints_tree = fields.One2many('mobile.complaint.tree',
+ 'complaint_id',
+ string='Complaints Tree',
+ help='Mobile complaint details.')
+ product_order_line = fields.One2many('product.order.line',
+ 'product_order_id',
+ string='Parts Order Lines',
+ help='Product parts order details.')
+ internal_notes = fields.Text(string="Internal Notes")
+ invoice_count = fields.Integer(compute='_compute_invoice_count',
+ string='# Invoice', copy=False,
+ help="Count of invoice.")
+ invoice_ids = fields.Many2many("account.move", string='Invoices',
+ compute="_get_invoiced", readonly=True,
+ copy=False, help="Invoices line")
+ first_payment_inv = fields.Many2one('account.move', copy=False,
+ help="First payment of the invoice.")
+ first_invoice_created = fields.Boolean(string="First Invoice Created",
+ invisible=True, copy=False,
+ help="Date of the first invoice.")
+ journal_type = fields.Many2one('account.journal',
+ 'Journal', invisible=True,
+ default=lambda self: self.env[
+ 'account.journal'].search(
+ [('code', '=', 'SERV')]),
+ help='Type of the journal.')
+ company_id = fields.Many2one('res.company', 'Company',
+ default=lambda self: self.env.company,
+ help='Default company id.')
+
+ @api.model
+ def _default_picking_transfer(self):
+ """To get the default picking transfers."""
+ type_obj = self.env['stock.picking.type']
+ company_id = self.env.context.get(
+ 'company_id') or self.env.user.company_id.id
+ types = type_obj.search([('code', '=', 'outgoing'),
+ ('warehouse_id.company_id', '=', company_id)],
+ limit=1)
+ if not types:
+ types = type_obj.search([('code', '=', 'outgoing'),
+ ('warehouse_id', '=', False)])
+ return types[:4]
+
+ stock_picking_id = fields.Many2one('stock.picking',
+ string="Picking Id",
+ help='Stock picking ID information.')
+ picking_transfer_id = fields.Many2one('stock.picking.type',
+ 'Deliver To',
+ required=True,
+ default=_default_picking_transfer,
+ help="This will determine picking "
+ "type of outgoing shipment.")
+ picking_count = fields.Integer()
+
+ @api.onchange('return_date')
+ def check_date(self):
+ """Check the return date and request date"""
+ if self.return_date:
+ return_date_string = datetime.strptime(str(self.return_date),
+ "%Y-%m-%d")
+ request_date_string = datetime.strptime(str(self.date_request),
+ "%Y-%m-%d")
+ if return_date_string < request_date_string:
+ raise UserError(
+ "Return date should be greater than requested date")
+
+ def approve(self):
+ """Assigning the Service Request to the corresponding user"""
+ self.service_state = 'assigned'
+
+ def complete(self):
+ """Mark the service request as completed"""
+ self.service_state = 'completed'
+
+ def return_to(self):
+ """The service request is returned to the client"""
+ self.service_state = 'returned'
+
+ def not_solved(self):
+ """Mark the service request as not solved"""
+ self.service_state = 'not_solved'
+
+ def action_send_mail(self):
+ """This function opens a window to compose an email, with the edi sale
+ template message loaded by default"""
+ self.ensure_one()
+ try:
+ template_id = self.env.ref(
+ 'mobile_service_shop.email_template_mobile_service')
+ except ValueError:
+ template_id = False
+ try:
+ compose_form_id = self.env.ref(
+ 'mail.email_compose_message_wizard_form')
+ except ValueError:
+ compose_form_id = False
+ ctx = {
+ 'default_model': 'mobile.service',
+ 'default_res_ids': self.ids,
+ 'default_use_template': bool(template_id),
+ 'default_template_id': template_id.id,
+ 'default_composition_mode': 'comment'}
+ return {
+ 'name': _('Compose Email'),
+ 'type': 'ir.actions.act_window',
+ 'view_mode': 'form',
+ 'res_model': 'mail.compose.message',
+ 'views': [(compose_form_id.id, 'form')],
+ 'view_id': compose_form_id.id,
+ 'target': 'new',
+ 'context': ctx}
+
+ def return_advance(self):
+ """This method returns the current invoice related to the work"""
+ inv_obj = self.env['account.move'].search(
+ [('invoice_origin', '=', self.name)])
+ inv_ids = []
+ for each in inv_obj:
+ inv_ids.append(each.id)
+ view_id = self.env.ref('account.view_move_form').id
+ if inv_ids:
+ if len(inv_ids) <= 1:
+ value = {
+ 'view_mode': 'form',
+ 'res_model': 'account.move',
+ 'view_id': view_id,
+ 'type': 'ir.actions.act_window',
+ 'name': 'Invoice',
+ 'res_id': inv_ids[0]}
+ else:
+ value = {
+ 'domain': str([('id', 'in', inv_ids)]),
+ 'view_mode': 'tree,form',
+ 'res_model': 'account.move',
+ 'view_id': False,
+ 'type': 'ir.actions.act_window',
+ 'name': 'Invoice',
+ 'res_id': inv_ids[0]}
+ return value
+ else:
+ raise UserError("No invoice created")
+
+ def _compute_invoice_count(self):
+ """Calculating the number of invoices"""
+ self.invoice_count = self.env['account.move'].search_count(
+ [('invoice_origin', '=', self.name)])
+
+ @api.model
+ def create(self, vals):
+ """Creating sequence"""
+ if 'company_id' in vals:
+ vals['name'] = self.env['ir.sequence'].with_context(
+ force_company=self.env.user.company_id.id).next_by_code(
+ 'mobile.service') or _('New')
+ else:
+ vals['name'] = self.env['ir.sequence'].next_by_code(
+ 'mobile.service') or _('New')
+ vals['service_state'] = 'draft'
+ return super(MobileService, self).create(vals)
+
+ def unlink(self):
+ """Supering the unlink function"""
+ for service in self:
+ if service.service_state != 'draft':
+ raise UserError(
+ _('You cannot delete an assigned service request'))
+ return super(MobileService, self).unlink()
+
+ def action_invoice_create_wizard(self):
+ """Opening a wizard to create invoice"""
+ return {
+ 'name': _('Create Invoice'),
+ 'view_mode': 'form',
+ 'res_model': 'mobile.invoice',
+ 'type': 'ir.actions.act_window',
+ 'target': 'new'}
+
+ def action_post_stock(self):
+ """It will post the stock move"""
+ flag = 0
+ for order in self.product_order_line:
+ if order.product_uom_qty > order.qty_stock_move:
+ flag = 1
+ pick = {
+ 'picking_type_id': self.picking_transfer_id.id,
+ 'partner_id': self.person_name.id,
+ 'origin': self.name,
+ 'location_dest_id': self.person_name.property_stock_customer.id,
+ 'location_id': int(self.picking_transfer_id.
+ default_location_src_id.id)}
+ picking = self.env['stock.picking'].create(pick)
+ self.stock_picking_id = picking.id
+ self.picking_count = len(picking)
+ moves = order.filtered(
+ lambda r: r.product_id.type in ['product',
+ 'consu'])._create_stock_moves_transfer(picking)
+ move_ids = moves._action_confirm()
+ move_ids._action_assign()
+ if order.product_uom_qty < order.qty_stock_move:
+ raise UserError(
+ _('Used quantity is less than quantity stock move posted.'))
+ if flag != 1:
+ raise UserError(_('Nothing to post stock move'))
+
+ def action_view_invoice(self):
+ """It will show the invoice for the customer"""
+ self.ensure_one()
+ ctx = dict(create=False)
+ action = {
+ 'name': _("Invoices"),
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'account.move',
+ 'target': 'current',
+ 'context': ctx}
+ invoice_ids = self.env['account.move'].search(
+ [('invoice_origin', '=', self.name)])
+ inv_ids = []
+ for each_ids in invoice_ids:
+ inv_ids.append(each_ids.id)
+ if len(invoice_ids) == 1:
+ invoice = inv_ids and inv_ids[0]
+ action['res_id'] = invoice
+ action['view_mode'] = 'form'
+ action['views'] = [
+ (self.env.ref('account.view_move_form').id, 'form')]
+ else:
+ action['view_mode'] = 'tree,form'
+ action['domain'] = [('id', 'in', inv_ids)]
+ return action
+
+ def get_ticket(self):
+ """This will return a ticket associated with the given service"""
+ self.ensure_one()
+ user = self.env['res.users'].browse(self.env.uid)
+ if user.tz:
+ tz = pytz.timezone(user.tz)
+ time = pytz.utc.localize(datetime.now()).astimezone(tz)
+ date_today = time.strftime("%Y-%m-%d %H:%M %p")
+ else:
+ date_today = datetime.strftime(datetime.now(),
+ "%Y-%m-%d %I:%M:%S %p")
+ complaint_text = ""
+ description_text = ""
+ complaint_id = self.env['mobile.complaint.tree'].search(
+ [('complaint_id', '=', self.id)])
+ if complaint_id:
+ for obj in complaint_id:
+ complaint = obj.complaint_type_tree
+ description = obj.description_tree
+ complaint_text = complaint.complaint_type + ", " + complaint_text
+ if description.description:
+ description_text = description.description + ", " + description_text
+ else:
+ for obj in complaint_id:
+ complaint = obj.complaint_type_tree
+ complaint_text = complaint.complaint_type + ", " + complaint_text
+ data = {
+ 'ids': self.ids,
+ 'model': self._name,
+ 'date_today': date_today,
+ 'date_request': self.date_request,
+ 'date_return': self.return_date,
+ 'sev_id': self.name,
+ 'warranty': self.is_in_warranty,
+ 'customer_name': self.person_name.name,
+ 'imei_no': self.imei_no,
+ 'technician': self.technician_name.name,
+ 'complaint_types': complaint_text,
+ 'complaint_description': description_text,
+ 'mobile_brand': self.brand_name.brand_name,
+ 'model_name': self.model_name.mobile_brand_models}
+ return (self.env.ref('mobile_service_shop.mobile_service_ticket').
+ report_action(self, data=data))
diff --git a/mobile_service_shop/models/product_order_line.py b/mobile_service_shop/models/product_order_line.py
new file mode 100644
index 000000000..1fd41641b
--- /dev/null
+++ b/mobile_service_shop/models/product_order_line.py
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import api, fields, models, _
+
+
+class ProductOrderLine(models.Model):
+ _name = 'product.order.line'
+ _description = 'Product Order Line'
+
+ product_order_id = fields.Many2one('mobile.service')
+ product_id = fields.Many2one('product.product', string='Product',
+ domain="[('is_a_parts','=', True)]",
+ help="Product ID of the product.",
+ required=True)
+ product_uom_qty = fields.Float(string='Used Quantity', default=1.0,
+ help="Choose a quantity to use.",
+ required=True)
+ price_unit = fields.Float(string='Unit Price', default=0.0, required=True,
+ help="Price of the product.")
+ qty_invoiced = fields.Float(string='Invoiced Qty', readonly=True,
+ help="Number of invoice created.")
+ qty_stock_move = fields.Float(string='Stock Move Posted Qty', readonly=True,
+ help="Count of stock move.")
+ part_price = fields.Char(compute='_compute_part_price', string='Price',
+ readonly=True, store=True, help="Price for the "
+ "part.")
+ product_uom = fields.Char(string='Unit of Measure', required=True,
+ help="Unit of measure of the product.")
+
+ @api.onchange('product_id')
+ def change_prod(self):
+ """It will return the product price and the unit of measurement"""
+ self.ensure_one()
+ if self.product_id:
+ product_template_obj = self.product_id.product_tmpl_id
+ self.price_unit = product_template_obj.list_price
+ self.product_uom = product_template_obj.uom_id.name
+
+ @api.depends('product_uom_qty', 'product_id')
+ def _compute_part_price(self):
+ """Compute the amount of part price"""
+ for line in self:
+ price = line.price_unit * line.product_uom_qty
+ line.update({'part_price': price})
+
+ def _create_stock_moves_transfer(self, picking):
+ """It will return the stock moves"""
+ done = self.env['stock.move'].browse()
+ if self.product_id.product_tmpl_id.type != 'service':
+ price_unit = self.price_unit
+ template = {
+ 'name': self.product_id.product_tmpl_id.name or '',
+ 'product_id': self.product_id.id,
+ 'product_uom': self.product_id.product_tmpl_id.uom_id.id,
+ 'location_id': picking.picking_type_id.default_location_src_id.id,
+ 'location_dest_id': self.product_order_id.person_name.property_stock_customer.id,
+ 'picking_id': picking.id,
+ 'move_dest_ids': False,
+ 'state': 'draft',
+ 'company_id': self.product_order_id.company_id.id,
+ 'price_unit': price_unit,
+ 'picking_type_id': picking.picking_type_id.id,
+ 'route_ids': 1 and [
+ (6, 0, [x.id for x in self.env['stock.route'].search(
+ [('id', 'in', (2, 3))])])] or [],
+ 'warehouse_id': picking.picking_type_id.warehouse_id.id}
+ diff_quantity = self.product_uom_qty - self.qty_stock_move
+ tmp = template.copy()
+ tmp.update({'product_uom_qty': diff_quantity})
+ template['product_uom_qty'] = diff_quantity
+ done += self.env['stock.move'].create(template)
+ self.qty_stock_move = self.qty_stock_move + diff_quantity
+ return done
diff --git a/mobile_service_shop/models/product_template.py b/mobile_service_shop/models/product_template.py
new file mode 100644
index 000000000..94e20c087
--- /dev/null
+++ b/mobile_service_shop/models/product_template.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class ProductTemplate(models.Model):
+
+ # Inherited to add custom fields
+ _inherit = 'product.template'
+
+ is_a_parts = fields.Boolean(
+ 'Is a Mobile Part', default=False,
+ help="Specify if the product is a mobile part or not.")
+
+ brand_name = fields.Many2one('mobile.brand', string="Brand",
+ help="Select a mobile brand for the part.")
+ model_name = fields.Many2one('brand.model', string="Model Name",
+ domain="[('mobile_brand_name','=',brand_name)]",
+ help="Select a model for the part.")
+ model_colour = fields.Char(string="Colour", help="Colour for the part.")
+ extra_descriptions = fields.Text(string="Note", help="Extra description "
+ "for the part.")
diff --git a/mobile_service_shop/models/service_ticket.py b/mobile_service_shop/models/service_ticket.py
new file mode 100755
index 000000000..aaee67447
--- /dev/null
+++ b/mobile_service_shop/models/service_ticket.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import models, api
+
+
+class MobileServiceTicket(models.AbstractModel):
+ """Mobile service ticket report abstract model"""
+ _name = 'report.mobile_service_shop.mobile_service_ticket_template'
+
+ @api.model
+ def _get_report_values(self, data):
+ """Returns the data file for the report"""
+ terms = self.env['terms.conditions'].search([])
+ return {
+ 'date_today': data['date_today'],
+ 'date_request': data['date_request'],
+ 'date_return': data['date_return'],
+ 'sev_id': data['sev_id'],
+ 'imei_no': data['imei_no'],
+ 'technician': data['technician'],
+ 'complaint_types': data['complaint_types'],
+ 'complaint_description': data['complaint_description'],
+ 'mobile_brand': data['mobile_brand'],
+ 'model_name': data['model_name'],
+ 'customer_name': data['customer_name'],
+ 'warranty': data['warranty'],
+ 'terms': terms}
diff --git a/mobile_service_shop/models/terms_condition.py b/mobile_service_shop/models/terms_condition.py
new file mode 100644
index 000000000..5131ab58e
--- /dev/null
+++ b/mobile_service_shop/models/terms_condition.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2019-TODAY Cybrosys Technologies().
+# Author: Vishnu KP @ Cybrosys, (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+from odoo import fields, models
+
+
+class TermsConditions(models.Model):
+ """Used to add the Mobile Service Terms and Conditions"""
+ _name = 'terms.conditions'
+ _description = 'Terms and Conditions'
+ _rec_name = 'terms_id'
+
+ terms_id = fields.Char(String="Terms and condition",
+ compute="_compute_terms_id", help="this will be "
+ "the terms id.")
+ terms_conditions = fields.Text(string="Terms and Conditions",
+ help="this will be the terms and "
+ "conditions space.")
+
+ def _compute_terms_id(self):
+ """Return the terms ID"""
+ self.terms_id = self.id or ''
diff --git a/mobile_service_shop/reports/mobile_service_email_template.xml b/mobile_service_shop/reports/mobile_service_email_template.xml
new file mode 100644
index 000000000..27e920a53
--- /dev/null
+++ b/mobile_service_shop/reports/mobile_service_email_template.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
Service Ticket
+
+
+
+
+
+ Ref no | : |
+ |
+ Customer name | : |
+ |
+
+
+
+
+
+
+
+
+ Requested date | : |
+ |
+ Return date | : |
+ |
+
+
+
+
+
Device details
+
+
+
+ Sl no. |
+ Device brand |
+ Model name |
+ IMEI |
+ Complaints |
+ Description |
+
+
+
+
+ 1 |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ The device is in warranty range !!
+
+
+
+
Terms and Conditions
+
+
+
+
+
+ Keep this ticket safely for future reference.
+ Issue Date :
+
+
+
+
+
diff --git a/mobile_service_shop/reports/mobile_service_ticket.xml b/mobile_service_shop/reports/mobile_service_ticket.xml
new file mode 100644
index 000000000..8fb3a14af
--- /dev/null
+++ b/mobile_service_shop/reports/mobile_service_ticket.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ Mobile Service Ticket
+ mobile.service
+ qweb-pdf
+ mobile_service_shop.mobile_service_ticket_template
+ mobile_service_shop.mobile_service_ticket_template
+
+
+
diff --git a/mobile_service_shop/security/ir.model.access.csv b/mobile_service_shop/security/ir.model.access.csv
new file mode 100644
index 000000000..ca693432e
--- /dev/null
+++ b/mobile_service_shop/security/ir.model.access.csv
@@ -0,0 +1,15 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_mobile_service_shop_mobile_service_shop,access.mobile_service_shop.mobile_service_shop,model_mobile_service,mobile_service_group_executer,1,1,0,0
+access_mobile_service_shop_mobile_service_shop11,access.mobile_service_shop.mobile_service_shop11,model_mobile_complaint,mobile_service_group_executer,1,0,0,0
+access_mobile_service_shop_mobile_service_shop22,access.mobile_service_shop.mobile_service_shop22,model_mobile_service,mobile_service_group_manager,1,1,1,1
+access_mobile_service_shop_mobile_service_shop33,access.mobile_service_shop.mobile_service_shop33,model_mobile_brand,mobile_service_group_manager,1,1,1,1
+access_mobile_service_shop_mobile_service_shop44,access.mobile_service_shop.mobile_service_shop44,model_brand_model,mobile_service_group_manager,1,1,1,1
+access_mobile_service_shop_mobile_service_shop66,access.mobile_service_shop.mobile_service_shop66,model_mobile_complaint,mobile_service_group_manager,1,1,1,1
+access_mobile_service_shop_mobile_service_shop88,access.mobile_service_shop.mobile_service_shop88,model_product_template,mobile_service_group_manager,1,1,1,1
+access_mobile_service_shop_mobile_service_shop99,access.mobile_service_shop.mobile_service_shop99,model_mobile_complaint_tree,mobile_service_group_executer,1,1,1,0
+access_mobile_service_shop_mobile_service_shop111,access.mobile_service_shop.mobile_service_shop111,model_mobile_complaint_description,mobile_service_group_manager,1,1,1,1
+access_mobile_service_shop_mobile_service_shop112,access.mobile_service_shop.mobile_service_shop112,model_terms_conditions,mobile_service_group_manager,1,1,1,1
+access_mobile_service_shop_mobile_service_shop113,access.mobile_service_shop.mobile_service_shop113,model_mobile_complaint_tree,mobile_service_group_manager,1,1,1,1
+access_mobile_service_shop_mobile_service_shop114,access.mobile_service_shop.mobile_service_shop114,model_mobile_complaint_description,mobile_service_group_executer,1,1,0,0
+access_mobile_service_shop_mobile_service_shop115,access.mobile_service_shop.mobile_service_shop115,model_product_order_line,mobile_service_group_executer,1,1,1,1
+access_mobile_service_shop_mobile_service_shop116,access.mobile_service_shop.mobile_service_shop116,model_mobile_invoice,mobile_service_group_manager,1,1,1,1
diff --git a/mobile_service_shop/security/mobile_service_shop_security.xml b/mobile_service_shop/security/mobile_service_shop_security.xml
new file mode 100644
index 000000000..05c6747c2
--- /dev/null
+++ b/mobile_service_shop/security/mobile_service_shop_security.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Mobile Service
+ 5
+
+
+
+ Mobile Technician
+
+
+
+
+
+ Manager
+
+
+
+
+
+
+ Mobile Service rule
+
+ [('technician_name','=',user.id),('service_state','!=','draft'), ('company_id','=',user.company_id.id)]
+
+
+
+
+ Mobile Service Manager rule
+
+ [('company_id','=',user.company_id.id)]
+
+
+
diff --git a/mobile_service_shop/static/description/assets/icons/capture (1).png b/mobile_service_shop/static/description/assets/icons/capture (1).png
new file mode 100644
index 0000000000000000000000000000000000000000..8824deafca0ae1d56fce83c80cc8ae543855dc68
GIT binary patch
literal 36623
zcmdSBg;$i_7dAYI0wOh{AWAt%C?z1B!T?HlhcuGX9g4uv-K7IaN-7;nhkytJ(p^J$
z!+YQG_Cy9^y5ElZ0;J(Vh_HZ{
ztYw^P;Dy@gm69w3;!X#F_yPJlo8E<+$r&mj=>8wi9i5dtB7ms+DJ0DORDC@l#G
zUV-OWtkws3x&7{yrUUT$=IY;;rDz}U2HWwqtT^@(_8rXI*qbU+Jiv&M*YKAruA^%c
zE-ET!vu)c;^)GH2H9z!VWpmCnWDQbULq3hyfJm!|7zIgu=>LmR`zAz?&-v*?>B7Gy
zmdMh>V2W7w!}Igc#y+(v#wg#-@uVe(-gLpcbKVB1q|T-u*yXJFL+oT;|v+}gc67hMGk3_Y6+9-)_1u
zY$#@5_UnDrT_u>XM37hnWza2zxNW(n0BO&*xM!UX%T&Ux*|~)`Oc)ze!|~|N5$lME
z1R4taAgYb2KCRR3hMSwK!+x!Dr3!VfpHBv8ke6*3zRMIxb0Xfq%QuOaytm%}DxQFD
zsuvU4i)-;>klf>&eh-cJ~(suNulGfp(Vapbp3pSmZ~4cgv4$w53k
zpG>7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