diff --git a/pos_paid_order_delete/README.rst b/pos_paid_order_delete/README.rst new file mode 100644 index 000000000..679695715 --- /dev/null +++ b/pos_paid_order_delete/README.rst @@ -0,0 +1,50 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +POS Paid Order Delete +===================== + This app allow the specified user to delete the pos orders in paid state. + +Installation +============ +- www.odoo.com/documentation/15.0/setup/install.html +- Install our custom addon + +License +------- +General Public License, Version 3 (AGPL v3). +(http://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V15)Gayathri V + (V16)Shonima @cybrosys,Sabeel B + +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/pos_paid_order_delete/__init__.py b/pos_paid_order_delete/__init__.py new file mode 100644 index 000000000..1803f1690 --- /dev/null +++ b/pos_paid_order_delete/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Gayathri v (Contact : 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 +from odoo import api, SUPERUSER_ID + + +def _uninstall_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) + env['ir.config_parameter'].sudo().set_param( + 'pos_paid_order_delete.is_delete', + False) diff --git a/pos_paid_order_delete/__manifest__.py b/pos_paid_order_delete/__manifest__.py new file mode 100644 index 000000000..fbe0f8db0 --- /dev/null +++ b/pos_paid_order_delete/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Gayathri V (Contact : 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': 'POS Paid Order Delete', + 'version': '15.0.1.0.0', + 'category': 'POS', + 'summary': "Can Delete POS Orders in Paid State With or Without Code", + 'description': "This app allow the specified user to delete the pos orders" + " with or without code in paid state by unlinking the " + "payments of corresponding order.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale'], + 'data': + [ + 'security/ir.model.access.csv', + 'security/pos_order_delete_groups.xml', + 'data/pos_order_data.xml', + 'views/res_config_settings_views.xml', + 'wizard/delete_paid_pos_order_views.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, + 'uninstall_hook': '_uninstall_hook', +} diff --git a/pos_paid_order_delete/data/pos_order_data.xml b/pos_paid_order_delete/data/pos_order_data.xml new file mode 100644 index 000000000..0ba451d8a --- /dev/null +++ b/pos_paid_order_delete/data/pos_order_data.xml @@ -0,0 +1,13 @@ + + + + Delete Paid Order + ir.actions.act_window + delete.paid.pos.order + form + new + action + list,form + + + diff --git a/pos_paid_order_delete/doc/RELEASE_NOTES.md b/pos_paid_order_delete/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..61668cf3e --- /dev/null +++ b/pos_paid_order_delete/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 26.07.2024 +#### Version 15.0.1.0.0 +#### ADD +- Initial Commit for POS Paid Order Delete. diff --git a/pos_paid_order_delete/models/__init__.py b/pos_paid_order_delete/models/__init__.py new file mode 100644 index 000000000..358cf05c7 --- /dev/null +++ b/pos_paid_order_delete/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Gayathri V (Contact : 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 res_config_settings diff --git a/pos_paid_order_delete/models/res_config_settings.py b/pos_paid_order_delete/models/res_config_settings.py new file mode 100644 index 000000000..02c19f6d5 --- /dev/null +++ b/pos_paid_order_delete/models/res_config_settings.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Gayathri V (Contact : 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, models, fields + + +class ResConfigSettings(models.TransientModel): + """Inheriting ResConfigSettings to add new fields""" + _inherit = 'res.config.settings' + + is_delete = fields.Boolean(string='Delete Paid Order', + help='Based on this selection it shows the ' + 'fields for deleting the paid pos order ' + 'with code and without code') + delete_paid_order = fields.Selection( + [('order_with_code', 'Delete POS order with code'), + ('order_without_code', 'Delete POS order without code')], + default='order_with_code', + string='Delete Paid Order', + store=True, + help='Delete the paid POS order with code or without providing the ' + 'code') + code = fields.Char(string='Code', help="Enter code to confirming " + "record deletion") + + @api.model + def get_values(self): + """Get values from the fields""" + res = super(ResConfigSettings, self).get_values() + params = self.env['ir.config_parameter'].sudo().get_param + is_delete = params('pos_paid_order_delete.is_delete') + delete_paid_order = params('pos_paid_order_delete.delete_paid_order') + code = params('pos_paid_order_delete.code') + res.update( + is_delete=is_delete, + delete_paid_order=delete_paid_order, + code=code, + ) + return res + + def set_values(self): + """Set values in the fields""" + super(ResConfigSettings, self).set_values() + self.env['ir.config_parameter'].sudo().set_param( + 'pos_paid_order_delete.is_delete', + self.is_delete) + self.env['ir.config_parameter'].sudo().set_param( + 'pos_paid_order_delete.delete_paid_order', + self.delete_paid_order) + self.env['ir.config_parameter'].sudo().set_param( + 'pos_paid_order_delete.code', + self.code) + if self.is_delete: + self.env['ir.actions.act_window'].search([ + ('name', '=', 'Delete Paid Order')]).update( + {'binding_model_id': self.env['ir.model.data']._xmlid_to_res_id + ('point_of_sale.model_pos_order') + }) + else: + (self.env['ir.actions.act_window'].search([ + ('name', '=', 'Delete Paid Order')]).update + ({'binding_model_id': ''})) + + @api.onchange('is_delete') + def _onchange_is_delete(self): + """This function is used to st the value of code is None when we are + disabling the pos order delete field""" + if not self.is_delete: + self.code = None diff --git a/pos_paid_order_delete/security/ir.model.access.csv b/pos_paid_order_delete/security/ir.model.access.csv new file mode 100644 index 000000000..aff4ce1f2 --- /dev/null +++ b/pos_paid_order_delete/security/ir.model.access.csv @@ -0,0 +1,2 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_delete_paid_pos_order","delete.paid.pos.order","model_delete_paid_pos_order","base.group_user",1,1,1,1 diff --git a/pos_paid_order_delete/security/pos_order_delete_groups.xml b/pos_paid_order_delete/security/pos_order_delete_groups.xml new file mode 100644 index 000000000..be1a0b3aa --- /dev/null +++ b/pos_paid_order_delete/security/pos_order_delete_groups.xml @@ -0,0 +1,7 @@ + + + + + POS Order Delete + + diff --git a/pos_paid_order_delete/static/description/assets/icons/check.png b/pos_paid_order_delete/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/check.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/chevron.png b/pos_paid_order_delete/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/chevron.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/cogs.png b/pos_paid_order_delete/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/cogs.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/consultation.png b/pos_paid_order_delete/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/consultation.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/ecom-black.png b/pos_paid_order_delete/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/ecom-black.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/education-black.png b/pos_paid_order_delete/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/education-black.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/hotel-black.png b/pos_paid_order_delete/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/hotel-black.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/license.png b/pos_paid_order_delete/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/license.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/lifebuoy.png b/pos_paid_order_delete/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/logo.png b/pos_paid_order_delete/static/description/assets/icons/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/logo.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/manufacturing-black.png b/pos_paid_order_delete/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/pos-black.png b/pos_paid_order_delete/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/pos-black.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/puzzle.png b/pos_paid_order_delete/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/puzzle.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/restaurant-black.png b/pos_paid_order_delete/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/service-black.png b/pos_paid_order_delete/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/service-black.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/trading-black.png b/pos_paid_order_delete/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/trading-black.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/training.png b/pos_paid_order_delete/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/training.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/update.png b/pos_paid_order_delete/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/update.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/user.png b/pos_paid_order_delete/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/user.png differ diff --git a/pos_paid_order_delete/static/description/assets/icons/wrench.png b/pos_paid_order_delete/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/icons/wrench.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/categories.png b/pos_paid_order_delete/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/categories.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/check-box.png b/pos_paid_order_delete/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/check-box.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/compass.png b/pos_paid_order_delete/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/compass.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/corporate.png b/pos_paid_order_delete/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/corporate.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/customer-support.png b/pos_paid_order_delete/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/customer-support.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/cybrosys-logo.png b/pos_paid_order_delete/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/features.png b/pos_paid_order_delete/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/features.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/logo.png b/pos_paid_order_delete/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/logo.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/pictures.png b/pos_paid_order_delete/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/pictures.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/pie-chart.png b/pos_paid_order_delete/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/pie-chart.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/right-arrow.png b/pos_paid_order_delete/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/right-arrow.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/star.png b/pos_paid_order_delete/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/star.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/support.png b/pos_paid_order_delete/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/support.png differ diff --git a/pos_paid_order_delete/static/description/assets/misc/whatsapp.png b/pos_paid_order_delete/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/misc/whatsapp.png differ diff --git a/pos_paid_order_delete/static/description/assets/modules/1.jpg b/pos_paid_order_delete/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..e7985dc61 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/modules/1.jpg differ diff --git a/pos_paid_order_delete/static/description/assets/modules/1.png b/pos_paid_order_delete/static/description/assets/modules/1.png new file mode 100644 index 000000000..ed175b076 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/modules/1.png differ diff --git a/pos_paid_order_delete/static/description/assets/modules/2.png b/pos_paid_order_delete/static/description/assets/modules/2.png new file mode 100644 index 000000000..5c8646fae Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/modules/2.png differ diff --git a/pos_paid_order_delete/static/description/assets/modules/3.png b/pos_paid_order_delete/static/description/assets/modules/3.png new file mode 100644 index 000000000..6a0795416 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/modules/3.png differ diff --git a/pos_paid_order_delete/static/description/assets/modules/4.png b/pos_paid_order_delete/static/description/assets/modules/4.png new file mode 100644 index 000000000..f640cfa3a Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/modules/4.png differ diff --git a/pos_paid_order_delete/static/description/assets/modules/5.gif b/pos_paid_order_delete/static/description/assets/modules/5.gif new file mode 100644 index 000000000..8f40aab85 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/modules/5.gif differ diff --git a/pos_paid_order_delete/static/description/assets/modules/5.png b/pos_paid_order_delete/static/description/assets/modules/5.png new file mode 100755 index 000000000..ebbbfb663 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/modules/5.png differ diff --git a/pos_paid_order_delete/static/description/assets/modules/6.png b/pos_paid_order_delete/static/description/assets/modules/6.png new file mode 100644 index 000000000..f7be9edcf Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/modules/6.png differ diff --git a/pos_paid_order_delete/static/description/assets/screenshots/1.png b/pos_paid_order_delete/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..118e96539 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/screenshots/1.png differ diff --git a/pos_paid_order_delete/static/description/assets/screenshots/2.png b/pos_paid_order_delete/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..7a9af5b47 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/screenshots/2.png differ diff --git a/pos_paid_order_delete/static/description/assets/screenshots/3.png b/pos_paid_order_delete/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..1ae43bf61 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/screenshots/3.png differ diff --git a/pos_paid_order_delete/static/description/assets/screenshots/4.png b/pos_paid_order_delete/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..0f67bd8d6 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/screenshots/4.png differ diff --git a/pos_paid_order_delete/static/description/assets/screenshots/5.png b/pos_paid_order_delete/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..f4dbc5030 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/screenshots/5.png differ diff --git a/pos_paid_order_delete/static/description/assets/screenshots/6.png b/pos_paid_order_delete/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..8132b513e Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/screenshots/6.png differ diff --git a/pos_paid_order_delete/static/description/assets/screenshots/7.png b/pos_paid_order_delete/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..29b98a574 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/screenshots/7.png differ diff --git a/pos_paid_order_delete/static/description/assets/screenshots/hero.gif b/pos_paid_order_delete/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..66ca67740 Binary files /dev/null and b/pos_paid_order_delete/static/description/assets/screenshots/hero.gif differ diff --git a/pos_paid_order_delete/static/description/banner.png b/pos_paid_order_delete/static/description/banner.png new file mode 100644 index 000000000..1a6f4706e Binary files /dev/null and b/pos_paid_order_delete/static/description/banner.png differ diff --git a/pos_paid_order_delete/static/description/icon.png b/pos_paid_order_delete/static/description/icon.png new file mode 100644 index 000000000..3171b7d32 Binary files /dev/null and b/pos_paid_order_delete/static/description/icon.png differ diff --git a/pos_paid_order_delete/static/description/index.html b/pos_paid_order_delete/static/description/index.html new file mode 100755 index 000000000..129f0b4b3 --- /dev/null +++ b/pos_paid_order_delete/static/description/index.html @@ -0,0 +1,670 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+ +
+
+
+

+ POS Paid Order Delete

+

+ This App helps you to Delete the POS orders in Paid state. +

+ +
+
+ + + +
+
+

+ Overview +

+
+ +
+

+ This app allow the specified user to delete the pos orders with or without code in paid state by unlinking the + payments of corresponding order. +

+
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Easy Configuration.

+
+
+ +
+
+ +
+
+

+ Delete the pos order in paid state with using the code or without using the code.

+
+
+
+
+ +
+
+

+ Available in Odoo Community and Enterprise.

+
+
+ +
+
+

+ Screenshots +

+
+
+

+ Go to Settings --> Users & Companies --> Users --> Enable POS Order Delete. To give permission to the user to delete the paid POS orders.

+

+

+ +
+ +
+

+ Go to Point of Sale --> Configuration --> Settings --> Enable the boolean field Delete Paid Order.

+

+

+ +
+
+

+ Choose with or without code, Enter a code if your going with code.

+ +
+ +
+

+ Go to Point of Sale --> Orders --> Orders --> Choose Order/Orders to delete --> Select the action 'Delete Paid Order'.

+ +
+ +
+

+ Enter The Code and Click on 'DELETE PAID ORDER'.

+ +
+ +
+

+ Shows a Confirmation Wizard if Your Going Without Code

+ +
+ +
+

+ After Deleting the Order

+ +
+ +
+ +
+
+

Suggested Products

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

Our Services

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

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

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

+ Mobile + friendly, + awe-inspiring product pages

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

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

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

+ An + all-inclusive + hotel management application

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
+
\ No newline at end of file diff --git a/pos_paid_order_delete/views/res_config_settings_views.xml b/pos_paid_order_delete/views/res_config_settings_views.xml new file mode 100644 index 000000000..ea53f656f --- /dev/null +++ b/pos_paid_order_delete/views/res_config_settings_views.xml @@ -0,0 +1,53 @@ + + + + + + + res.config.settings.view.form.inherit.purchase.serial.number + + res.config.settings + + + +

Delete Paid Order

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pos_paid_order_delete/wizard/__init__.py b/pos_paid_order_delete/wizard/__init__.py new file mode 100644 index 000000000..b9d6a3ab6 --- /dev/null +++ b/pos_paid_order_delete/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Gayathri V (Contact : 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 delete_paid_pos_order diff --git a/pos_paid_order_delete/wizard/delete_paid_pos_order.py b/pos_paid_order_delete/wizard/delete_paid_pos_order.py new file mode 100644 index 000000000..d442f8342 --- /dev/null +++ b/pos_paid_order_delete/wizard/delete_paid_pos_order.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Gayathri V (Contact : 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, models, fields, _ +from odoo.exceptions import UserError + + +class DeletePosPaidOrder(models.TransientModel): + """wizard for choosing the order to be deleted""" + _name = "delete.paid.pos.order" + _description = "Delete Paid POS Order" + + pos_order_delete = fields.Boolean(string='Delete Paid Order', default=True, + help="Enable to delete POS orders") + code = fields.Char(string='Code', help="Setup code to enter " + "while deleting the POS order") + + @api.model + def default_get(self, fields): + """The function used to update the default values""" + is_delete = self.env['ir.config_parameter'].sudo().get_param( + 'pos_paid_order_delete.is_delete') + result = super(DeletePosPaidOrder, self).default_get(fields) + if is_delete: + delete_paid_order = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'pos_paid_order_delete.delete_paid_order') + result['pos_order_delete'] = delete_paid_order != 'order_with_code' + return result + + def delete_pos_paid_order(self): + """This function is used to delete the pos paid orders and the + corresponding payments""" + is_delete = (self.env['ir.config_parameter'].sudo(). + get_param('pos_paid_order_delete.is_delete')) + if is_delete: + delete_paid_order = (self.env['ir.config_parameter'].sudo(). + get_param('pos_paid_order_delete.' + 'delete_paid_order' + )) + pos_orders = self.env['pos.order'].browse(self.env.context.get + ('active_ids')) + code = self.env['ir.config_parameter'].sudo().get_param( + 'pos_paid_order_delete.code') + if delete_paid_order == 'order_with_code': + if code == self.code: + for order in pos_orders: + for payment in order.payment_ids: + payment.unlink() + order.action_pos_order_cancel() + order.unlink() + else: + raise UserError("The code is wrong.Please enter the " + "correct code") + else: + for order in pos_orders: + for payment in order.payment_ids: + payment.unlink() + order.action_pos_order_cancel() + order.unlink() + return { + 'type': 'ir.actions.act_window', + 'name': _('Delete Pos Orders'), + 'res_model': 'pos.order', + 'view_mode': 'tree', + 'view_id': self.env.ref('point_of_sale.view_pos_order_tree').id, + 'target': 'main', + } diff --git a/pos_paid_order_delete/wizard/delete_paid_pos_order_views.xml b/pos_paid_order_delete/wizard/delete_paid_pos_order_views.xml new file mode 100644 index 000000000..c386973bb --- /dev/null +++ b/pos_paid_order_delete/wizard/delete_paid_pos_order_views.xml @@ -0,0 +1,30 @@ + + + + + delete.paid.pos.order.view.form + delete.paid.pos.order + +
+ +
+

Are you sure you want to delete these records?

+
+
+

Please Enter the Code

+ + + + + +
+ + +
+
+