diff --git a/quick_rfq/README.rst b/quick_rfq/README.rst new file mode 100644 index 000000000..0932f8b5f --- /dev/null +++ b/quick_rfq/README.rst @@ -0,0 +1,41 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: Licence: 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: Yadhu krishnan, 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..751016199 --- /dev/null +++ b/quick_rfq/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Yadhukrishnan K (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..0d45e3c95 --- /dev/null +++ b/quick_rfq/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Yadhukrishnan K (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': '17.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': "https://www.cybrosys.com", + 'depends': ['base', 'purchase'], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_product_views.xml', + 'wizard/product_rfq_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..9ca252aa5 --- /dev/null +++ b/quick_rfq/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 12.04.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Quick RFQ from Products diff --git a/quick_rfq/models/__init__.py b/quick_rfq/models/__init__.py new file mode 100644 index 000000000..75ee10702 --- /dev/null +++ b/quick_rfq/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Yadhukrishnan K (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..e0ade3c7a --- /dev/null +++ b/quick_rfq/models/product_product.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Yadhukrishnan K (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 + """ + product_rfq = self.env['product.rfq'].create({ + 'rfq_line_ids': [(0, 0, { + 'product_id': product.id, + 'product_qty': 1.0, + 'price_unit': product.standard_price, + }) for product in self] + }) + return { + 'view_mode': 'form', + 'res_model': 'product.rfq', + 'res_id': product_rfq.id, + 'view_id': self.env.ref( + 'quick_rfq.product_rfq_view_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/Cybrosys R.png b/quick_rfq/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/quick_rfq/static/description/assets/misc/Cybrosys R.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..1673b1a4a 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..806fdcad7 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..691a0f6a3 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..c41649c93 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..d6b30d812 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..c7f0699f5 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..54c6cd0bc 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..fc7e09220 --- /dev/null +++ b/quick_rfq/static/description/index.html @@ -0,0 +1,716 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Quick RFQ from Products

+

+ This module helps to manage the Quick RFQ from Products list

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ 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

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

+ 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

+
+
+ +
+
+
+
+
+
+
    +
  • + 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 +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:30th Nov 2024 +
+

+ Initial Commit for Employee Attendance Xlsx Report

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + 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..278818d51 --- /dev/null +++ b/quick_rfq/wizard/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Yadhukrishnan K (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..4604b8479 --- /dev/null +++ b/quick_rfq/wizard/product_rfq.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Yadhukrishnan K (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')) + 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': [(0, 0, { + 'product_id': line.product_id.id, + 'product_qty': line.product_qty, + 'price_unit': line.price_unit, + }) for line in self.rfq_line_ids] + }) + 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')) + self.env['purchase.order'].create({ + 'partner_id': self.partner_id.id, + 'user_id': self.user_id.id, + 'date_order': self.date_order, + 'order_line': [(0, 0, { + 'product_id': line.product_id.id, + 'product_qty': line.product_qty, + 'price_unit': line.price_unit, + }) for line in self.rfq_line_ids] + }) + + +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..0b4b09d82 --- /dev/null +++ b/quick_rfq/wizard/product_rfq_views.xml @@ -0,0 +1,41 @@ + + + + + product.rfq.view.form + product.rfq + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+