diff --git a/quick_rfq/README.rst b/quick_rfq/README.rst new file mode 100644 index 000000000..bd1d51aa3 --- /dev/null +++ b/quick_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 + +Quick RFQ from Products +======================= +This module helps to generate rfq from Products list. + +Configuration +============= +No additional configuration + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: Sagarika B @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/quick_rfq/__init__.py b/quick_rfq/__init__.py new file mode 100644 index 000000000..ddc47ca16 --- /dev/null +++ b/quick_rfq/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sagarika B (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. +# +############################################################################### +from . import models +from . import wizard diff --git a/quick_rfq/__manifest__.py b/quick_rfq/__manifest__.py new file mode 100644 index 000000000..04597a623 --- /dev/null +++ b/quick_rfq/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sagarika B (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. +# +############################################################################### +{ + 'name': 'Quick RFQ from Products', + 'version': '16.0.1.0.0', + 'summary': """Create quick RFQ from Products list""", + 'description': """" + This module helps you to create quick RFQ from Products + list.User can select multiple products from the Products + list and create RFQ for the selected Products + """, + 'category': 'Purchase', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'depends': ['base', 'purchase'], + 'data': [ + 'security/ir.model.access.csv', + 'wizard/product_rfq_views.xml', + 'views/product_product_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/quick_rfq/doc/RELEASE_NOTES.md b/quick_rfq/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..76b8633a6 --- /dev/null +++ b/quick_rfq/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 02.05.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Quick RFQ from Products \ No newline at end of file diff --git a/quick_rfq/models/__init__.py b/quick_rfq/models/__init__.py new file mode 100644 index 000000000..4f6a2e3ad --- /dev/null +++ b/quick_rfq/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sagarika B (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. +# +############################################################################### +from . import product_product diff --git a/quick_rfq/models/product_product.py b/quick_rfq/models/product_product.py new file mode 100644 index 000000000..e2ac66734 --- /dev/null +++ b/quick_rfq/models/product_product.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sagarika B (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. +# +############################################################################### +from odoo import models + + +class ProductProduct(models.Model): + """inherit model product.product""" + _inherit = 'product.product' + + def action_create_rfq(self): + """ + method to create rfq from server action + return product.rfq wizard to configure rfq + """ + lines = [] + for product in self: + lines.append((0, 0, { + 'product_id': product.id, + 'product_qty': 1.0, + 'price_unit': product.standard_price, + })) + product_rfq = self.env['product.rfq'].create({ + 'rfq_line_ids': lines + }) + return { + 'view_mode': 'form', + 'res_model': 'product.rfq', + 'res_id': product_rfq.id, + 'view_id': self.env.ref( + 'quick_rfq.product_rfq_form').id, + 'type': 'ir.actions.act_window', + 'target': 'new', + } diff --git a/quick_rfq/security/ir.model.access.csv b/quick_rfq/security/ir.model.access.csv new file mode 100644 index 000000000..252dd1aa5 --- /dev/null +++ b/quick_rfq/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_rfq,product.rfq,model_product_rfq,base.group_user,1,1,1,1 +access_product_rfq_line,product.rfq.line,model_product_rfq_line,base.group_user,1,1,1,1 diff --git a/quick_rfq/static/description/assets/icons/check.png b/quick_rfq/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/quick_rfq/static/description/assets/icons/check.png differ diff --git a/quick_rfq/static/description/assets/icons/chevron.png b/quick_rfq/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/quick_rfq/static/description/assets/icons/chevron.png differ diff --git a/quick_rfq/static/description/assets/icons/cogs.png b/quick_rfq/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/quick_rfq/static/description/assets/icons/cogs.png differ diff --git a/quick_rfq/static/description/assets/icons/consultation.png b/quick_rfq/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/quick_rfq/static/description/assets/icons/consultation.png differ diff --git a/quick_rfq/static/description/assets/icons/ecom-black.png b/quick_rfq/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/quick_rfq/static/description/assets/icons/ecom-black.png differ diff --git a/quick_rfq/static/description/assets/icons/education-black.png b/quick_rfq/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/quick_rfq/static/description/assets/icons/education-black.png differ diff --git a/quick_rfq/static/description/assets/icons/hotel-black.png b/quick_rfq/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/quick_rfq/static/description/assets/icons/hotel-black.png differ diff --git a/quick_rfq/static/description/assets/icons/license.png b/quick_rfq/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/quick_rfq/static/description/assets/icons/license.png differ diff --git a/quick_rfq/static/description/assets/icons/lifebuoy.png b/quick_rfq/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/quick_rfq/static/description/assets/icons/lifebuoy.png differ diff --git a/quick_rfq/static/description/assets/icons/manufacturing-black.png b/quick_rfq/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/quick_rfq/static/description/assets/icons/manufacturing-black.png differ diff --git a/quick_rfq/static/description/assets/icons/pos-black.png b/quick_rfq/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/quick_rfq/static/description/assets/icons/pos-black.png differ diff --git a/quick_rfq/static/description/assets/icons/puzzle.png b/quick_rfq/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/quick_rfq/static/description/assets/icons/puzzle.png differ diff --git a/quick_rfq/static/description/assets/icons/restaurant-black.png b/quick_rfq/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/quick_rfq/static/description/assets/icons/restaurant-black.png differ diff --git a/quick_rfq/static/description/assets/icons/service-black.png b/quick_rfq/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/quick_rfq/static/description/assets/icons/service-black.png differ diff --git a/quick_rfq/static/description/assets/icons/trading-black.png b/quick_rfq/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/quick_rfq/static/description/assets/icons/trading-black.png differ diff --git a/quick_rfq/static/description/assets/icons/training.png b/quick_rfq/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/quick_rfq/static/description/assets/icons/training.png differ diff --git a/quick_rfq/static/description/assets/icons/update.png b/quick_rfq/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/quick_rfq/static/description/assets/icons/update.png differ diff --git a/quick_rfq/static/description/assets/icons/user.png b/quick_rfq/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/quick_rfq/static/description/assets/icons/user.png differ diff --git a/quick_rfq/static/description/assets/icons/wrench.png b/quick_rfq/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/quick_rfq/static/description/assets/icons/wrench.png differ diff --git a/quick_rfq/static/description/assets/misc/categories.png b/quick_rfq/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/categories.png differ diff --git a/quick_rfq/static/description/assets/misc/check-box.png b/quick_rfq/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/check-box.png differ diff --git a/quick_rfq/static/description/assets/misc/compass.png b/quick_rfq/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/quick_rfq/static/description/assets/misc/compass.png differ diff --git a/quick_rfq/static/description/assets/misc/corporate.png b/quick_rfq/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/quick_rfq/static/description/assets/misc/corporate.png differ diff --git a/quick_rfq/static/description/assets/misc/customer-support.png b/quick_rfq/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/quick_rfq/static/description/assets/misc/customer-support.png differ diff --git a/quick_rfq/static/description/assets/misc/cybrosys-logo.png b/quick_rfq/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/quick_rfq/static/description/assets/misc/cybrosys-logo.png differ diff --git a/quick_rfq/static/description/assets/misc/features.png b/quick_rfq/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/features.png differ diff --git a/quick_rfq/static/description/assets/misc/logo.png b/quick_rfq/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/quick_rfq/static/description/assets/misc/logo.png differ diff --git a/quick_rfq/static/description/assets/misc/pictures.png b/quick_rfq/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/pictures.png differ diff --git a/quick_rfq/static/description/assets/misc/pie-chart.png b/quick_rfq/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/pie-chart.png differ diff --git a/quick_rfq/static/description/assets/misc/right-arrow.png b/quick_rfq/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/right-arrow.png differ diff --git a/quick_rfq/static/description/assets/misc/star.png b/quick_rfq/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/quick_rfq/static/description/assets/misc/star.png differ diff --git a/quick_rfq/static/description/assets/misc/support.png b/quick_rfq/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/support.png differ diff --git a/quick_rfq/static/description/assets/misc/whatsapp.png b/quick_rfq/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/whatsapp.png differ diff --git a/quick_rfq/static/description/assets/modules/1.png b/quick_rfq/static/description/assets/modules/1.png new file mode 100644 index 000000000..489f44e86 Binary files /dev/null and b/quick_rfq/static/description/assets/modules/1.png differ diff --git a/quick_rfq/static/description/assets/modules/2.png b/quick_rfq/static/description/assets/modules/2.png new file mode 100644 index 000000000..5acf9a06a Binary files /dev/null and b/quick_rfq/static/description/assets/modules/2.png differ diff --git a/quick_rfq/static/description/assets/modules/3.png b/quick_rfq/static/description/assets/modules/3.png new file mode 100644 index 000000000..57eebc5b2 Binary files /dev/null and b/quick_rfq/static/description/assets/modules/3.png differ diff --git a/quick_rfq/static/description/assets/modules/4.png b/quick_rfq/static/description/assets/modules/4.png new file mode 100644 index 000000000..bc5648b1a Binary files /dev/null and b/quick_rfq/static/description/assets/modules/4.png differ diff --git a/quick_rfq/static/description/assets/modules/5.png b/quick_rfq/static/description/assets/modules/5.png new file mode 100644 index 000000000..f8aaeb32c Binary files /dev/null and b/quick_rfq/static/description/assets/modules/5.png differ diff --git a/quick_rfq/static/description/assets/modules/6.png b/quick_rfq/static/description/assets/modules/6.png new file mode 100644 index 000000000..06d73ee7f Binary files /dev/null and b/quick_rfq/static/description/assets/modules/6.png differ diff --git a/quick_rfq/static/description/assets/screenshots/1.png b/quick_rfq/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..f3b2f98d3 Binary files /dev/null and b/quick_rfq/static/description/assets/screenshots/1.png differ diff --git a/quick_rfq/static/description/assets/screenshots/2.png b/quick_rfq/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..f26c1a9ac Binary files /dev/null and b/quick_rfq/static/description/assets/screenshots/2.png differ diff --git a/quick_rfq/static/description/assets/screenshots/3.png b/quick_rfq/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..d4975f249 Binary files /dev/null and b/quick_rfq/static/description/assets/screenshots/3.png differ diff --git a/quick_rfq/static/description/assets/screenshots/4.png b/quick_rfq/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..4f15c0a1a Binary files /dev/null and b/quick_rfq/static/description/assets/screenshots/4.png differ diff --git a/quick_rfq/static/description/assets/screenshots/hero.gif b/quick_rfq/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..fefd4e214 Binary files /dev/null and b/quick_rfq/static/description/assets/screenshots/hero.gif differ diff --git a/quick_rfq/static/description/banner.jpg b/quick_rfq/static/description/banner.jpg new file mode 100644 index 000000000..338c8bec7 Binary files /dev/null and b/quick_rfq/static/description/banner.jpg differ diff --git a/quick_rfq/static/description/icon.png b/quick_rfq/static/description/icon.png new file mode 100644 index 000000000..89b9ad61e Binary files /dev/null and b/quick_rfq/static/description/icon.png differ diff --git a/quick_rfq/static/description/index.html b/quick_rfq/static/description/index.html new file mode 100644 index 000000000..6eb47bd37 --- /dev/null +++ b/quick_rfq/static/description/index.html @@ -0,0 +1,548 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + + +

Quick RFQ from Products

+

Quick RFQ from Products list

+ + + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module helps you to create quick RFQ from Products + list.User can select multiple products from the Products + list and create RFQ for the selected Products. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Added Create RFQ option inside Action button of Products Variants list +
+
+ + Configure Vendor, Sales man and Order lines from wizard. +
+
+ + Create RFQ or Create and view RFQ +
+
+ + Created RFQ with selected Products +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Product Variants

+

Option to create RFQ inside action button from Products Variants List.

+ +
+ +
+

Configure RFQ

+

Configure RFQ filed values from the Wizard.

+ +
+ +
+

Create RFQ and Create and View RFQ

+

Two options for RFQ creation.

+ +
+ +
+

Create and View RFQ

+

Shows the created RFQ form.

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

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/quick_rfq/views/product_product_views.xml b/quick_rfq/views/product_product_views.xml new file mode 100644 index 000000000..99630c09f --- /dev/null +++ b/quick_rfq/views/product_product_views.xml @@ -0,0 +1,16 @@ + + + + + Create RFQ + + + + list + code + + if records: + action = records.action_create_rfq() + + + \ No newline at end of file diff --git a/quick_rfq/wizard/__init__.py b/quick_rfq/wizard/__init__.py new file mode 100644 index 000000000..f4ae54609 --- /dev/null +++ b/quick_rfq/wizard/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sagarika B (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. +# +############################################################################### +from . import product_rfq diff --git a/quick_rfq/wizard/product_rfq.py b/quick_rfq/wizard/product_rfq.py new file mode 100644 index 000000000..40be38a30 --- /dev/null +++ b/quick_rfq/wizard/product_rfq.py @@ -0,0 +1,105 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sagarika B (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. +# +############################################################################### +from odoo import fields, models, _ +from odoo.exceptions import UserError + + +class ProductRFQ(models.TransientModel): + """model product.rfq""" + _name = 'product.rfq' + _description = 'Product RFQ' + _rec_name = 'user_id' + + user_id = fields.Many2one('res.users', string="Sales Person", required=True, + default=lambda self: self.env.user, + help="Sales Person for RFQ") + partner_id = fields.Many2one('res.partner', string="Vendor", + help="Vendor for RFQ") + company_id = fields.Many2one('res.company', string="Company", + default=lambda self: self.env.company) + date_order = fields.Datetime('Order Deadline', required=True, + default=fields.Datetime.now, + help="Depicts the date within which the " + "Quotation should be confirmed and " + "converted into a purchase order.") + currency_id = fields.Many2one('res.currency', + related='company_id.currency_id') + rfq_line_ids = fields.One2many('product.rfq.line', 'product_rfq_id', + string="Product Lines", required=True) + + def action_create_view_rfq(self): + """method to create rfq return the rfq""" + if not self.partner_id: + raise UserError(_('Please Select a Customer')) + lines = [] + for line in self.rfq_line_ids: + lines.append((0, 0, { + 'product_id': line.product_id.id, + 'product_qty': line.product_qty, + 'price_unit': line.price_unit, + })) + rfq = self.env['purchase.order'].create({ + 'partner_id': self.partner_id.id, + 'user_id': self.user_id.id, + 'date_order': self.date_order, + 'order_line': lines + }) + return { + 'view_mode': 'form', + 'res_model': 'purchase.order', + 'res_id': rfq.id, + 'type': 'ir.actions.act_window', + 'target': 'current', + } + + def action_create_rfq(self): + """method to create rfq""" + if not self.partner_id: + raise UserError(_('Please Select a Customer')) + lines = [] + for line in self.rfq_line_ids: + lines.append((0, 0, { + 'product_id': line.product_id.id, + 'product_qty': line.product_qty, + 'price_unit': line.price_unit, + })) + self.env['purchase.order'].create({ + 'partner_id': self.partner_id.id, + 'user_id': self.user_id.id, + 'date_order': self.date_order, + 'order_line': lines + }) + + +class ProductRFQLine(models.TransientModel): + """model product.rfq.line""" + _name = 'product.rfq.line' + _description = 'Product RFQ Line' + + product_rfq_id = fields.Many2one('product.rfq', string="Product RFQ", + help="Parent Product RFQ") + product_id = fields.Many2one('product.product', string="Product", + help="Order line Product") + product_qty = fields.Float(string='Quantity', help="Order line Qty", + digits='Product Unit of Measure', required=True) + price_unit = fields.Float( + string='Unit Price', required=True, digits='Product Price', + help="Order line Unit price") diff --git a/quick_rfq/wizard/product_rfq_views.xml b/quick_rfq/wizard/product_rfq_views.xml new file mode 100644 index 000000000..17eab9314 --- /dev/null +++ b/quick_rfq/wizard/product_rfq_views.xml @@ -0,0 +1,41 @@ + + + + + product.rfq.form + product.rfq + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+