@ -0,0 +1,48 @@ |
|||
.. 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 for multiple products from Products list. |
|||
|
|||
Configuration |
|||
============= |
|||
* No additional configuration is needed. |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
Affero General Public License, v3.0 (AGPL v3). |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Credits |
|||
------- |
|||
* Developers: (V17) Yadhu krishnan, |
|||
(V18) Aysha Shalin, |
|||
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 <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Aysha Shalin (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
from . import models |
|||
from . import wizard |
@ -0,0 +1,45 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Aysha Shalin (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
{ |
|||
'name': 'Quick RFQ from Products', |
|||
'version': '18.0.1.0.0', |
|||
'category': 'Purchases', |
|||
'summary': """Create quick RFQ from Products list.""", |
|||
'description': """This module helps you to create quick RFQ from Products |
|||
list. Users can select multiple products from the Products list and create |
|||
RFQ for the selected Products.""", |
|||
'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.png'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,6 @@ |
|||
## Module <quick_rfq> |
|||
|
|||
#### 03.09.2024 |
|||
#### Version 18.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Quick RFQ from Products |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Aysha Shalin (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
from . import product_product |
@ -0,0 +1,47 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Aysha Shalin (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
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', |
|||
} |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 738 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 912 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 177 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<odoo> |
|||
<!-- Server action for rfq creation --> |
|||
<record id="action_product_rfq" model="ir.actions.server"> |
|||
<field name="name">Create RFQ</field> |
|||
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/> |
|||
<field name="model_id" ref="product.model_product_product"/> |
|||
<field name="binding_model_id" ref="product.model_product_product"/> |
|||
<field name="binding_view_types">list</field> |
|||
<field name="state">code</field> |
|||
<field name="code"> |
|||
if records: |
|||
action = records.action_create_rfq() |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Aysha Shalin (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
from . import product_rfq |
@ -0,0 +1,100 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Aysha Shalin (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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################### |
|||
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") |
@ -0,0 +1,41 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product rfq wizard form view --> |
|||
<record id="product_rfq_view_form" model="ir.ui.view"> |
|||
<field name="name">product.rfq.view.form</field> |
|||
<field name="model">product.rfq</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<sheet> |
|||
<group> |
|||
<group> |
|||
<field name="partner_id"/> |
|||
<field name="date_order"/> |
|||
</group> |
|||
<group> |
|||
<field name="user_id"/> |
|||
<field name="company_id"/> |
|||
</group> |
|||
</group> |
|||
<notebook> |
|||
<page string="Products"> |
|||
<field name="rfq_line_ids"> |
|||
<list editable="bottom"> |
|||
<field name="product_rfq_id" invisible="1"/> |
|||
<field name="product_id"/> |
|||
<field name="product_qty"/> |
|||
<field name="price_unit"/> |
|||
</list> |
|||
</field> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
<footer> |
|||
<button string="Create RFQ" class="btn btn-primary" type="object" name="action_create_rfq" data-hotkey="q"/> |
|||
<button string="Create and View RFQ" class="btn btn-primary" type="object" name="action_create_view_rfq" data-hotkey="w"/> |
|||
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |