diff --git a/barcode_for_work_centers/README.rst b/barcode_for_work_centers/README.rst new file mode 100755 index 000000000..2b154bb01 --- /dev/null +++ b/barcode_for_work_centers/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-OPL--1-red.svg + :target: https://www.odoo.com/documentation/16.0/legal/licenses.html#odoo-apps + :alt: License: OPL-1 + +Barcode for work centers +======================== +Enable the ability to start and stop the work order using barcode scanning. + +Configuration +============= +* No additional configurations needed +* Barcode modules are only available in enterprise edition + +Company +======= +* `Cybrosys Techno Solutions `__ + +License +======= +Odoo Proprietary License v1.0 (OPL-1) +(https://www.odoo.com/documentation/16.0/legal/licenses.html#odoo-apps) + +Credits +======= +Developer: (V16) Jaseem Sadiq K, Contact: 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 `__ + +Further information +=================== +HTML Description: ``__ diff --git a/barcode_for_work_centers/__init__.py b/barcode_for_work_centers/__init__.py new file mode 100755 index 000000000..4263eaed4 --- /dev/null +++ b/barcode_for_work_centers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jaseem (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from . import models diff --git a/barcode_for_work_centers/__manifest__.py b/barcode_for_work_centers/__manifest__.py new file mode 100755 index 000000000..5c4d10cac --- /dev/null +++ b/barcode_for_work_centers/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jaseem (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +{ + 'name': "Barcode for work centers", + 'version': '16.0.1.0.0', + 'category': 'Manufacturing', + 'summary': 'Start and stop the work ordr using barcode', + 'description': """This module enables the functionality to initiate and + halt work orders using barcode scanning. It allows users to commence work + orders by scanning barcodes and provides buttons to pause and resume work + order activities.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ["stock_barcode", "stock", "mrp"], + 'data': [ + "data/barcode_for_work_centers.xml", + "views/mrp_routing_workcenter_views.xml", + ], + 'assets': { + 'web.assets_backend': [ + '/barcode_for_work_centers/static/src/js/barcode_template.js', + '/barcode_for_work_centers/static/src/xml/manufacture_button_templates.xml', + '/barcode_for_work_centers/static/src/xml/barcode_scan_templates.xml', + '/barcode_for_work_centers/static/src/css/barcode_for_work_centers.scss', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'OPL-1', + 'installable': True, + 'application': False, + 'auto_install': False, +} + diff --git a/barcode_for_work_centers/data/barcode_for_work_centers.xml b/barcode_for_work_centers/data/barcode_for_work_centers.xml new file mode 100755 index 000000000..f45df1021 --- /dev/null +++ b/barcode_for_work_centers/data/barcode_for_work_centers.xml @@ -0,0 +1,10 @@ + + + + + Barcode scanning view + barcode_for_work_centers_scanning_template + current + + diff --git a/barcode_for_work_centers/doc/RELEASE_NOTES.md b/barcode_for_work_centers/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..d0d71f804 --- /dev/null +++ b/barcode_for_work_centers/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +##### 07.02.2024 +##### Version 16.0.1.0.0 +##### ADD +- Initial commit for Barcode for work centers diff --git a/barcode_for_work_centers/models/__init__.py b/barcode_for_work_centers/models/__init__.py new file mode 100755 index 000000000..42703d867 --- /dev/null +++ b/barcode_for_work_centers/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jaseem (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from . import mrp_routing_workcenter +from . import mrp_workorder diff --git a/barcode_for_work_centers/models/mrp_routing_workcenter.py b/barcode_for_work_centers/models/mrp_routing_workcenter.py new file mode 100755 index 000000000..7c79a36f6 --- /dev/null +++ b/barcode_for_work_centers/models/mrp_routing_workcenter.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jaseem (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import models + + +class MrpRoutingWorkCenter(models.Model): + """This class represents an extension of 'mrp.routing.workcenter' to add a + function called 'action_barcode_scanner_template'. This function allows the + user to click on the records of all kanban views of operations in a work + order.""" + _inherit = "mrp.routing.workcenter" + + def action_barcode_scanner_template(self): + """This function is used to invoke a client action that calls the + barcode template.""" + return {'type': 'ir.actions.client', + 'tag': 'barcode_for_work_centers_scanning_template', + 'params': {'name': self.name, 'id': self.id}} diff --git a/barcode_for_work_centers/models/mrp_workorder.py b/barcode_for_work_centers/models/mrp_workorder.py new file mode 100755 index 000000000..d6a3bcd18 --- /dev/null +++ b/barcode_for_work_centers/models/mrp_workorder.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jaseem (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import models + + +class MrpWorkOrder(models.Model): + """This class represents the inheriting add the all rpc function for js + such as action_work_order_start_stop,action_puase,action_continue and + action_done""" + _inherit = "mrp.workorder" + + def action_work_order_start_stop(self, clicked_record, man_order): + """This function is used to start and stop the work order after scanning + barcode in barcode template , it returns the message that 'start' or ' + stop'.""" + record = self.env["mrp.routing.workcenter"].browse(int(clicked_record)) + mrp_order = self.env["mrp.production"].search( + [("name", "=", man_order)]) + params_for_template = {} + if record.workorder_ids and mrp_order: + for wo in record.workorder_ids: + if wo.production_id.id == mrp_order.id: + if wo.production_state not in ['draft', 'done', + 'cancel', ] and \ + wo.working_state != "blocked" and wo.state not in \ + ["done", "cancel", "progress"]: + wo.button_start() + params_for_template.update( + {"pop_up": "start", "duration": wo.duration}) + elif wo.state != "done": + wo.button_finish() + params_for_template.update({"pop_up": "end"}) + elif wo.state == "done": + params_for_template.update({"pop_up": "already done"}) + else: + params_for_template.update({"pop_up": "not match"}) + else: + params_for_template.update({"pop_up": "not match"}) + return params_for_template + + def action_pause(self, clicked_record, man_order): + """This function is used to perform action pause while clicking the + pause button from barcode scanning template """ + record = self.env["mrp.routing.workcenter"].browse(int(clicked_record)) + mrp_order = self.env["mrp.production"].search( + [("name", "=", man_order)]) + if record.workorder_ids and mrp_order: + for wo in record.workorder_ids: + if wo.production_id.id == mrp_order.id: + wo.button_pending() + return "paused" + + def action_continue(self, clicked_record, man_order): + """This function is used to continue the work order after clicking the + continue button""" + record = self.env["mrp.routing.workcenter"].browse(int(clicked_record)) + mrp_order = self.env["mrp.production"].search( + [("name", "=", man_order)]) + if record.workorder_ids and mrp_order: + for wo in record.workorder_ids: + if wo.production_id.id == mrp_order.id: + wo.button_start() + return "continue" + + def action_done(self, clicked_record, man_order): + """This function is used to stop the work order after clicking the + done button""" + record = self.env["mrp.routing.workcenter"].browse(int(clicked_record)) + mrp_order = self.env["mrp.production"].search( + [("name", "=", man_order)]) + if record.workorder_ids and mrp_order: + for wo in record.workorder_ids: + if wo.production_id.id == mrp_order.id: + wo.button_finish() + return "done" diff --git a/barcode_for_work_centers/static/description/assets/icons/check.png b/barcode_for_work_centers/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/check.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/chevron.png b/barcode_for_work_centers/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/chevron.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/cogs.png b/barcode_for_work_centers/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/cogs.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/consultation.png b/barcode_for_work_centers/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/consultation.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/ecom-black.png b/barcode_for_work_centers/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/ecom-black.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/education-black.png b/barcode_for_work_centers/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/education-black.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/hotel-black.png b/barcode_for_work_centers/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/hotel-black.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/license.png b/barcode_for_work_centers/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/license.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/lifebuoy.png b/barcode_for_work_centers/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/lifebuoy.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/manufacturing-black.png b/barcode_for_work_centers/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/manufacturing-black.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/pos-black.png b/barcode_for_work_centers/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/pos-black.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/puzzle.png b/barcode_for_work_centers/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/puzzle.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/restaurant-black.png b/barcode_for_work_centers/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/restaurant-black.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/service-black.png b/barcode_for_work_centers/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/service-black.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/trading-black.png b/barcode_for_work_centers/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/trading-black.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/training.png b/barcode_for_work_centers/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/training.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/update.png b/barcode_for_work_centers/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/update.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/user.png b/barcode_for_work_centers/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/user.png differ diff --git a/barcode_for_work_centers/static/description/assets/icons/wrench.png b/barcode_for_work_centers/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/icons/wrench.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/categories.png b/barcode_for_work_centers/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/categories.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/check-box.png b/barcode_for_work_centers/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/check-box.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/compass.png b/barcode_for_work_centers/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/compass.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/corporate.png b/barcode_for_work_centers/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/corporate.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/customer-support.png b/barcode_for_work_centers/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/customer-support.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/cybrosys-logo.png b/barcode_for_work_centers/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/cybrosys-logo.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/features.png b/barcode_for_work_centers/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/features.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/logo.png b/barcode_for_work_centers/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/logo.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/pictures.png b/barcode_for_work_centers/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/pictures.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/pie-chart.png b/barcode_for_work_centers/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/pie-chart.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/right-arrow.png b/barcode_for_work_centers/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/right-arrow.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/star.png b/barcode_for_work_centers/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/star.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/support.png b/barcode_for_work_centers/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/support.png differ diff --git a/barcode_for_work_centers/static/description/assets/misc/whatsapp.png b/barcode_for_work_centers/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/misc/whatsapp.png differ diff --git a/barcode_for_work_centers/static/description/assets/modules/1.png b/barcode_for_work_centers/static/description/assets/modules/1.png new file mode 100755 index 000000000..ff8409310 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/modules/1.png differ diff --git a/barcode_for_work_centers/static/description/assets/modules/2.png b/barcode_for_work_centers/static/description/assets/modules/2.png new file mode 100755 index 000000000..1ae7cfe3b Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/modules/2.png differ diff --git a/barcode_for_work_centers/static/description/assets/modules/3.png b/barcode_for_work_centers/static/description/assets/modules/3.png new file mode 100755 index 000000000..3c3ff1afb Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/modules/3.png differ diff --git a/barcode_for_work_centers/static/description/assets/modules/4.png b/barcode_for_work_centers/static/description/assets/modules/4.png new file mode 100755 index 000000000..3fae4631e Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/modules/4.png differ diff --git a/barcode_for_work_centers/static/description/assets/modules/5.gif b/barcode_for_work_centers/static/description/assets/modules/5.gif new file mode 100755 index 000000000..2a5f8e659 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/modules/5.gif differ diff --git a/barcode_for_work_centers/static/description/assets/modules/6.png b/barcode_for_work_centers/static/description/assets/modules/6.png new file mode 100755 index 000000000..7f2815273 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/modules/6.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/1.png b/barcode_for_work_centers/static/description/assets/screenshots/1.png new file mode 100755 index 000000000..d23ec761e Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/1.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/2.png b/barcode_for_work_centers/static/description/assets/screenshots/2.png new file mode 100755 index 000000000..c3e7fc47b Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/2.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/3.png b/barcode_for_work_centers/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..6b7f23e7b Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/3.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/4.png b/barcode_for_work_centers/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..b69eb9727 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/4.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/5.png b/barcode_for_work_centers/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..dd51e6031 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/5.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/6.png b/barcode_for_work_centers/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..31e4ef9be Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/6.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/7.png b/barcode_for_work_centers/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..47957cc2d Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/7.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/8.png b/barcode_for_work_centers/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..5802f84e4 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/8.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/9.png b/barcode_for_work_centers/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..c27e58b79 Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/9.png differ diff --git a/barcode_for_work_centers/static/description/assets/screenshots/hero.gif b/barcode_for_work_centers/static/description/assets/screenshots/hero.gif new file mode 100755 index 000000000..74aaaa9cb Binary files /dev/null and b/barcode_for_work_centers/static/description/assets/screenshots/hero.gif differ diff --git a/barcode_for_work_centers/static/description/banner.png b/barcode_for_work_centers/static/description/banner.png new file mode 100755 index 000000000..7af38b036 Binary files /dev/null and b/barcode_for_work_centers/static/description/banner.png differ diff --git a/barcode_for_work_centers/static/description/icon.png b/barcode_for_work_centers/static/description/icon.png new file mode 100755 index 000000000..752d2a801 Binary files /dev/null and b/barcode_for_work_centers/static/description/icon.png differ diff --git a/barcode_for_work_centers/static/description/index.html b/barcode_for_work_centers/static/description/index.html new file mode 100755 index 000000000..7e1ad82ea --- /dev/null +++ b/barcode_for_work_centers/static/description/index.html @@ -0,0 +1,588 @@ +
+ +
+ +
+
+ Enterprise +
+
+
+ +
+
+
+ +

+ Barcode For Work Centers

+

+ Start And Stop Work Order With Barcode

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

+ Explore This Module

+
+ + + +
+
+ +
+

+ Overview

+
+
+
This app help to start and stop work order of + manufacturing order using barcode +
+
+ + +
+
+ +
+

+ Features

+
+
+
+
+ + Support in odoo Enterprise +
+
+
+
+
+
+ + We can use barcode scanning to begin and end work orders. + +
+
+
+ + +
+
+ +
+

+ Screenshots

+
+
+
+
+

+ Go to Barcode Module

+

+ Open WORK ORDER
+

+ +
+
+

+ Here we can see all operations.

+

+ Choose correct operation
+

+ +

+
+

+
+
+

+ +

+

+ +

+ +
+
+

Fill the Bill of materials with the Operations can add the Work Order and operations in the Operations Tab +

+

+ +
+
+

Create the Manufacture Order and Scan the barcode of the manufacture +

+

+ +
+
+

+ Click start stop Button

+

+

+ The work for the corresponding work order will be started.

+ +
+
+
+

+ We have the ability to pause and resume the work order.

+

+ We can stop the work order by either clicking the 'Done' button + or scanning the barcode on the input field.

+ +
+
+

+ After Clicking the Done Button can close the Work Order

+

+ Now, the Manufacturing comes done, and we can move to the next step, Also the work order comes completed

+ +
+
+

+ Shows the Completed work order in the TO CLOSE state

+

+ +
+
+
+ + +
+
+ +
+

+ Related Products

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

+ Our Services

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

+ Our Industries

+
+
+
+
+
+ +
+ Trading
+

+ Easily procure and sell your products

+
+
+
+
+ +
+ POS
+

+ Easy configuration and convivial experience

+
+
+
+
+ +
+ Education
+

+ A platform for educational management

+
+
+
+
+ +
+ Manufacturing
+

+ Plan, track and schedule your operations

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

+ Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +
+ Service Management
+

+ Keep track of services and invoice

+
+
+
+
+ +
+ Restaurant
+

+ Run your bar or restaurant methodically

+
+
+
+
+ +
+ Hotel Management
+

+ An all-inclusive hotel management application

+
+
+
+
+ + +
+
+ +
+

+ Support

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/barcode_for_work_centers/static/src/css/barcode_for_work_centers.scss b/barcode_for_work_centers/static/src/css/barcode_for_work_centers.scss new file mode 100755 index 000000000..8c2b417d9 --- /dev/null +++ b/barcode_for_work_centers/static/src/css/barcode_for_work_centers.scss @@ -0,0 +1,123 @@ +body { + background-color: #714B67; +} +#work_order_timer_id { + color: red; + font-size: 50px; + font-family: "Orbitron", sans-serif; +} +.header-text { + color: black; + font-family: "Abril Fatface"; + font-size: 70px; + font-weight: 600; + padding-top: 10px; +} +.button_for_barcode { + display: flex; + margin-left: 72%; + padding-top: 5%; + gap: 5px; + border-radius: 6px; +} +.pause_workOrder { + display: inline-block; + outline: none; + cursor: pointer; + font-weight: 600; + border-radius: 3px; + padding: 12px 24px; + border: 0; + color: #fff; + background: #ff5000; + line-height: 1.15; + font-size: 16px; + :hover { + transition: all 0.1s ease; + box-shadow: 0 0 0 0 #fff, 0 0 0 3px #1de9b6; + } +} +.continue_workOrder { + display: inline-block; + outline: none; + cursor: pointer; + font-weight: 600; + border-radius: 3px; + padding: 12px 24px; + border: 0; + color: #000021; + background: #1de9b6; + line-height: 1.15; + font-size: 16px; + :hover { + transition: all 0.1s ease; + box-shadow: 0 0 0 0 #fff, 0 0 0 3px #1de9b6; + } +} +.done_workOrder { + display: inline-block; + outline: none; + cursor: pointer; + font-weight: 600; + border-radius: 3px; + padding: 12px 24px; + border: 0; + color: #fff; + background: #000a47; + line-height: 1.15; + font-size: 16px; + :hover { + transition: all 0.1s ease; + box-shadow: 0 0 0 0 #fff, 0 0 0 3px #1de9b6; + } +} +.timer-display { + margin-left: 75%; + padding-top: 22px; + padding-left: 70px; +} +.form-control{ + width:100%; + border-width: 5px; + border-color: #13120d; + border-radius: 6px; + height: 70; + /* place-content: center; */ + color: brown; + font-size: xx-large; + text-align: center; +} +#barcode_scan_button_id{ + display: inline-block; + outline: 0; + border: 0; + cursor: pointer; + background: #000000; + color: #FFFFFF; + border-radius: 8px; + padding: 14px 24px 16px; + font-size: 18px; + font-weight: 700; + line-height: 1; + transition: transform 200ms,background 200ms; + :hover{ + transform: translateY(-2px); + } + margin-top:3%; + +} +.barcode_main_class{ +display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin-top: 17%; +} +@media (max-width: 390px){ + .timer-display{ + margin-left: -65px; + } + .button_for_barcode{ + margin-left:87px; + } +} \ No newline at end of file diff --git a/barcode_for_work_centers/static/src/js/barcode_template.js b/barcode_for_work_centers/static/src/js/barcode_template.js new file mode 100755 index 000000000..a3f7ac4b0 --- /dev/null +++ b/barcode_for_work_centers/static/src/js/barcode_template.js @@ -0,0 +1,227 @@ +/** @odoo-module */ +import { registry } from '@web/core/registry'; +import { onWillStart, Component } from "@odoo/owl"; +const actionRegistry = registry.category("actions"); +import { useService } from "@web/core/utils/hooks"; +import { useAutofocus } from "@web/core/utils/hooks"; +const { useRef } = owl; +import rpc from "web.rpc"; +var hours = 0; +var minutes = 0; +var seconds = 0; +var isPaused = true; + +/** + * Represents a barcode scanning view component. + */ +class BarcodeScanningView extends Component { + /** + * Initializes the necessary services and references for the application. + * - Sets up action and notification services. + * - Sets up an input reference with autofocus. + * - Initializes references for manual order, pause, continue buttons, and a timer. + * + **/ + setup() { + this.action = useService("action"); + this.notification = useService("notification"); + this.inputRef = useAutofocus(); + this.man_order =useRef('autofocus') + this.pause_ref = useRef('pause-ref'); + this.continue_ref = useRef('continue-ref') + this.buttons_ref = useRef('buttons-ref'); + this.timer = useRef('timer'); + super.setup(...arguments); + onWillStart(async () => { + }); + } + + /** + * Executes the scanning process. + */ + ScanNow() { + var self = this; + var man_order = this.man_order.el.value; + if (!man_order) { + self.notification.add(self.env._t("Scan the barcode on input field"), { + type: "success", + }); + } else { + this.clicked_record = this.props.action.params.id; + var clicked_record = this.props.action.params.id; + rpc.query({ + model: 'mrp.workorder', + method: 'action_work_order_start_stop', + args: [, clicked_record, man_order], + }).then(function (result) { + var state = result; + if (state["pop_up"] == "start") { + self.buttons_ref.el.classList.remove('d-none'); + self.continue_ref.el.classList.add('d-none') + self.notification.add(self.env._t("Work order started"), { + type: "success", + }); + self.TimerStart(); + } else if (state["pop_up"] == "end") { + self.notification.add(self.env._t("Work order finished"), { + type: "success", + }); + self.buttons_ref.el.classList.add('d-none') + self.PauseTimer(); + } else if (state["pop_up"] == "already done") { + self.notification.add(self.env._t("It is already in a done state"), { + type: "success", + }); + self.continue_ref.el.classList.add('d-none') + } else if (state["pop_up"] == "not match") { + self.pause_ref.el.classList.add('d-none') + self.notification.add(self.env._t("No matching manufacturing order for this barcode"), { + type: "danger", + }); + } + }); + } + } + /** + * Pauses the work order. + */ + pauseWorkOrder() { + var self = this; + var man_order = this.man_order.el.value; + var clicked_record = this.clicked_record; + rpc.query({ + model: 'mrp.workorder', + method: 'action_pause', + args: [, clicked_record, man_order], + }).then(function (result) { + if (result == "paused") { + self.continue_ref.el.classList.remove('d-none'); + self.pause_ref.el.classList.add('d-none') + self.notification.add(self.env._t("All work orders are paused"), { + type: "danger", + }); + self.PauseTimer(); + } + }); + } + + /** + * Continues the work order. + */ + ContinueWorkOrder() { + var self = this; + var man_order = this.man_order.el.value; + var clicked_record = this.clicked_record; + rpc.query({ + model: 'mrp.workorder', + method: 'action_continue', + args: [, clicked_record, man_order], + }).then(function (result) { + if (result == "continue") { + self.pause_ref.el.classList.remove('d-none'); + self.continue_ref.el.classList.add('d-none') + self.notification.add(self.env._t("Work order continued"), { + type: "success", + }); + self.TimerStart(); + } + }); + } + + /** + * Marks the work order as done. + */ + doneWorkOrder() { + var self = this + var man_order = this.man_order.el.value + var clicked_record = this.clicked_record + rpc.query({ + model: 'mrp.workorder', + method: 'action_done', + args: [, clicked_record, man_order], + }).then(function(result) { + if (result == "done") { + self.buttons_ref.el.classList.add('d-none') + self.notification.add(self.env._t("Work order completed"), { + type: "success", + }); + self.PauseTimer(); + self.ResetTimer(); + } + }); + } + + /** + * Starts the timer. + */ + TimerStart() { + if (isPaused) { + isPaused = false; + this.timer.el.classList.remove('d-none'); + this.setInterval = setInterval(displayTimer, 1000); + } + } + + /** + * Pauses the timer. + */ + PauseTimer() { + isPaused = true; + clearInterval(this.setInterval); + } + + /** + * Resets the timer. + */ + ResetTimer() { + clearInterval(this.setInterval); + seconds = 0; + minutes = 0; + hours = 0; + this.timer.el.classList.add('d-none') + } + static template = "barcode_scanning_view"; +} + +/** + * Displays the timer. + */ +function displayTimer() { + this.$('.timer-display').empty(); + seconds = seconds + 1; + if (seconds == 60) { + minutes = minutes + 1; + seconds = 0; + } + if (minutes == 60) { + hours = hours + 1; + minutes = 0; + } + if (seconds < 10) { + var s = "0" + seconds; + } + if (seconds >= 10) { + var s = seconds; + } + if (minutes < 10) { + var m = "0" + minutes; + } + if (minutes >= 10) { + var m = minutes; + } + if (hours < 10) { + var h = "0" + hours; + } + if (hours >= 10) { + var h = hours; + } + this.$('.timer-display').append(h + ':' + m + ':' + s); +} + +/** + * Template for the barcode scanning view. + */ +BarcodeScanningView.template = "barcode_scanning_view"; + +// Add the barcode scanning view to the action registry +actionRegistry.add('barcode_for_work_centers_scanning_template', BarcodeScanningView); diff --git a/barcode_for_work_centers/static/src/xml/barcode_scan_templates.xml b/barcode_for_work_centers/static/src/xml/barcode_scan_templates.xml new file mode 100755 index 000000000..e5b1d186e --- /dev/null +++ b/barcode_for_work_centers/static/src/xml/barcode_scan_templates.xml @@ -0,0 +1,72 @@ + +