diff --git a/merge_rfq/README.rst b/merge_rfq/README.rst new file mode 100755 index 000000000..c3d21a745 --- /dev/null +++ b/merge_rfq/README.rst @@ -0,0 +1,41 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Merge RFQ +======================= +This module allow to merge Purchase order in RFQ state. + +Configuration +============= +No additional configurations needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: @cybrosys, 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/merge_rfq/__init__.py b/merge_rfq/__init__.py new file mode 100644 index 000000000..9a3a9a039 --- /dev/null +++ b/merge_rfq/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# 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 wizard diff --git a/merge_rfq/__manifest__.py b/merge_rfq/__manifest__.py new file mode 100644 index 000000000..451775471 --- /dev/null +++ b/merge_rfq/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# 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': 'Merge RFQ', + 'version': '16.0.1.0.0', + 'summary': """This module merege two or more RFQ by cancelling or deleting + the others in RFQ and RFQ sent state.""", + 'description': """'Merge RFQ' is a module for Odoo 16 that allows users to + merge multiple Requests for Quotations (RFQs) into a single one by + cancelling or deleting the others in RFQ and RFQ sent state.""", + 'category': 'Purchases', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'images': ['static/description/banner.png'], + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'purchase'], + 'data': [ + 'security/ir.model.access.csv', + 'wizard/merge_rfq_wizard.xml' + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application':False, +} \ No newline at end of file diff --git a/merge_rfq/doc/RELEASE_NOTES.md b/merge_rfq/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..322ce2d8c --- /dev/null +++ b/merge_rfq/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 28.02.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Merge RFQ diff --git a/merge_rfq/security/ir.model.access.csv b/merge_rfq/security/ir.model.access.csv new file mode 100644 index 000000000..8cb26b460 --- /dev/null +++ b/merge_rfq/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_merge_rfq,access_merge_rfq,model_merge_rfq,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/merge_rfq/static/description/assets/icons/check.png b/merge_rfq/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/merge_rfq/static/description/assets/icons/check.png differ diff --git a/merge_rfq/static/description/assets/icons/chevron.png b/merge_rfq/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/merge_rfq/static/description/assets/icons/chevron.png differ diff --git a/merge_rfq/static/description/assets/icons/cogs.png b/merge_rfq/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/merge_rfq/static/description/assets/icons/cogs.png differ diff --git a/merge_rfq/static/description/assets/icons/consultation.png b/merge_rfq/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/merge_rfq/static/description/assets/icons/consultation.png differ diff --git a/merge_rfq/static/description/assets/icons/ecom-black.png b/merge_rfq/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/merge_rfq/static/description/assets/icons/ecom-black.png differ diff --git a/merge_rfq/static/description/assets/icons/education-black.png b/merge_rfq/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/merge_rfq/static/description/assets/icons/education-black.png differ diff --git a/merge_rfq/static/description/assets/icons/hotel-black.png b/merge_rfq/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/merge_rfq/static/description/assets/icons/hotel-black.png differ diff --git a/merge_rfq/static/description/assets/icons/license.png b/merge_rfq/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/merge_rfq/static/description/assets/icons/license.png differ diff --git a/merge_rfq/static/description/assets/icons/lifebuoy.png b/merge_rfq/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/merge_rfq/static/description/assets/icons/lifebuoy.png differ diff --git a/merge_rfq/static/description/assets/icons/manufacturing-black.png b/merge_rfq/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/merge_rfq/static/description/assets/icons/manufacturing-black.png differ diff --git a/merge_rfq/static/description/assets/icons/pos-black.png b/merge_rfq/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/merge_rfq/static/description/assets/icons/pos-black.png differ diff --git a/merge_rfq/static/description/assets/icons/puzzle.png b/merge_rfq/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/merge_rfq/static/description/assets/icons/puzzle.png differ diff --git a/merge_rfq/static/description/assets/icons/restaurant-black.png b/merge_rfq/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/merge_rfq/static/description/assets/icons/restaurant-black.png differ diff --git a/merge_rfq/static/description/assets/icons/service-black.png b/merge_rfq/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/merge_rfq/static/description/assets/icons/service-black.png differ diff --git a/merge_rfq/static/description/assets/icons/trading-black.png b/merge_rfq/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/merge_rfq/static/description/assets/icons/trading-black.png differ diff --git a/merge_rfq/static/description/assets/icons/training.png b/merge_rfq/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/merge_rfq/static/description/assets/icons/training.png differ diff --git a/merge_rfq/static/description/assets/icons/update.png b/merge_rfq/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/merge_rfq/static/description/assets/icons/update.png differ diff --git a/merge_rfq/static/description/assets/icons/user.png b/merge_rfq/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/merge_rfq/static/description/assets/icons/user.png differ diff --git a/merge_rfq/static/description/assets/icons/wrench.png b/merge_rfq/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/merge_rfq/static/description/assets/icons/wrench.png differ diff --git a/merge_rfq/static/description/assets/misc/categories.png b/merge_rfq/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/merge_rfq/static/description/assets/misc/categories.png differ diff --git a/merge_rfq/static/description/assets/misc/check-box.png b/merge_rfq/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/merge_rfq/static/description/assets/misc/check-box.png differ diff --git a/merge_rfq/static/description/assets/misc/compass.png b/merge_rfq/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/merge_rfq/static/description/assets/misc/compass.png differ diff --git a/merge_rfq/static/description/assets/misc/corporate.png b/merge_rfq/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/merge_rfq/static/description/assets/misc/corporate.png differ diff --git a/merge_rfq/static/description/assets/misc/customer-support.png b/merge_rfq/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/merge_rfq/static/description/assets/misc/customer-support.png differ diff --git a/merge_rfq/static/description/assets/misc/cybrosys-logo.png b/merge_rfq/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/merge_rfq/static/description/assets/misc/cybrosys-logo.png differ diff --git a/merge_rfq/static/description/assets/misc/features.png b/merge_rfq/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/merge_rfq/static/description/assets/misc/features.png differ diff --git a/merge_rfq/static/description/assets/misc/logo.png b/merge_rfq/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/merge_rfq/static/description/assets/misc/logo.png differ diff --git a/merge_rfq/static/description/assets/misc/pictures.png b/merge_rfq/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/merge_rfq/static/description/assets/misc/pictures.png differ diff --git a/merge_rfq/static/description/assets/misc/pie-chart.png b/merge_rfq/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/merge_rfq/static/description/assets/misc/pie-chart.png differ diff --git a/merge_rfq/static/description/assets/misc/right-arrow.png b/merge_rfq/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/merge_rfq/static/description/assets/misc/right-arrow.png differ diff --git a/merge_rfq/static/description/assets/misc/star.png b/merge_rfq/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/merge_rfq/static/description/assets/misc/star.png differ diff --git a/merge_rfq/static/description/assets/misc/support.png b/merge_rfq/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/merge_rfq/static/description/assets/misc/support.png differ diff --git a/merge_rfq/static/description/assets/misc/whatsapp.png b/merge_rfq/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/merge_rfq/static/description/assets/misc/whatsapp.png differ diff --git a/merge_rfq/static/description/assets/modules/1.png b/merge_rfq/static/description/assets/modules/1.png new file mode 100644 index 000000000..4f9e87f6e Binary files /dev/null and b/merge_rfq/static/description/assets/modules/1.png differ diff --git a/merge_rfq/static/description/assets/modules/2.png b/merge_rfq/static/description/assets/modules/2.png new file mode 100644 index 000000000..3add135c3 Binary files /dev/null and b/merge_rfq/static/description/assets/modules/2.png differ diff --git a/merge_rfq/static/description/assets/modules/3.png b/merge_rfq/static/description/assets/modules/3.png new file mode 100644 index 000000000..e571015b1 Binary files /dev/null and b/merge_rfq/static/description/assets/modules/3.png differ diff --git a/merge_rfq/static/description/assets/modules/4.png b/merge_rfq/static/description/assets/modules/4.png new file mode 100644 index 000000000..55fb7ba18 Binary files /dev/null and b/merge_rfq/static/description/assets/modules/4.png differ diff --git a/merge_rfq/static/description/assets/modules/5.png b/merge_rfq/static/description/assets/modules/5.png new file mode 100644 index 000000000..e339ff769 Binary files /dev/null and b/merge_rfq/static/description/assets/modules/5.png differ diff --git a/merge_rfq/static/description/assets/modules/6.png b/merge_rfq/static/description/assets/modules/6.png new file mode 100644 index 000000000..febd12d15 Binary files /dev/null and b/merge_rfq/static/description/assets/modules/6.png differ diff --git a/merge_rfq/static/description/assets/screenshots/hero.gif b/merge_rfq/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..45d8d7ee6 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/hero.gif differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_1.png b/merge_rfq/static/description/assets/screenshots/screenshot_1.png new file mode 100644 index 000000000..0ca65699b Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_1.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_10.png b/merge_rfq/static/description/assets/screenshots/screenshot_10.png new file mode 100644 index 000000000..23b903e3e Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_10.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_11.png b/merge_rfq/static/description/assets/screenshots/screenshot_11.png new file mode 100644 index 000000000..be00dfae6 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_11.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_12.png b/merge_rfq/static/description/assets/screenshots/screenshot_12.png new file mode 100644 index 000000000..74fcc6278 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_12.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_13.png b/merge_rfq/static/description/assets/screenshots/screenshot_13.png new file mode 100644 index 000000000..6eea66334 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_13.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_14.png b/merge_rfq/static/description/assets/screenshots/screenshot_14.png new file mode 100644 index 000000000..a2e3e6689 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_14.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_15.png b/merge_rfq/static/description/assets/screenshots/screenshot_15.png new file mode 100644 index 000000000..7cc437998 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_15.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_2.png b/merge_rfq/static/description/assets/screenshots/screenshot_2.png new file mode 100644 index 000000000..236b2c4a2 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_2.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_3.png b/merge_rfq/static/description/assets/screenshots/screenshot_3.png new file mode 100644 index 000000000..bc6f066dd Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_3.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_4.png b/merge_rfq/static/description/assets/screenshots/screenshot_4.png new file mode 100644 index 000000000..1bf60100a Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_4.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_5.png b/merge_rfq/static/description/assets/screenshots/screenshot_5.png new file mode 100644 index 000000000..1cd58f969 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_5.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_6.png b/merge_rfq/static/description/assets/screenshots/screenshot_6.png new file mode 100644 index 000000000..ac48bee1b Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_6.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_7.png b/merge_rfq/static/description/assets/screenshots/screenshot_7.png new file mode 100644 index 000000000..371ffbc32 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_7.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_8.png b/merge_rfq/static/description/assets/screenshots/screenshot_8.png new file mode 100644 index 000000000..c30f5aae4 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_8.png differ diff --git a/merge_rfq/static/description/assets/screenshots/screenshot_9.png b/merge_rfq/static/description/assets/screenshots/screenshot_9.png new file mode 100644 index 000000000..3a86e9b79 Binary files /dev/null and b/merge_rfq/static/description/assets/screenshots/screenshot_9.png differ diff --git a/merge_rfq/static/description/banner.png b/merge_rfq/static/description/banner.png new file mode 100644 index 000000000..ed05c1729 Binary files /dev/null and b/merge_rfq/static/description/banner.png differ diff --git a/merge_rfq/static/description/icon.png b/merge_rfq/static/description/icon.png new file mode 100644 index 000000000..63bf90a11 Binary files /dev/null and b/merge_rfq/static/description/icon.png differ diff --git a/merge_rfq/static/description/index.html b/merge_rfq/static/description/index.html new file mode 100644 index 000000000..898a6d383 --- /dev/null +++ b/merge_rfq/static/description/index.html @@ -0,0 +1,595 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Merge RFQ +

+

Merge Purchase orders in RFQ state

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module helps to merge purchase orders that are in RFQ or RFQ Sent state. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Community & + Enterprise Support. +
+
+ + Cancel all selected purchase order and Create new order. +
+
+ + Merge order on existing selected order and cancel others. +
+
+
+
+ + Delete all selected purchase order and Create new order. +
+ +
+ + Merge order on existing selected order and delete others +
+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Merge Orders Action +

+

Select two or more purchase orders which is in RFQ or RFQ sent state and in 'Action' tab there is an option 'Merge Orders'.

+ +
+ +
+

Merge Orders Wizard +

+

When click on the Merge Orders in 'Action' it will open a Wizard.

+ +
+ +
+

Merge Type +

+

In the wizard there is four options in Merge Type.
+ 1.Cancel all selected purchase order and Create new order.
+ 2.Delete all selected purchase order and Create new order.
+ 3.Merge order on existing selected order and cancel others.
+ 4.Merge order on existing selected order and delete others.

+ +
+ +
+

Cancel/Delete all selected purchase order and Create new order +

+

When select cancel all selected purchase order and create new order there is an option for selecting new vendor and click on button merge orders, + it will cancel the all selected purchase order and create new order with the selected vendor and if select delete all selected purchase order and create new order, it + will delete the all selected purchase order and create new order with the selected vendor.

