forked from CybroOdoo/CybroAddons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jun 12: [ADD] Initial Commit 'barcode_for_work_centers'
- Loading branch information
1 parent
b0c7cd8
commit 7882f41
Showing
65 changed files
with
1,357 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <https://cybrosys.com/>`__ | ||
|
||
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: [email protected] | ||
|
||
Contacts | ||
======== | ||
* Mail Contact : [email protected] | ||
* Website : https://cybrosys.com | ||
|
||
Bug Tracker | ||
=========== | ||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if | ||
your issue has already been reported. | ||
|
||
Maintainer | ||
========== | ||
.. image:: https://cybrosys.com/images/logo.png | ||
:target: https://cybrosys.com | ||
|
||
This module is maintained by Cybrosys Technologies. | ||
|
||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ | ||
|
||
Further information | ||
=================== | ||
HTML Description: `<static/description/index.html>`__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################### | ||
# | ||
# Cybrosys Technologies Pvt. Ltd. | ||
# | ||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||
# Author: Jaseem ([email protected]) | ||
# | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################### | ||
# | ||
# Cybrosys Technologies Pvt. Ltd. | ||
# | ||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||
# Author: Jaseem ([email protected]) | ||
# | ||
# 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, | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
barcode_for_work_centers/data/barcode_for_work_centers.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<!-- This record is created a client action for creating client action for opening barcode scanning template --> | ||
<record id="barcode_for_work_centers.barcode_for_work_centers_scanning_template" | ||
model="ir.actions.client"> | ||
<field name="name">Barcode scanning view</field> | ||
<field name="tag">barcode_for_work_centers_scanning_template</field> | ||
<field name="target">current</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Module <barcode_for_work_centers> | ||
|
||
##### 07.02.2024 | ||
##### Version 16.0.1.0.0 | ||
##### ADD | ||
- Initial commit for Barcode for work centers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################### | ||
# | ||
# Cybrosys Technologies Pvt. Ltd. | ||
# | ||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||
# Author: Jaseem ([email protected]) | ||
# | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################### | ||
# | ||
# Cybrosys Technologies Pvt. Ltd. | ||
# | ||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||
# Author: Jaseem ([email protected]) | ||
# | ||
# 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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################### | ||
# | ||
# Cybrosys Technologies Pvt. Ltd. | ||
# | ||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | ||
# Author: Jaseem ([email protected]) | ||
# | ||
# 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" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+310 Bytes
barcode_for_work_centers/static/description/assets/icons/chevron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
barcode_for_work_centers/static/description/assets/icons/consultation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+576 Bytes
barcode_for_work_centers/static/description/assets/icons/ecom-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+733 Bytes
barcode_for_work_centers/static/description/assets/icons/education-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+911 Bytes
barcode_for_work_centers/static/description/assets/icons/hotel-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.17 KB
barcode_for_work_centers/static/description/assets/icons/lifebuoy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+673 Bytes
barcode_for_work_centers/static/description/assets/icons/manufacturing-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+878 Bytes
barcode_for_work_centers/static/description/assets/icons/pos-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+653 Bytes
barcode_for_work_centers/static/description/assets/icons/puzzle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+905 Bytes
barcode_for_work_centers/static/description/assets/icons/restaurant-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+839 Bytes
barcode_for_work_centers/static/description/assets/icons/service-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+427 Bytes
barcode_for_work_centers/static/description/assets/icons/trading-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+627 Bytes
barcode_for_work_centers/static/description/assets/icons/training.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.5 KB
barcode_for_work_centers/static/description/assets/misc/categories.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.09 KB
barcode_for_work_centers/static/description/assets/misc/check-box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.15 KB
barcode_for_work_centers/static/description/assets/misc/corporate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.09 KB
barcode_for_work_centers/static/description/assets/misc/customer-support.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.39 KB
barcode_for_work_centers/static/description/assets/misc/cybrosys-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+589 Bytes
barcode_for_work_centers/static/description/assets/misc/features.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+2.28 KB
barcode_for_work_centers/static/description/assets/misc/pie-chart.png
Oops, something went wrong.
Binary file added
BIN
+967 Bytes
barcode_for_work_centers/static/description/assets/misc/right-arrow.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+149 KB
barcode_for_work_centers/static/description/assets/screenshots/hero.gif
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.