+ + + + + +
+ +
+

Merge order on existing selected order and cancel/delete others +

+

When select merge order on existing selected order and cancel others there is an option for selecting the RFQ and click on button merge orders, + it will merge the order lines to the selected RFQ and cancel others and if select merge order on existing selected order and delete others, it will merge the + order lines to the selected RFQ and delete others.

+ + + + + +
+ +
+

At least two purchase orders +

+

At least two purchase order must be selected, otherwise ith show an error.

+ +
+ +
+

Orders of RFQ or RFQ Sent sate +

+

Orders should be in state RFQ or RFQ Sent, otherwise it shows an error.

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

Related + 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

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

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/merge_rfq/wizard/__init__.py b/merge_rfq/wizard/__init__.py new file mode 100644 index 000000000..fea5e3d82 --- /dev/null +++ b/merge_rfq/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# 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 merge_rfq_wizard diff --git a/merge_rfq/wizard/merge_rfq_wizard.py b/merge_rfq/wizard/merge_rfq_wizard.py new file mode 100644 index 000000000..e043e63ea --- /dev/null +++ b/merge_rfq/wizard/merge_rfq_wizard.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technologies +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class MergeRfq(models.TransientModel): + _name = 'merge.rfq' + _description = 'Merge RFQ' + + merge_type = fields.Selection(selection=[ + ('cancel_and_new', + 'Cancel all selected purchase order and Create new order'), + ('delete_and_new', + 'Delete all selected purchase order and Create new order'), + ('cancel_and_merge', + 'Merge order on existing selected order and cancel others'), + ('delete_and_merge', + 'Merge order on existing selected order and delete others')], + default='cancel_and_new', help='Select which type of merge is to done.' + ) + purchase_order_id = fields.Many2one('purchase.order', 'Purchase Order', + help='Select RFQ to which others to ' + 'be merged') + partner_id = fields.Many2one('res.partner', 'Vendor', + help='Select Vendor for new order') + + @api.onchange('merge_type') + def _onchange_merge_type(self): + """This function passes a domain to the field purchase_order_id for + getting the selected RFQ""" + for order in self: + order.purchase_order_id = False + if order.merge_type in ['cancel_and_merge', 'delete_and_merge']: + purchase_orders = self.env["purchase.order"].browse( + self._context.get("active_ids", [])) + return { + 'domain': {'purchase_order_id': [( + "id", "in", [ + purchase.id for purchase in purchase_orders])]}} + + def merge_orders(self): + """This function merge the selected RFQs""" + purchase_orders = self.env["purchase.order"].browse( + self._context.get("active_ids", [])) + if len(self._context.get("active_ids", [])) < 2: + raise UserError(_("Please select at least two purchase orders.")) + if any(order.state not in ["draft", "sent"] for order in purchase_orders): + raise UserError(_( + "Please select Purchase orders which are in RFQ or RFQ sent " + "state.")) + if self.merge_type in ['cancel_and_new', 'delete_and_new']: + new_po = self.env["purchase.order"].create( + {"partner_id": self.partner_id.id}) + for order in purchase_orders: + for line in order.order_line: + order_line = False + if new_po.order_line: + for new_line in new_po.order_line: + if (line.product_id == new_line.product_id and + line.price_unit == new_line.price_unit): + order_line = new_line + break + if order_line: + order_line.product_qty += line.product_qty + else: + line.copy(default={"order_id": new_po.id}) + for order in purchase_orders: + order.sudo().button_cancel() + if self.merge_type == "delete_and_new": + order.sudo().unlink() + else: + selected_po = self.purchase_order_id + for order in purchase_orders: + if order == selected_po: + continue + for line in order.order_line: + order_line = False + if selected_po.order_line: + for new_line in selected_po.order_line: + if (line.product_id == new_line.product_id and + line.price_unit == new_line.price_unit): + order_line = new_line + break + if order_line: + order_line.product_qty += line.product_qty + else: + line.copy( + default={"order_id": self.purchase_order_id.id}) + for order in purchase_orders: + if order != selected_po: + order.sudo().button_cancel() + if self.merge_type == "delete_and_merge": + order.sudo().unlink() diff --git a/merge_rfq/wizard/merge_rfq_wizard.xml b/merge_rfq/wizard/merge_rfq_wizard.xml new file mode 100644 index 000000000..8945eb77a --- /dev/null +++ b/merge_rfq/wizard/merge_rfq_wizard.xml @@ -0,0 +1,32 @@ + + + + + Merge Orders + merge.rfq + +
+ + + + + +
+
+
+
+
+ + + Merge Orders + ir.actions.act_window + merge.rfq + form + + new + + list + +
\ No newline at end of file