diff --git a/multi_vendor_marketplace/README.rst b/multi_vendor_marketplace/README.rst new file mode 100755 index 000000000..c8713fd5f --- /dev/null +++ b/multi_vendor_marketplace/README.rst @@ -0,0 +1,48 @@ +.. image:: image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Odoo Multi Vendor Marketplace +=============================== +This Module Create your own marketplace and facilitate the exchange of buyers and sellers + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Lesser General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developers: (V16) Gokul P I, + Farha V C, + Sreeshanth V S, 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/multi_vendor_marketplace/__init__.py b/multi_vendor_marketplace/__init__.py new file mode 100755 index 000000000..6f0fc3ce5 --- /dev/null +++ b/multi_vendor_marketplace/__init__.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import controller +from . import models +from . import wizard + +from odoo import api, SUPERUSER_ID + +@api.model +def test_pre_init_hook(cr): + """For hiding some menus after login a seller user""" + env = api.Environment(cr, SUPERUSER_ID, {}) + res = env.ref('stock.menu_stock_root') + res1 = env.ref('stock.group_stock_user') + res.write({'groups_id': [(3, res1.id, 0)]}) diff --git a/multi_vendor_marketplace/__manifest__.py b/multi_vendor_marketplace/__manifest__.py new file mode 100755 index 000000000..2323bc92b --- /dev/null +++ b/multi_vendor_marketplace/__manifest__.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Odoo Multi Vendor Marketplace", + 'version': "16.0.1.0.0", + 'category': 'eCommerce,Sales ,Warehouse', + 'summary': 'Odoo Multi Vendor Marketplace, Odoo16, Multi Vendor', + 'description': 'The Multi-Vendor Marketplace module in Odoo enables ' + 'businesses to establish an online platform where multiple' + 'vendors can offer their products or services to customers.' + 'Vendors can manage their own profiles, products, and ' + 'orders, while the admin can set commission rates, manage ' + 'payments, maintain quality control. The module provides' + 'customization options, and user-friendly interfaces for a ' + 'seamless marketplace experience. ', + 'author': 'Cybrosys Techno solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'sale_management', 'account', 'website', 'stock', + 'website_sale'], + 'data': [ + 'security/multi_vendor_marketplace_groups.xml', + 'security/inventory_request_security.xml', + 'security/product_template_security.xml', + 'security/sale_order_line_security.xml', + 'security/seller_payment_security.xml', + 'security/seller_shop_security.xml', + 'security/stock_picking_security.xml', + 'security/ir.model.access.csv', + 'data/res_users_data.xml', + 'data/ir_config_parameter_data.xml', + 'data/social_media_data.xml', + 'data/account_journal_data.xml', + 'data/product_template_data.xml', + 'data/email_template_data.xml', + 'data/website_menu_data.xml', + 'views/vendor_dashboard_views.xml', + 'views/stock_moves_views.xml', + 'views/sell_page_templates.xml', + 'views/res_partner_views.xml', + 'views/seller_payment_views.xml', + 'views/request_payment_views.xml', + 'views/multi_vendor_pricelist_views.xml', + 'views/product_product_views.xml', + 'views/product_template_views.xml', + 'views/seller_shop_views.xml', + 'views/res_config_settings_views.xml', + 'views/seller_review_views.xml', + 'views/helpful_info_views.xml', + 'views/product_public_category_views.xml', + 'views/account_payment_method_views.xml', + 'views/stock_picking_views.xml', + 'views/inventory_request_views.xml', + 'views/seller_recommend_views.xml', + 'views/social_media_views.xml', + 'views/seller_web_templates.xml', + 'views/seller_product_templates.xml', + 'views/sale_order_line_views.xml', + 'views/multi_vendor_marketplace_menus.xml', + 'views/seller_shop_information_templates.xml', + 'views/seller_list_templates.xml', + 'wizard/settings_view_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'multi_vendor_marketplace/static/src/xml/saller_dashboard.xml', + 'multi_vendor_marketplace/static/src/js/seller_dashboard_action.js', + ], + 'web.assets_frontend': [ + 'multi_vendor_marketplace/static/src/js/rating.js', + 'multi_vendor_marketplace/static/src/scss/partner_rating.css', + 'https://unpkg.com/sweetalert/dist/sweetalert.min.js', + ], + }, + 'images': [ + 'static/description/banner.png', + ], + 'license': 'LGPL-3', + 'installable': True, + 'application': True, + 'auto install': False, + 'pre_init_hook': 'test_pre_init_hook', +} diff --git a/multi_vendor_marketplace/controller/__init__.py b/multi_vendor_marketplace/controller/__init__.py new file mode 100755 index 000000000..09c664d45 --- /dev/null +++ b/multi_vendor_marketplace/controller/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import seller_dashboard +from . import seller_signup diff --git a/multi_vendor_marketplace/controller/seller_dashboard.py b/multi_vendor_marketplace/controller/seller_dashboard.py new file mode 100755 index 000000000..51faaad94 --- /dev/null +++ b/multi_vendor_marketplace/controller/seller_dashboard.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import http +from odoo.http import request + + +class SellerDashboard(http.Controller): + """This Class for creating dashboard""" + + @http.route(['/seller_dashboard'], type='json', auth="public", + website=True) + def seller_dashboard(self): + """Load the dashboard information""" + return {'pending': request.env['product.template'].search_count( + [('state', '=', 'pending')]), + 'approved': request.env['product.template'].search_count( + [('state', '=', 'approved')]), + 'rejected': request.env['product.template'].search_count( + [('state', '=', 'rejected')]), + 'user_type': request.env['res.users'].has_group( + 'multi_vendor_marketplace.multi_vendor_marketplace_admin'), + 'seller_pending': request.env['res.partner'].search_count( + [('state', '=', 'Pending for Approval')]), + 'seller_approved': request.env['res.partner'].search_count( + [('state', '=', 'Approved')]), + 'seller_rejected': request.env['res.partner'].search_count( + [('state', '=', 'Denied')]), + 'inventory_pending': request.env['inventory.request'].search_count( + [('state', '=', 'Requested')]), + 'inventory_approved': request.env[ + 'inventory.request'].search_count( + [('state', '=', 'Approved')]), + 'inventory_rejected': request.env[ + 'inventory.request'].search_count( + [('state', '=', 'Rejected')]), + 'payment_pending': request.env['seller.payment'].search_count( + [('state', '=', 'Requested')]), + 'payment_approved': request.env['seller.payment'].search_count( + [('state', '=', 'Validated')]), + 'payment_rejected': request.env['seller.payment'].search_count( + [('state', '=', 'Rejected')]), + 'order_pending': request.env['sale.order.line'].search_count( + [('state', '=', 'pending')]), + 'order_approved': request.env['sale.order.line'].search_count( + [('state', '=', 'approved')]), + 'order_shipped': request.env['sale.order.line'].search_count( + [('state', '=', 'shipped')]), + 'order_cancel': request.env['sale.order.line'].search_count( + [('state', '=', 'cancel')]), + 'sale_order_kanban_id': request.env['ir.ui.view'].search( + [('name', '=', 'multi.vendor.sale.order.line.kanban')]).id, + 'product_kanban_id': request.env['ir.ui.view'].search( + [('name', '=', 'multi.vendor.view.kanban')]).id, + 'sale_order_form_id': request.env['ir.ui.view'].search( + [( + 'name', '=', + 'multi.vendor.sale.order.line.form.readonly')]).id + } diff --git a/multi_vendor_marketplace/controller/seller_signup.py b/multi_vendor_marketplace/controller/seller_signup.py new file mode 100755 index 000000000..3d7759bd1 --- /dev/null +++ b/multi_vendor_marketplace/controller/seller_signup.py @@ -0,0 +1,286 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import logging +import werkzeug +from werkzeug.urls import url_encode +from odoo import http, _ +from odoo.exceptions import UserError +from odoo.http import request +from odoo.addons.auth_signup.models.res_users import SignupError +from odoo.addons.auth_signup.controllers.main import AuthSignupHome +from odoo.addons.auth_signup.controllers.main import ensure_db, \ + LOGIN_SUCCESSFUL_PARAMS, SIGN_UP_REQUEST_PARAMS + +_logger = logging.getLogger(__name__) + +LOGIN_SUCCESSFUL_PARAMS.add('account_created') + + +class SellerSignup(AuthSignupHome): + """Class for sellers signup""" + + @http.route(['/seller/list'], type="http", auth="public", + website="True") + def seller_list(self): + """ Goto the Sellers List""" + return http.Response( + template='multi_vendor_marketplace.seller_list', + qcontext={ + 'seller': request.env['res.partner'].sudo().search( + [('state', '=', 'Approved'), ('is_published', '=', True)]) + }) + + @http.route(['/seller/profile/'], type="http", + auth="public", website="True") + def seller_profile(self, **kwargs): + """Goto The corresponding seller-shop Using Profile URl""" + user_obj = request.env['res.partner'].sudo().search( + [('profile_url_value', '=', kwargs.get('profile_url'))]) + recent_products = request.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.recent_products') + review_count = request.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.seller_review_count') + current_user = request.env.user.sudo() + review = request.env['seller.review'].sudo().search( + [('seller_id', '=', user_obj.id), ('state', '=', 'published')], + limit=int(review_count)) + product = request.env['product.template'].sudo().search( + [('seller_id', '=', user_obj.id), ('is_published', '=', True)]) + recently_add_product = request.env['product.template'].sudo().search( + [('seller_id', '=', user_obj.id), ('is_published', '=', True)], + limit=int(recent_products), + order='seller_id desc') + params = request.env['res.config.settings'].sudo().search( + [], order='create_date DESC', limit=1) + partner = request.env['res.partner'].sudo().browse(user_obj.id) + avg_rating = partner.avg_rating + total = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', partner.id)]) + if total != 0: + five = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', partner.id), ('rating', '=', '5')]) + four = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', partner.id), ('rating', '=', '4')]) + three = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', partner.id), ('rating', '=', '3')]) + two = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', partner.id), ('rating', '=', '2')]) + one = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', partner.id), ('rating', '=', '1')]) + five = round(five / total * 100) + four = round(four / total * 100) + three = round(three / total * 100) + two = round(two / total * 100) + one = round(one / total * 100) + else: + five = four = three = two = one = 0 + values = { + 'res_users': user_obj, + 'product': product, + 'recently_add_product': recently_add_product, + 'config': params, + 'cr_user': current_user, + 'avg': round(avg_rating, 2), + 'prod_count': request.env['product.template'].sudo().search_count( + [('seller_id', '=', user_obj.id), + ('is_published', '=', True)]), + 'sale_count': request.env['sale.order.line'].sudo().search_count( + [('seller_id', '=', user_obj.id)]), + 'average': avg_rating, + 'five': str(five), + 'four': str(four), + 'three': str(three), + 'two': str(two), + 'one': str(one), + 'review': review + } + response = http.Response( + template='multi_vendor_marketplace.seller_product', + qcontext=values) + return response.render() + + @http.route(['/sell'], type="http", auth="public", website="True") + def home_page(self, **post): + """Goto the sell menu and here we can see the seller registration + button """ + params = request.env['res.config.settings'].sudo().search( + [], order='create_date desc', limit=1) + values = { + 'config': params} + response = http.Response( + template='multi_vendor_marketplace.sell_page', + qcontext=values) + return response.render() + + @http.route(['/seller_shop'], type="http", auth="public", + website="True", csrf=False) + def seller_shop(self, seller_id=None, product_id=None, **kwargs): + """Goto the corresponding Seller shop""" + if product_id: + pr = request.env['product.product'].sudo().browse(int(product_id)) + user_obj = pr.seller_id + else: + pr = request.env['res.partner'].sudo().browse(int(seller_id)) + user_obj = pr + recent_products = request.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.recent_products') + review_count = request.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.seller_review_count') + current_user = request.env.user.sudo() + review = request.env['seller.review'].sudo().search( + [('seller_id', '=', user_obj.id), ('state', '=', 'published')], + limit=int(review_count)) + product = request.env['product.template'].sudo().search( + [('seller_id', '=', user_obj.id), ('is_published', '=', True)]) + recently_add_product = request.env['product.template'].sudo().search( + [('seller_id', '=', user_obj.id), ('is_published', '=', True)], + limit=int(recent_products), + order='seller_id desc') + params = request.env['res.config.settings'].sudo().search( + [], order='create_date DESC', limit=1) + res_partner = request.env['res.partner'].sudo().browse(user_obj.id) + avg_rating = res_partner.avg_rating + total = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', res_partner.id)]) + if total != 0: + five = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', res_partner.id), ('rating', '=', '5')]) + four = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', res_partner.id), ('rating', '=', '4')]) + three = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', res_partner.id), ('rating', '=', '3')]) + two = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', res_partner.id), ('rating', '=', '2')]) + one = request.env['seller.review'].sudo().search_count( + [('seller_id', '=', res_partner.id), ('rating', '=', '1')]) + five = round(five / total * 100) + four = round(four / total * 100) + three = round(three / total * 100) + two = round(two / total * 100) + one = round(one / total * 100) + else: + five = four = three = two = one = 0 + values = { + 'res_users': user_obj, + 'product': product, + 'recently_add_product': recently_add_product, + 'config': params, + 'cr_user': current_user, + 'avg': round(avg_rating, 2), + 'prod_count': request.env['product.template'].sudo().search_count( + [('seller_id', '=', user_obj.id), + ('is_published', '=', True)]), + 'sale_count': request.env['sale.order.line'].sudo().search_count( + [('seller_id', '=', user_obj.id)]), + 'average': avg_rating, + 'five': str(five), + 'four': str(four), + 'three': str(three), + 'two': str(two), + 'one': str(one), + 'review': review + } + response = http.Response( + template='multi_vendor_marketplace.seller_product', + qcontext=values) + return response.render() + + @http.route('/seller_reg', type='http', auth='public', website=True, + sitemap=False, csrf=False) + def seller_signup(self, *args, **kw): + """Seller Registration Form""" + qcontext = self.get_auth_signup_qcontext() + if not qcontext.get('token') and not qcontext.get('signup_enabled'): + raise werkzeug.exceptions.NotFound() + if 'error' not in qcontext and request.httprequest.method == 'POST': + if request.env["res.partner"].sudo().search( + [("profile_url_value", "=", kw.get("profile_url"))]): + qcontext["error"] = _( + "Another user has already registered using this Profile " + "url.") + else: + try: + profile_url = {'profile_url': 1} + qcontext.update(profile_url) + self.do_signup(qcontext) + base_url = request.env[ + 'ir.config_parameter'].sudo().get_param( + 'web.base.url') + request.env["res.partner"].sudo().search( + [('email', '=', kw.get('login'))]).write( + {'profile_url': base_url + "/seller/profile/" + kw.get( + 'profile_url'), + 'profile_url_value': kw.get('profile_url')}) + if qcontext.get('token'): + user = self.env['res.users'] + user_sudo = user.sudo().search( + user._get_login_domain(qcontext.get('login')), + order=user._get_login_order(), limit=1 + ) + template = request.env.ref( + 'auth_signup.mail_template_user_input_invite', + raise_if_not_found=False) + if user_sudo and template: + template.sudo().send_mail(user_sudo.id, + force_send=True) + return self.web_login(*args, **kw) + except UserError as e: + qcontext['error'] = e.args[0] + except (SignupError, AssertionError) as e: + if request.env["res.users"].sudo().search( + [("login", "=", qcontext.get("login"))]): + qcontext["error"] = _( + "Another user is already registered using this " + "email address.") + else: + _logger.error("%s", e) + qcontext['error'] = _( + "Could not create a new account.") + elif 'signup_email' in qcontext: + user = request.env['res.users'].sudo().search( + [('email', '=', qcontext.get('signup_email')), + ('state', '!=', 'new')], limit=1) + if user: + return request.redirect('/web/login?%s' % url_encode( + {'login': user.login, 'redirect': '/web'})) + response = request.render('multi_vendor_marketplace.mark', qcontext) + return response + + def _prepare_signup_values(self, qcontext): + """Super The _prepare_signup_values function to pass values not to + Override The Default Sign Up""" + values = {key: qcontext.get(key) for key in + ('login', 'name', 'password')} + if not values: + raise UserError(_("The form was not properly filled in.")) + if values.get('password') != qcontext.get('confirm_password'): + raise UserError( + _("Passwords do not match; please retype them.")) + supported_lang_codes = [code for code, _ in + request.env['res.lang'].get_installed()] + lang = request.context.get('lang', '') + if lang in supported_lang_codes: + values['lang'] = lang + values['profile_url'] = int( + qcontext.get('profile_url')) if qcontext.get( + 'profile_url') else 0 + return values diff --git a/multi_vendor_marketplace/data/account_journal_data.xml b/multi_vendor_marketplace/data/account_journal_data.xml new file mode 100755 index 000000000..833055182 --- /dev/null +++ b/multi_vendor_marketplace/data/account_journal_data.xml @@ -0,0 +1,10 @@ + + + + + Seller Payment + purchase + SLP + + \ No newline at end of file diff --git a/multi_vendor_marketplace/data/email_template_data.xml b/multi_vendor_marketplace/data/email_template_data.xml new file mode 100755 index 000000000..b8ed63a31 --- /dev/null +++ b/multi_vendor_marketplace/data/email_template_data.xml @@ -0,0 +1,200 @@ + + + + + New Seller Request- Admin mail + + + "{{ object.company_id.name }}" <{{ + (object.company_id.email or user.email) }}> + + {{object.company_id.email}} + New Seller request from {{ + ctx['seller']}} + + +

+ Dear Admin, +
+ A new seller + + has been requested. + Please Approve or Reject. +

+
+
+ + + New Seller Request- Seller mail + + + {{object.company_id.email}} + {{ctx['seller_mail']}} + Seller Request under progress + +

+ Dear Mr/Ms + + , +
+ You have requested for perform as a seller. Please + wait for + your approval. +

+
+
+ + + Seller Approve/Reject-Admin mail + + + {{object.company_id.email}} + {{object.company_id.email}} + Seller {{ object.name }} Status + +

+ Dear Admin, + +

+ New Seller + + has been approved by you +

+ + +

+ New Seller + + has been rejected by you +

+
+

+
+
+ + + Seller Approve/Reject- Seller mail + + + {{object.company_id.email}} + {{ object.email }} + Seller {{ object.name }} Status + + +

+ Dear Mr/Ms, +
+ Congrats..! You have been approved to work as a + new + seller. +

+
+ +

+ Dear Mr/Ms, +
+ Sorry, you have been rejected to work as a + seller. +

+
+
+
+ + + Product Approve/Reject - Admin mail + + + + {{object.company_id.email}} + {{object.company_id.email}} + New product {{ object.name }} from {{ + object.seller_id.name }} + + + +

+ Dear Admin, +
+ New Product + + request from + + has been approved by you. +

+
+ +

+ Dear Admin, +
+ New Product + + request from + + has been rejected by you. +

+
+ +
+
+ + + Product Approve/Reject - Seller mail + + + + {{object.company_id.email}} + {{ object.seller_id.email }} + Your new product {{ object.name }} + + + +

+ Dear Mr/Ms, +
+ Congrats..!! + Your new Product + + is approved for sale. +

+
+ +

+ Dear Mr/Ms, +
+ Sorry.. Your new Product + + is not approved for sale +

+
+
+
+ + + New Sale Order - Seller mail + + + {{object.company_id.email}} + {{ object.seller_id.email }} + SO {{ object.name }} created + +

+ Dear Mr/Ms, +
+ New Sale Order {{ object.name }} from your shop +

+
+
+
diff --git a/multi_vendor_marketplace/data/ir_config_parameter_data.xml b/multi_vendor_marketplace/data/ir_config_parameter_data.xml new file mode 100755 index 000000000..ec807a15f --- /dev/null +++ b/multi_vendor_marketplace/data/ir_config_parameter_data.xml @@ -0,0 +1,11 @@ + + + + + + multi_vendor_marketplace.template_seller_user + + + + diff --git a/multi_vendor_marketplace/data/product_template_data.xml b/multi_vendor_marketplace/data/product_template_data.xml new file mode 100644 index 000000000..483081a82 --- /dev/null +++ b/multi_vendor_marketplace/data/product_template_data.xml @@ -0,0 +1,10 @@ + + + + + seller payment + + consu + + diff --git a/multi_vendor_marketplace/data/res_users_data.xml b/multi_vendor_marketplace/data/res_users_data.xml new file mode 100644 index 000000000..8777dfd1c --- /dev/null +++ b/multi_vendor_marketplace/data/res_users_data.xml @@ -0,0 +1,14 @@ + + + + + Seller User Template + Seller Template + + + + diff --git a/multi_vendor_marketplace/data/social_media_data.xml b/multi_vendor_marketplace/data/social_media_data.xml new file mode 100755 index 000000000..11bd4be1c --- /dev/null +++ b/multi_vendor_marketplace/data/social_media_data.xml @@ -0,0 +1,33 @@ + + + + + Facebook + https://www.facebook.com/ + + + + Google+ + https://plus.google.com + + + + Twitter + https://twitter.com/ + + + + YouTube + https://youtube.com/user/ + + + + LinkedIn + https://linkedin.com/in/ + + + + Instagram + https://instagram.com/ + + diff --git a/multi_vendor_marketplace/data/website_menu_data.xml b/multi_vendor_marketplace/data/website_menu_data.xml new file mode 100755 index 000000000..b9ae6a171 --- /dev/null +++ b/multi_vendor_marketplace/data/website_menu_data.xml @@ -0,0 +1,10 @@ + + + + + Sell + /sell + + 10 + + diff --git a/multi_vendor_marketplace/doc/RELEASE_NOTES.md b/multi_vendor_marketplace/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..a027ec597 --- /dev/null +++ b/multi_vendor_marketplace/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 14.11.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Odoo Multi Vendor Marketplace diff --git a/multi_vendor_marketplace/models/__init__.py b/multi_vendor_marketplace/models/__init__.py new file mode 100755 index 000000000..fd2edddc6 --- /dev/null +++ b/multi_vendor_marketplace/models/__init__.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import helpful_info +from . import inventory_request +from . import multi_vendor_pricelist +from . import product_pricelist_item +from . import product_template +from . import res_config_settings +from . import res_partner +from . import request_payment +from . import res_users +from . import sale_order +from . import sale_order_line +from . import seller_payment +from . import seller_recommend +from . import seller_review +from . import social_media +from . import seller_shop +from . import stock_picking +from . import vendor_dashboard +from . import website +from . import website_menu diff --git a/multi_vendor_marketplace/models/helpful_info.py b/multi_vendor_marketplace/models/helpful_info.py new file mode 100644 index 000000000..e672b4bbc --- /dev/null +++ b/multi_vendor_marketplace/models/helpful_info.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class HelpfulInfo(models.Model): + """Class for helpful information """ + _name = 'helpful.info' + _description = "Help full Info" + customer_id = fields.Many2one('res.partner', string='Customer', + help='Customer') + msg = fields.Selection([('yes', 'Yes'), ('no', 'No')], + string='Was this review helpful?', + help='Message') + review_id = fields.Many2one('seller.review', string='Review', + help='Review') diff --git a/multi_vendor_marketplace/models/inventory_request.py b/multi_vendor_marketplace/models/inventory_request.py new file mode 100644 index 000000000..6df1d79d6 --- /dev/null +++ b/multi_vendor_marketplace/models/inventory_request.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class InventoryRequest(models.Model): + """Creating class inventoryRequest for requesting products""" + _name = 'inventory.request' + _description = "Inventory Request" + + name = fields.Char(string='Title', required=True, help='Name of the ' + 'request') + product_id = fields.Many2one('product.template', + string='Product', help='Product name', + required=True) + seller_id = fields.Many2one(related='product_id.seller_id', help='Seller', + string='Seller') + qty_new = fields.Integer(string='New quantity', + help='New quantity on hand', + required=True) + location_id = fields.Many2one('stock.location', + string='Location', help='Location', + required=True) + date = fields.Datetime(string='Created Date', help='Date', + default=fields.Datetime.today()) + note = fields.Text(string='Note', help='Note') + state = fields.Selection( + selection=[('Draft', 'Draft'), ('Requested', 'Requested'), + ('Approved', 'Approved'), ('Rejected', 'Rejected')], + string='Inventory Req Status', group_expand='_group_expand_states', + help="For adding state", default='Draft', track_visibility='always', + readonly=True) + + @api.onchange('name') + def _onchange_name(self): + """ Fetch location details from settings and search that id """ + id_in_location_frm_settings = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.seller_location_id') + id_in_location = self.env['stock.location'].browse(id_in_location_frm_settings) + self.location_id = id_in_location.id + + def _group_expand_states(self): + """Expands the selection options for the 'state' field in a group-by + operation.""" + return [key for key, val in type(self).state.selection] + + def approve_request(self): + """ Product request approve """ + self.state = 'Approved' + product_ids = self.env['product.template'].browse(self.product_id.id) + products_ids = self.env['product.product'].browse(product_ids.id) + product_ids.qty_available = product_ids.qty_available + self.qty_new + self.env['stock.quant'].with_context(inventory_mode=True).create( + [{'product_id': products_ids.id, + 'inventory_quantity': product_ids.qty_available, + 'location_id': self.location_id.id, + }]).action_apply_inventory() + + def reject_request(self): + """ Reject seller new product """ + self.state = 'Rejected' + + def request(self): + """ Used in seller for request to approve new product for selling """ + if self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.quantity_approval'): + self.approve_request() + else: + self.state = 'Requested' diff --git a/multi_vendor_marketplace/models/multi_vendor_pricelist.py b/multi_vendor_marketplace/models/multi_vendor_pricelist.py new file mode 100644 index 000000000..82eab0624 --- /dev/null +++ b/multi_vendor_marketplace/models/multi_vendor_pricelist.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class MultiVendorPriceList(models.Model): + """Create a new class MultiVendorPriceList for vendor price-list.""" + _name = 'multi.vendor.pricelist' + _description = "Multi vendor pricelist" + + price_list_id = fields.Many2one('product.pricelist', + string='Price list', help='Price list') + price_of_pricelist = fields.Float(required=True, String='Price', + help='Price') + min_qty = fields.Integer(required=True, string='Minimum quantity', + help='Minimum quantity') + start_date = fields.Date(required=True, string='Start Date', + help='Start Date') + end_date = fields.Date(required=True, string='Start Date', + help='Start Date') + product_inv_id = fields.Many2one('product.template', + string='Product', help='Product', + ondelete='cascade') + + @api.ondelete(at_uninstall=False) + def delete_pricelist(self): + """ PRICE-LIST LINE DELETE FROM PRODUCT FORM VIEW AND + PRICE-LIST-VIEW """ + query = """delete from product_pricelist_item where + pricelist_multivendor_id = %s """ % self.id + self.env.cr.execute(query) diff --git a/multi_vendor_marketplace/models/product_pricelist_item.py b/multi_vendor_marketplace/models/product_pricelist_item.py new file mode 100644 index 000000000..5318b491e --- /dev/null +++ b/multi_vendor_marketplace/models/product_pricelist_item.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, models, fields + + +class ProductPricelistItem(models.Model): + """For deleting price-list items""" + _inherit = 'product.pricelist.item' + + pricelist_multivendor_id = fields.Many2one( + 'multi.vendor.pricelist', + string='Price list Item', + help='Price list items') + + @api.ondelete(at_uninstall=False) + def delete_pricelist(self): + """ PRICE-LIST LINE DELETE FROM PRODUCT FORM VIEW AND PRICE-LISTVIEW + TRIGGER FROM PRICE-LIST VIEW """ + query = (""" delete from multi_vendor_price-list where id = %s """ % + self.pricelist_multivendor_id.id) + self.env.cr.execute(query) diff --git a/multi_vendor_marketplace/models/product_template.py b/multi_vendor_marketplace/models/product_template.py new file mode 100755 index 000000000..6b95b69c7 --- /dev/null +++ b/multi_vendor_marketplace/models/product_template.py @@ -0,0 +1,184 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class ProductTemplate(models.Model): + """Inheriting ProductTemplate For adding new fields and Functions""" + _inherit = "product.template" + + website_category_id = fields.Many2one('product.public.category', + string='Website category', + help='Website category') + cmpy_email = fields.Text( + default=lambda self: self.env.user.company_id.email, + string='Company email', + help='Company address') + seller_id = fields.Many2one( + 'res.partner', string='Seller', + help='Seller', + default=lambda self: self.env.user.partner_id.id, + domain=[('state', '=', 'Approved')]) + seller_pic = fields.Binary(related='seller_id.image_1920', + string='Seller image', help='Seller image') + web = fields.Many2one("website", string="Website", + help='Website') + alt_pro_id = fields.Many2one("product.template", + string="Alternative Products", + help='Alternative Products') + acc_pro_id = fields.Many2one("product.template", + string="Accessory Products", + help='Accessory products') + forcasted_qty = fields.Integer(string='Forcasted quantity', + help='Forcasted quantity') + initial_qty = fields.Integer(string='Initial quantity', + help='Initial quantity') + state = fields.Selection( + [('draft', 'Draft'), ('pending', 'pending'), + ('approved', 'Approved'), ('rejected', 'Rejected')], + string='Product Status', group_expand='_group_expand_states', + default='draft', help='Product Status', track_visibility='always', + readonly=True) + item_ids = fields.One2many('multi.vendor.pricelist', + 'product_inv_id', string='Items', + help='Items') + product_price_setting = fields.Boolean(string='Product price setting', + help='Product price setting') + product_variants_setting = fields.Boolean(string='Product variants ' + 'settings', + help='Product variants settings') + product_uom = fields.Boolean(string='Product uom', help='Product uom') + + def _create(self, data_list): + """Supering the create function to change category """ + res = super(ProductTemplate, self)._create(data_list) + self.categ_id = [self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.internal_categ_id')] + return res + + def write(self, vals): + """ Pricelist Creation from Product form view """ + res = super(ProductTemplate, self).write(vals) + for wdata in self.item_ids: + data_module = self.env['product.pricelist.item'].search( + [('pricelist_id', '=', wdata.price_list_id.id)]) + if data_module: + dictionary = {} + dictionary.clear() + for data in data_module: + dictionary[data.pricelist_multivendor_id.id] = data + if wdata._origin.id in dictionary.keys(): + dictionary[wdata._origin.id].update({ + 'product_tmpl_id': self._origin.id, + 'min_quantity': wdata.min_qty, + 'fixed_price': wdata.price_of_pricelist, + 'date_start': wdata.start_date, + 'date_end': wdata.end_date, + }) + else: + wdata.price_list_id.write({'item_ids': [(0, 0, { + 'product_tmpl_id': self._origin.id, + 'min_quantity': wdata.min_qty, + 'fixed_price': wdata.price_of_pricelist, + 'date_start': wdata.start_date, + 'date_end': wdata.end_date, + 'pricelist_multivendor_id': wdata._origin.id + })]}) + else: + wdata.price_list_id.write({'item_ids': [(0, 0, { + 'product_tmpl_id': self._origin.id, + 'min_quantity': wdata.min_qty, + 'fixed_price': wdata.price_of_pricelist, + 'date_start': wdata.start_date, + 'date_end': wdata.end_date, + 'pricelist_multivendor_id': wdata._origin.id + })]}) + return res + + def send_product_status_mail(self): + """For sending product status mail""" + params = self.env[ + 'res.config.settings'].search([], + order='create_date desc', limit=1) + product_approve_admin_mail = params.product_approve_admin_mail + product_approve_seller_mail = params.product_approve_seller_mail + if product_approve_admin_mail: + name = params.product_approve_admin_mail_template_id.name + template = self.env['mail.template'].sudo().search( + [('name', '=', name)], limit=1) + self.env['mail.template'].browse(template.id).send_mail( + self.id, force_send=True) + if product_approve_seller_mail: + name = params.product_approve_seller_mail_template_id.name + template = self.env['mail.template'].sudo().search( + [('name', '=', name)], limit=1) + self.env['mail.template'].browse( + template.id).send_mail(self.id, force_send=True) + + def change_state_approved(self): + """ Change product state to Approved when Admin approved """ + self.state = 'approved' + self.send_product_status_mail() + self.product_price_setting = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.product_pricing') + self.product_variants_setting = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.product_variants') + self.product_uom = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.uom') + + @api.onchange('name') + def _onchange_name(self): + """Automatically updates the product's internal category when the + product name is changed.""" + internal_category = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.internal_categ_id') + self.categ_id = self.env['product.category'].browse( + internal_category).id + + def change_state_pending(self): + """ CHANGE PRODUCT TO PENDING STATE WHEN USER SEND REQUEST FOR + PRODUCT """ + if self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.product_approval'): + self.state = 'approved' + self.sudo().send_product_status_mail() + else: + self.state = 'pending' + self.sudo().send_product_status_mail() + + def change_state_reject(self): + """ WHEN ADMIN REJECT THE PRODUCT REQUEST STATE CHANGE TO REJECTED """ + self.state = 'rejected' + self.send_product_status_mail() + + def toggle_website_published(self): + """ PUBLISH THE PRODUCT IN WEBSITE """ + self.is_published = not self.is_published + + + def _group_expand_states(self): + """Expands the selection options for the 'state' field in a group-by + operation.""" + return [key for key, val in type(self).state.selection] diff --git a/multi_vendor_marketplace/models/request_payment.py b/multi_vendor_marketplace/models/request_payment.py new file mode 100644 index 000000000..05a5b9efb --- /dev/null +++ b/multi_vendor_marketplace/models/request_payment.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class RequestPayment(models.Model): + """Create a RequestPayment class for request for payment""" + _name = 'request.payment' + + seller_id = fields.Many2one('res.partner', string='Seller', + required=True, help='Seller', default=lambda + self: self.env.user.partner_id.id) + cashable_amount = fields.Float(string='Commission', help='Commission', + readonlt=True) + request_amount = fields.Float(string='Requested Payment Amount', + help='Requested Amount', required=True) + payment_description = fields.Text(string='Payment Description', + help='Payment Description', + required=True) + + @api.onchange('seller_id') + def onchange_seller(self): + """ Display commission in seller profile tab """ + partner_id = self.env['res.partner'].browse(self.seller_id.id) + self.cashable_amount = partner_id.commission + + def request_payment(self): + """ Request payment """ + amount_limit = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.amt_limit') + min_gap = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.min_gap') + partner_id = self.env['res.partner'].search( + [('id', '=', self.seller_id.id)]) + today_date = fields.Date.today() + mingap_date = fields.Date.subtract(today_date, days=int(min_gap)) + date_info_record = self.env['seller.payment'].search( + [('seller_id', '=', self.seller_id.id), + ('state', '=', 'Validated'), ('date', '>=', mingap_date)], + order='date DESC') + for checkdate in date_info_record: + if (self.request_amount > partner_id.total_commission or + self.request_amount > int(amount_limit) or + checkdate.date >= mingap_date): + raise ValidationError( + _("Entered amount is greater than your commission or " + "Amount limit is " + amount_limit + " and Minimum gap " + "for next payment " + "request " + + min_gap + " days")) + break + self.env['seller.payment'].create({ + 'seller_id': self.seller_id.id, + 'payment_mode': 'Cash', + 'commission': partner_id.commission, + 'payable_amount': self.request_amount, + 'date': fields.Date.today(), + 'type_id': 1, + 'memo': self.payment_description, + 'state': 'Requested', + }) diff --git a/multi_vendor_marketplace/models/res_config_settings.py b/multi_vendor_marketplace/models/res_config_settings.py new file mode 100755 index 000000000..d4393c1f7 --- /dev/null +++ b/multi_vendor_marketplace/models/res_config_settings.py @@ -0,0 +1,290 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + """Inheriting ResConfigSettings to add fields and functions""" + _inherit = 'res.config.settings' + + seller_approval = fields.Boolean( + string='Seller Approval', + help='Seller Approval', + config_parameter='multi_vendor_marketplace.seller_approval') + quantity_approval = fields.Boolean( + string='Quantity Approval', + help='Quantity Approval', + config_parameter='multi_vendor_marketplace.quantity_approval') + product_approval = fields.Boolean( + string='Product Approval', + help='Product Approval', + config_parameter='multi_vendor_marketplace.product_approval') + internal_categ_id = fields.Many2one( + 'product.category', + required=True, + string='Internal category', + help='Internal category', + config_parameter='multi_vendor_marketplace.internal_categ_id', + default=lambda self: self.env.ref( + 'product.product_category_all')) + product_variants = fields.Boolean( + string='Product variants', + help='Product variants', + config_parameter='multi_vendor_marketplace.product_variants') + + @api.onchange('product_variants') + def _onchange_product_variants(self): + """Changing the product variants settings""" + for data in self.env['product.template'].search([]): + data.product_variants_setting = self.product_variants + product_pricing = fields.Boolean( + string='Product Price', + help='Product Price', + config_parameter='multi_vendor_marketplace.product_pricing') + + @api.onchange('product_pricing') + def _onchange_product_pricing(self): + """Changing the product price settings""" + for data in self.env['product.template'].search([]): + data.product_price_setting = self.product_pricing + uom = fields.Boolean(string='UOM', help='Units of Measurement', + config_parameter='multi_vendor_marketplace.uom') + + @api.onchange('uom') + def _onchange_uom(self): + """Changing product uom""" + for data in self.env['product.template'].search([]): + data.product_uom = self.uom + seller_location_id = fields.Many2one( + 'stock.location', + string='Location', required=True, + help='Location', + config_parameter='multi_vendor_marketplace.seller_location_id', + default=lambda self: self.env.ref( + 'stock.stock_location_stock')) + seller_warehouse_id = fields.Many2one( + 'stock.warehouse', + string='Warehouse', help='Warehouse', + required=True, + config_parameter='multi_vendor_marketplace.seller_warehouse_id', + default=lambda self: self.env.ref( + 'stock.warehouse0')) + seller_shop = fields.Boolean( + string='Seller shop', help='Seller shop', + config_parameter='multi_vendor_marketplace.seller_shop') + commission = fields.Float( + string='Seller shop', help='Seller shop', + default=2, + config_parameter='multi_vendor_marketplace.commission') + currency = fields.Many2one( + 'res.currency', + string='Marketplace Currency', + help='Marketplace Currency', + config_parameter='multi_vendor_marketplace.currency', + required=True, default=lambda self: self.env.company.currency_id) + amt_limit = fields.Integer( + string='Amount limit', help='Amount limit', + config_parameter='multi_vendor_marketplace.amt_limit') + min_gap = fields.Integer( + string='Minimum Gap', help='Minimum Gap', + config_parameter='multi_vendor_marketplace.min_gap', + default='2') + pay_journal = fields.Many2one( + 'account.journal', + string='Seller Payment Journal', + help='Seller Payment Journal', + config_parameter='multi_vendor_marketplace.pay_journal', + default=lambda self: self.env.ref( + 'multi_vendor_marketplace.seller_payment_journal_creation')) + pay_product = fields.Many2one( + 'product.product', + string='Payment Product', + help='Payment Product', + config_parameter='multi_vendor_marketplace.pay_product', + default=lambda self: self.env.ref( + 'multi_vendor_marketplace.seller_payment_product_creation')) + seller_request_admin_mail = fields.Boolean( + string='Mail notification', + help='Enable notification for ' + 'Admin', + config_parameter='multi_vendor_marketplace.seller_request_admin_mail') + seller_request_admin_mail_template_id = fields.Many2one( + 'mail.template', + string='Email Template', + help='Email Template', + config_parameter= + 'multi_vendor_marketplace.seller_request_admin_mail_template_id', + default=lambda self: self.env['ir.model.data']._xmlid_to_res_id( + 'multi_vendor_marketplace.seller_request_admin_mail_template'), + required=True) + seller_request_seller_mail = fields.Boolean( + string='Seller notification', help='Enable notification for Seller', + config_parameter='multi_vendor_marketplace.seller_request_seller_mail') + seller_request_seller_mail_template_id = fields.Many2one( + 'mail.template', + string='Email Template', + help='Email template', + config_parameter= + 'multi_vendor_marketplace.seller_request_seller_mail_template_id', + default=lambda self: self.env['ir.model.data']._xmlid_to_res_id( + 'multi_vendor_marketplace.seller_request_seller_mail_template'), + required=True, ) + seller_approve_admin_mail = fields.Boolean( + string='Admin notification', + help='Enable notification for Admin', + config_parameter='multi_vendor_marketplace.seller_approve_admin_mail') + seller_approve_admin_mail_template_id = fields.Many2one( + 'mail.template', + string='Email Template', help='Email template', + config_parameter= + 'multi_vendor_marketplace.seller_approve_admin_mail_template_id', + default=lambda self: self.env['ir.model.data']._xmlid_to_res_id( + 'multi_vendor_marketplace.seller_state_admin_mail_template'), + required=True) + seller_approve_seller_mail = fields.Boolean( + 'Enable notification for Seller', + config_parameter='multi_vendor_marketplace.seller_approve_seller_mail') + seller_approve_seller_mail_template_id = fields.Many2one( + 'mail.template', string='Email Template', + help='Email Template', + config_parameter= + 'multi_vendor_marketplace.seller_approve_seller_mail_template_id', + default=lambda self: self.env['ir.model.data']._xmlid_to_res_id( + 'multi_vendor_marketplace.seller_state_seller_mail_template'), + required=True) + product_approve_admin_mail = fields.Boolean( + string='Admin Notification', help='Enable notification for Admin', + config_parameter='multi_vendor_marketplace.product_approve_admin_mail') + product_approve_admin_mail_template_id = fields.Many2one( + 'mail.template', 'Email Template', + config_parameter= + 'multi_vendor_marketplace.product_approve_admin_mail_template_id', + default=lambda self: self.env['ir.model.data']._xmlid_to_res_id( + 'multi_vendor_marketplace.product_state_admin_mail_template'), + required=True) + product_approve_seller_mail = fields.Boolean( + 'Enable notification for Seller', + config_parameter='multi_vendor_marketplace.product_approve_seller_mail') + product_approve_seller_mail_template_id = fields.Many2one( + 'mail.template', 'Email Template', + config_parameter= + 'multi_vendor_marketplace.product_approve_seller_mail_template_id', + default=lambda self: self.env['ir.model.data']._xmlid_to_res_id( + 'multi_vendor_marketplace.product_state_seller_mail_template'), + required=True) + new_order_seller_mail = fields.Boolean( + 'Enable notification for Seller', + config_parameter='multi_vendor_marketplace.new_order_admin_mail') + new_order_seller_mail_template_id = fields.Many2one( + 'mail.template', 'Email Template', + config_parameter= + 'multi_vendor_marketplace.new_order_admin_mail_template_id', + default=lambda self: self.env['ir.model.data']._xmlid_to_res_id( + 'multi_vendor_marketplace.new_order_seller_mail_template'), + required=True) + prod_count = fields.Boolean('Product Count', + config_parameter= + 'multi_vendor_marketplace.prod_count') + sale_count = fields.Boolean( + config_parameter='multi_vendor_marketplace.sale_count') + seller_addr = fields.Boolean('Seller Address', + config_parameter= + 'multi_vendor_marketplace.seller_addr') + seller_since = fields.Boolean( + config_parameter='multi_vendor_marketplace.seller_since') + ret_policy = fields.Boolean('Return Policy', + config_parameter= + 'multi_vendor_marketplace.ret_policy') + ship_policy = fields.Boolean('Shipping Policy', + config_parameter= + 'multi_vendor_marketplace.ship_policy') + shop_tnc = fields.Boolean('Seller Shop Terms & Conditions', + config_parameter= + 'multi_vendor_marketplace.shop_tnc') + contact_seller_button = fields.Boolean( + 'Contact Seller Button', + config_parameter='multi_vendor_marketplace.contact_seller_button') + bcome_seller = fields.Boolean('Become a Seller Button', + config_parameter= + 'multi_vendor_marketplace.bcome_seller') + recent_products = fields.Integer('Recently Added Products', + config_parameter= + 'multi_vendor_marketplace.recent_products') + show_seller_review = fields.Boolean( + config_parameter= + 'multi_vendor_marketplace.show_seller_review') + auto_publish_seller_review = fields.Boolean( + config_parameter= + 'multi_vendor_marketplace.auto_publish_seller_review') + seller_review_count = fields.Integer( + 'Display Seller Reviews', + config_parameter= + 'multi_vendor_marketplace.seller_review_count') + show_sell_menu_header = fields.Boolean( + 'Sell Menu on Header', + config_parameter= + 'multi_vendor_marketplace.show_sell_menu_header') + show_sell_menu_footer = fields.Boolean( + 'Sell Menu on Footer', + config_parameter= + 'multi_vendor_marketplace.show_sell_menu_footer') + show_sellers_list = fields.Boolean( + 'Sellers List', + config_parameter= + 'multi_vendor_marketplace.show_sellers_list') + sell_link_label = fields.Char( + config_parameter= + 'multi_vendor_marketplace.sell_link_label') + seller_list_link_label = fields.Char( + config_parameter= + 'multi_vendor_marketplace.seller_list_link_label') + seller_shop_list_link_label = fields.Char( + config_parameter= + 'multi_vendor_marketplace.seller_shop_list_link_label') + new_status_msg = fields.Text('For New Satus', ) + pending_status_msg = fields.Text('For Pending Satus') + image = fields.Binary('Landing page banner', + related='website_id.seller_banner', + readonly=False) + show_t_and_c = fields.Boolean('Marketplace Terms and Conditions', + config_parameter= + 'multi_vendor_marketplace.show_t_and_c') + + def set_values(self): + """Supering the function to set the values""" + super(ResConfigSettings, self).set_values() + set_param = self.env['ir.config_parameter'].sudo().set_param + set_param('res.config.settings.new_status_msg', self.new_status_msg) + set_param('res.config.settings.pending_status_msg', + self.pending_status_msg) + set_param('res.config.settings.pay_journal', self.pay_journal) + + @api.model + def get_values(self): + """Supering the function to get the values""" + res = super(ResConfigSettings, self).get_values() + get_param = self.env['ir.config_parameter'].sudo().get_param + res['new_status_msg'] = get_param('res.config.settings.new_status_msg') + res['pending_status_msg'] = get_param( + 'res.config.settings.pending_status_msg') + res['pay_journal'] = get_param('res.config.settings.pay_journal') + return res diff --git a/multi_vendor_marketplace/models/res_partner.py b/multi_vendor_marketplace/models/res_partner.py new file mode 100755 index 000000000..358973565 --- /dev/null +++ b/multi_vendor_marketplace/models/res_partner.py @@ -0,0 +1,344 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class ResPartner(models.Model): + """ Inheriting partner to add sellers,marketplace and commission + information etc""" + _inherit = 'res.partner' + + profile_url = fields.Char(string='Profile Url', help="Url of the Profile") + allow_product_variant = fields.Boolean( + string='Allow Product Variant', + help="True if access product variant") + payment_method_ids = fields.Many2many('account.payment.method', + string="Payment Methods", + help="For accessing payment methods") + total_amount = fields.Float(string='Total Amount', + help="Total amount by the seller") + balance_amount = fields.Float(string='Balance Amount', + hrlp="Amount balance for the seller") + paid_amount = fields.Float(string='Paid Amount', help="Amount total paid") + market_place_currency = fields.Monetary(string="Market Place Currency", + help="Currency for the " + "marketplace ") + currency_id = fields.Many2one("res.currency", + string="Currency", + help="Currency", + default=lambda self: self.env + ['res.currency'].search([ + ('name', '=', 'USD')]).id, + readonly=True, hide=True) + return_policy = fields.Html(string='Return Policies', + help="Product return policy for seller") + shipping_policy = fields.Html(string='Shipping Policies', + help="Product shipping policy can be set") + profile_image = fields.Binary(string='Profile Image', + help="Profile image in the website") + profile_banner = fields.Binary(string='Profile Banner', + help="Profile banner for the seller") + profile_message = fields.Html(string="profile Message", + help="Profile message for the seller") + sale_count = fields.Integer(compute='_compute_sale_count', + sting="Sale Count", + help="For getting total sale count for seller") + amount_available = fields.Float(compute='_compute_amount_available', + string="Amount available") + avg_rating = fields.Float(compute='_compute_avg_rating', + string="Average rating", + help="Average rating received by the seller") + recommend_count = fields.Float(compute='_compute_recommend_count', + string="Recommended count of the seller", + help="Total recommended count of the seller") + is_publish = fields.Boolean(string="Is publish", help="Check if it is " + "Published") + publish = fields.Boolean(string="publish", help="Published") + seller_shop_id = fields.Many2one('seller.shop', + string="Seller shop", + help="Seller shop details", domain="[('seller_id', '=', id)]") + state = fields.Selection( + selection=[('new', 'New'), + ('Pending for Approval', 'Pending for Approval'), + ('Approved', 'Approved'), ('Denied', 'Denied')], + default="new", + string='Seller Status', help="The status of the seller", + group_expand='_group_expand_states', + track_visibility='always') + default_commission = fields.Float(string='Default Sale Commission(%)', + help="For getting the default commission") + amount_limit = fields.Float( + string='Amount limit for seller payment request', + help="Amount limit to be set for the seller payment request") + min_gap = fields.Integer(string='Minimum gap for next payment request', + help="Minimum gap for the next payment request") + auto_product_approve = fields.Boolean(string="Auto Product Approve", + help="Automatically approve" + "for product for sellers") + auto_quality_approve = fields.Boolean() + location_id = fields.Many2one('stock.location', + string='Default Location', + help="For getting stock location in " + "warehouse") + warehouse_id = fields.Many2one('stock.warehouse', + string='Default Warehouse', + help="For getting default warehouse") + total_commission = fields.Float(string="Total commission", + help="Total commission for the seller") + commission = fields.Float(string="Commission", + help="For getting commission percentage") + profile_url_value = fields.Char(string='Profile Url Value', + help="profile url value") + + def req_approve(self): + """ New user requested for approve to sell products """ + auto_approval = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.seller_approval') + if auto_approval: + self.sudo().approve_seller() + self.state = 'Approved' + else: + self.state = 'Pending for Approval' + + def user_my_profile(self): + """ Fetch user profile """ + return { + 'type': 'ir.actions.act_window', + 'name': 'My Profile', + 'res_model': 'res.partner', + 'view_mode': 'form', + 'res_id': self.env['res.users'].broswe( + self.env.user.id).partner_id.id, + 'target': 'new', + } + + def new_user_my_profile(self): + """ Fetch user profile """ + user_id = self.env['res.users'].search([('id', '=', self.env.user.id)]) + return { + 'type': 'ir.actions.act_window', + 'name': 'My Profile', + 'res_model': 'res.partner', + 'view_mode': 'form', + 'res_id': user_id.partner_id.id, + } + + def publish(self): + """ Publish user profile in website seller list """ + if not self.is_published: + self.is_published = True + else: + self.is_published = False + + def view_settings(self): + """ View default settings for sellers """ + commission_value = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.commission') + min_gap_value = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.min_gap') + amt_limit_value = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.amt_limit') + return { + 'name': 'Default Settings', + 'res_model': 'settings.view', + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'view_type': 'form', + 'target': 'new', + 'context': dict( + self.env.context, + default_commission=commission_value, + default_amt_limit=amt_limit_value, + default_minimum_gap=min_gap_value, + ), + } + + def approve(self): + """ Seller approve state also changed """ + self.state = 'Approved' + + def _group_expand_states(self): + """Returns a list of states""" + return [key for key, val in type(self).state.selection] + + def register_payment(self): + """ fast payment request form """ + return { + 'name': 'Payment Request', + 'domain': [], + 'res_model': 'request.payment', + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'view_type': 'form', + 'context': {}, + 'target': 'new', + } + + @api.model + def create(self, vals): + res = super(ResPartner, self).create(vals) + params = self.env[ + 'res.config.settings'].search([], + order='create_date desc', limit=1) + context = {'seller': vals['name'], } + if params.seller_request_admin_mail: + name = params.seller_request_admin_mail_template_id.name + template = self.env['mail.template'].sudo().search( + [('name', '=', name)], limit=1) + self.env['mail.template'].browse(template.id).with_context( + context).send_mail(self.id, force_send=True) + if params.seller_request_seller_mail: + name = params.seller_request_seller_mail_template_id.name + template = self.env['mail.template'].sudo().search( + [('name', '=', name)], limit=1) + self.env['mail.template'].browse(template.id).with_context( + context).send_mail(self.id, + force_send=True) + return res + + def send_seller_status_mail(self): + """Send the seller status email""" + params = self.env[ + 'res.config.settings'].sudo().search([], + order='create_date desc', + limit=1) + if params.sudo().seller_approve_admin_mail: + name = params.sudo().seller_approve_admin_mail_template_id.name + template = self.env['mail.template'].sudo().search( + [('name', '=', name)], limit=1) + self.env['mail.template'].sudo().browse( + template.id).send_mail(self.id, force_send=True) + if params.sudo().seller_approve_seller_mail: + name = params.sudo().seller_approve_seller_mail_template_id.name + template = self.env['mail.template'].sudo().search( + [('name', '=', name)], limit=1) + self.env['mail.template'].sudo().browse( + template.id).send_mail(self.id, force_send=True) + + def approve_seller(self): + """Approve the seller""" + user1 = self.env["res.users"].search([("name", "=", self.name)]) + internal = self.env.ref('base.group_user') + stock_group = self.env.ref('stock.group_stock_user') + sale_group = self.env.ref('sales_team.group_sale_manager') + seller_user = self.env.ref( + "multi_vendor_marketplace.multi_vendor_marketplace_seller") + user1.sudo().write({'groups_id': [(6, 0, [ + internal.id, + seller_user.id, + stock_group.id, + sale_group.id + ])]}) + result = self.env.ref('sales_team.group_sale_salesman') + result1 = self.env.ref('sales_team.group_sale_salesman_all_leads') + for user in result.users: + if user in user1: + result.write({'users': [(3, user.id, 0)]}) + for user in result1.users: + if user in user1: + result1.write({'users': [(3, user.id, 0)]}) + if self.state == 'Pending for Approval': + self.state = 'Approved' + self.send_seller_status_mail() + + def reject_seller(self): + """Change the state to denied""" + self.state = 'Denied' + self.send_seller_status_mail() + + def create_shop(self): + """Create a new shop""" + return { + 'name': 'Seller Shop', + 'domain': [], + 'res_model': 'seller.shop', + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'view_type': 'form', + 'target': 'new', + } + + def _group_expand_states(self): + """ For expanding the values for selection field """ + return [key for + key, val in type(self).state.selection] + + def _compute_sale_count(self): + """ count seller sale count and display in the profile """ + for record in self: + record.sale_count = self.env['sale.order.line'].search_count( + [('seller_id', '=', self.id)]) + + def _compute_amount_available(self): + """ display available amount in seller profile """ + for avl_amt in self: + avl_amt.amount_available = self.commission + + def view_sale_order(self): + """ view sale order from seller profile """ + return { + 'type': 'ir.actions.act_window', + 'name': 'Orders', + 'view_mode': 'kanban,form', + 'res_model': 'sale.order.line', + 'domain': [('seller_id', '=', self.id)], + } + + def _compute_avg_rating(self): + """Compute the rating of seller""" + for record in self: + count = self.env['seller.review'].search_count( + [('seller_id', '=', record.id)]) + if count: + record.avg_rating = sum_rating = 0.0 + for rec in self.env['seller.review'].search([('seller_id', '=', + record.id)]): + sum_rating += rec.rating + record.avg_rating += sum_rating / count + else: + record.avg_rating = 0 + + def view_rating(self): + """Return the seller review""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Rating in Review', + 'view_mode': 'tree,form', + 'res_model': 'seller.review', + 'domain': [('seller_id', '=', self.id)], + } + + def _compute_recommend_count(self): + """Compute recommendations""" + for record in self: + record.recommend_count = self.env['seller.recommend'].search_count( + [('seller_id', '=', record.id), ('recommend', '=', 'yes')]) + + def view_recommend(self): + """Return the number of recommendations""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Recommendations', + 'view_mode': 'kanban', + 'res_model': 'seller.recommend', + 'domain': [('seller_id', '=', self.id), ('recommend', '=', 'yes')], + } diff --git a/multi_vendor_marketplace/models/res_users.py b/multi_vendor_marketplace/models/res_users.py new file mode 100644 index 000000000..07ad8cabb --- /dev/null +++ b/multi_vendor_marketplace/models/res_users.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from ast import literal_eval +from odoo import fields, models, _ +from odoo.tools.misc import ustr +from odoo.addons.auth_signup.models.res_partner import SignupError, now + + +class ResUsers(models.Model): + """ Added shop information and user creation from website""" + _inherit = 'res.users' + + profile_url = fields.Integer(string='Shop Url', help='Shop url') + + def _create_user_from_template(self, values): + """ Creating user through the website""" + if values['profile_url'] != 0: + template_user_id = self.env.ref( + 'multi_vendor_marketplace.template_seller_user').id + else: + template_user_id = literal_eval( + self.env['ir.config_parameter'].sudo().get_param( + 'base.template_portal_user_id', 'False')) + template_user = self.browse(template_user_id) + if not template_user.exists(): + raise ValueError(_('Signup: invalid template user')) + if not values.get('login'): + raise ValueError(_('Signup: no login given for new user')) + if not values.get('partner_id') and not values.get('name'): + raise ValueError( + _('Signup: no name or partner given for new user')) + values['active'] = True + try: + with self.env.cr.savepoint(): + return template_user.with_context(no_reset_password=True).copy( + values) + except Exception as e: + raise SignupError(ustr(e)) diff --git a/multi_vendor_marketplace/models/sale_order.py b/multi_vendor_marketplace/models/sale_order.py new file mode 100755 index 000000000..0387e0c76 --- /dev/null +++ b/multi_vendor_marketplace/models/sale_order.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class SaleOrder(models.Model): + """ Added product information to the sale order """ + _inherit = 'sale.order' + + product_id = fields.Many2one('product.template', + string="Product", + help="For getting product information " + "on the order") + seller_id = fields.Many2one('res.partner', readonly=True, + string="Seller", + help="Seller details", + related='product_id.seller_id') + quantity = fields.Float(related='order_line.product_uom_qty', + string="Quantity", help="Getting product quantity", + readonly=False) + qty_delivered = fields.Float(related='order_line.qty_delivered', + string="Quantity Delivered ", + help="Getting delivered quantity", + readonly=False) + state = fields.Selection(selection_add=[('pending', 'Pending'), + ('approved', 'Approved'), + ('shipped', 'Shipped'), + ('cancel', 'Cancel')], + string="state", help="State of the sale order") + unit_price = fields.Float(related='order_line.price_unit', + string="Unit Price", + help="Unit price of the product", readonly=False) + discount = fields.Float(related='order_line.discount', string="Discount", + help="Discount applied on the order line", + readonly=False) + subtotal = fields.Monetary(related='order_line.price_subtotal', + string="Subtotal", + help="Getting subtotal amount", readonly=False) + create_date = fields.Datetime(string="Create Date", + help="Date of the record creation", + default=fields.Datetime.today(), + readonly=False) + description = fields.Text(string="Description", + help="Adding description on the product") + + def action_confirm(self): + """ Super sale order confirm function and add to commission based on + settings commission value""" + res = super(SaleOrder, self).action_confirm() + self.state = 'pending' + for rec in self.order_line: + if rec.product_id.seller_id.default_commission: + partner_ids = self.env['res.partner'].search( + [('id', '=', rec.product_id.seller_id.id)]) + partner_ids.total_commission = ( + partner_ids.total_commission + rec.price_subtotal * ( + rec.product_id.seller_id.default_commission / 100)) + partner_ids.commission = ( + partner_ids.total_commission + rec.price_subtotal * ( + rec.product_id.seller_id.default_commission / 100)) + else: + commission = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.commission') + commission_value = float(commission) + partner_ids = self.env['res.partner'].search( + [('id', '=', rec.product_id.seller_id.id)]) + partner_ids.total_commission = ( + partner_ids.total_commission + rec.price_subtotal * ( + commission_value / 100)) + partner_ids.commission = ( + partner_ids.total_commission + rec.price_subtotal * ( + rec.product_id.seller_id.default_commission / 100)) + return res diff --git a/multi_vendor_marketplace/models/sale_order_line.py b/multi_vendor_marketplace/models/sale_order_line.py new file mode 100755 index 000000000..63cda3652 --- /dev/null +++ b/multi_vendor_marketplace/models/sale_order_line.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class SaleOrder(models.Model): + """ Added seller information""" + _inherit = 'sale.order.line' + + seller_id = fields.Many2one('res.partner', readonly=True, + string="Seller", + help="For getting seller information", + related='product_id.seller_id') + partner_id = fields.Many2one('res.partner', + related='order_id.partner_id', + string="Customer", + Help="Get the partner information") + state = fields.Selection(selection=[('pending', 'Pending'), + ('approved', 'Approved'), + ('shipped', 'Shipped'), + ('cancel', 'Cancel')], string="State", + help="Get the approval states") + + def cancel_order(self): + """ Function to cancel the current order from order line""" + self.state = 'cancel' + + def approve_order(self): + """ Approve sale order and change to state in approved only in seller + order view and its created new delivery form for that product """ + data_stock_pick = self.env['stock.picking'].sudo().search( + [('origin', '=', self.order_id.name)]) + partner_id = data_stock_pick.partner_id + opr_type = data_stock_pick.picking_type_id + location_id = data_stock_pick.location_id + location_dst_id = data_stock_pick.location_dest_id + name = data_stock_pick.name + vals = [] + qty_info = self.env['stock.quant'].search( + [('product_id', '=', self.product_id.id), ('location_id', '=', 8)]) + if qty_info.quantity <= self.product_uom_qty: + qty_reserved = self.product_uom_qty + else: + qty_reserved = qty_info.quantity + vals.append({'product_id': self.product_id, + 'product_uom_qty': self.product_uom_qty, + 'forecast_availability': qty_reserved, + 'location_id': location_id, + 'location_dest_id': location_dst_id, + 'name': name}) + if data_stock_pick.state != 'cancel': + data_stock_pick.state = 'cancel' + new_rec = self.env['stock.picking'].create({ + 'partner_id': partner_id.id, + 'picking_type_id': opr_type.id, + 'seller_id': self.seller_id.id, + 'move_ids_without_package': vals, + 'origin': ' ' + self.order_id.name, + }) + new_rec.update({ + 'ref_id': self.id + }) + new_rec.state = 'assigned' + self.state = 'approved' + else: + new_rec = self.env['stock.picking'].create({ + 'partner_id': partner_id.id, + 'picking_type_id': opr_type.id, + 'move_ids_without_package': vals, + 'origin': ' ' + self.order_id.name, + }) + new_rec.update({ + 'ref_id': self.id + }) + new_rec.state = 'assigned' + self.state = 'approved' + + def shipped(self): + """ Redirect to delivery form for validating """ + stock_picking_record = self.env['stock.picking'].search( + [('ref_id', '=', self.id)]) + return { + 'type': 'ir.actions.act_window', + 'name': 'Stock Picking', + 'res_model': 'stock.picking', + 'view_mode': 'form', + 'res_id': stock_picking_record.id, + } diff --git a/multi_vendor_marketplace/models/seller_payment.py b/multi_vendor_marketplace/models/seller_payment.py new file mode 100755 index 000000000..97b2c87a0 --- /dev/null +++ b/multi_vendor_marketplace/models/seller_payment.py @@ -0,0 +1,151 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError +from odoo.http import request + + +class SellerPayment(models.Model): + """ Managing seller payments""" + _name = 'seller.payment' + _description = "Seller Payment" + + name = fields.Char(string='Record Reference', required=True, + help="Sequence of the payment", readonly=True, + default='New') + seller_id = fields.Many2one( + 'res.partner', string='Seller', + required=True, + default=lambda self: self.env.user.partner_id.id, + help="Seller details") + payment_mode = fields.Selection( + selection=[('Cash', 'Cash'), + ('Bank', 'Bank')], + string="Payment Mode", + help="To select the mode of payment", + required=True, default='Cash') + memo = fields.Char(string='Memo', help="Description", required=True) + payable_amount = fields.Float(string='Payable Amount', help="Total amount", + required=True) + date = fields.Date(string='Payment Date', required=True, + help="Date of the payment", default=fields.Date.today) + type_id = fields.Many2one('account.payment.method', + string='Type', help="Payment method", + required=True) + invoice_cashable = fields.Boolean(string='Invoice Cashable', + help="Total amount that to invoice") + description = fields.Text(string='Description', help="Description") + commission = fields.Float(string="Commission", + help="Total commission amount") + state = fields.Selection(selection=[('Draft', 'Draft'), + ('Requested', 'Requested'), + ('Validated', 'Validated'), + ('Rejected', 'Rejected'), + ('cancelled', 'Cancelled')], + string="state", + help="State of the seller payment", + default="Draft") + + def request(self): + """ Request for payment and check payment term settings values """ + self.state = 'Requested' + amount_limit = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.amt_limit') + min_gap = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.min_gap') + partner_id = self.env['res.partner'].search( + [('id', '=', self.seller_id.id)]) + today_date = fields.Date.today() + mingap_date = fields.Date.subtract(today_date, days=int(min_gap)) + date_info_record = self.env['seller.payment'].search( + [('seller_id', '=', self.seller_id.id), + ('state', '=', 'Validated'), ('date', '>=', mingap_date)], + order='date DESC') + for checkdate in date_info_record: + if (self.payable_amount > partner_id.total_commission + or self.payable_amount > int( + amount_limit) or checkdate.date >= mingap_date): + raise ValidationError( + _("Entered amount is greater than your commission or " + "Amount limit is " + amount_limit + " and Minimum gap " + "for next payment request " + min_gap + " days")) + break + + def reject(self): + """ Payment request will reject """ + self.state = 'Rejected' + + def cancel(self): + """ Payment request will cancel """ + self.state = 'cancelled' + + def validate(self): + """ Payment request will validte and substarct that amount + from commission """ + self.state = 'Validated' + params = request.env['ir.config_parameter'].sudo() + partner_id = self.env['res.partner'].search( + [('id', '=', self.seller_id.id)]) + if self.payable_amount < partner_id.commission: + raise ValidationError( + _("Entered amount is greater than the commission")) + product = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.pay_product') + currency = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.currency') + currency_id = self.env['res.currency'].search([('id', '=', currency)]) + self.env['account.move'].create({ + 'move_type': 'in_invoice', + 'partner_id': self.seller_id.id, + 'ref': self.seller_id.profile_url, + 'invoice_date': self.date, + 'invoice_payment_term_id': 1, + 'currency_id': currency_id.id, + 'journal_id': 3, + 'invoice_line_ids': + [(0, 0, + { + 'product_id': product, + 'name': self.memo, + 'quantity': 1, + 'price_unit': self.payable_amount, + 'currency_id': currency_id.id, + 'tax_ids': False, + })] + }) + partner_id.commission = partner_id.commission - self.payable_amount + + @api.onchange('seller_id') + def onchange_seller(self): + """ For getting default commission""" + partner_id = self.env['res.partner'].search( + [('id', '=', self.seller_id.id)]) + self.commission = partner_id.commission + + @api.model + def create(self, vals): + """ For getting the sequence number""" + if vals.get('name', 'New'): + vals['name'] = self.env['ir.sequence'].next_by_code( + 'seller.payment') + res = super(SellerPayment, self).create(vals) + return res diff --git a/multi_vendor_marketplace/models/seller_recommend.py b/multi_vendor_marketplace/models/seller_recommend.py new file mode 100755 index 000000000..a6ac43aa4 --- /dev/null +++ b/multi_vendor_marketplace/models/seller_recommend.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class SellerRecommend(models.Model): + """Managing Seller Recommendations""" + _name = 'seller.recommend' + _description = 'Seller Recommendation' + _rec_name = 'partner_id' + _inherit = 'mail.thread' + + partner_id = fields.Many2one('res.partner', string="Customer", + help="For getting customer name", + required=True) + seller_id = fields.Many2one('res.partner', string="Seller", + help="For getting seller name", required=True) + recommend = fields.Selection(selection=[('no', 'NO'), ('yes', 'YES')], + default='NO', track_visibility='always') + date = fields.Date(string="Date", help="Storing date", + default=fields.Date.today, required=True) + state = fields.Selection(selection=[('unpublished', 'Unpublished'), + ('published', 'Published')], + string='Status', + help="Status of the Recommendation", + default='unpublished', track_visibility='always') + + @api.model + def recommend_func(self, vals): + """Create or update the recommendation for the seller by customers""" + check = self.search([('seller_id', '=', int(vals['seller_id'])), + ('customer_id', '=', int(vals['customer_id']))]) + if check: + check.write({'recommend': vals['recommend']}) + else: + return super(SellerRecommend, self).create(vals) + + def action_publish(self): + """ Function to change the state when publish the seller + recommendation""" + self.write({'state': "published"}) + + def action_unpublish(self): + """ Function to change the state when the seller recommendation + got unpublished """ + self.write({'state': "unpublished"}) diff --git a/multi_vendor_marketplace/models/seller_review.py b/multi_vendor_marketplace/models/seller_review.py new file mode 100755 index 000000000..e62dc4e28 --- /dev/null +++ b/multi_vendor_marketplace/models/seller_review.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class SellerReview(models.Model): + """Managing Seller Reviews""" + _name = 'seller.review' + _description = 'Seller Review' + _rec_name = 'review_title' + _inherit = 'mail.thread' + + seller_id = fields.Many2one('res.partner', string="Seller", + help="Getting seller name", + required=True) + customer_id = fields.Many2one('res.partner', required=True, + string="Customer", + help="Getting partner name") + customer_email = fields.Char(related='customer_id.email', + string="Email", help="Getting customer email") + rating = fields.Float(string="Rating", help="Getting rating", + required=True) + review_title = fields.Char(string="Review Title", + help="Title of the review") + date = fields.Date(string="Date", help="Date field", + default=fields.Date.today) + message = fields.Text(string="Message", + help="Field to enter the review text", size=150) + like_count = fields.Integer(string='Helpful Count', + help="Count of the positive review", + compute='_compute_count') + unlike_count = fields.Integer('Found Not Helpful', + help="Count of all negative reviews", + compute='_compute_count') + state = fields.Selection(selection=[('unpublished', 'Unpublished'), + ('published', 'Published')], + string='Status', help="state of the review", + default='unpublished', track_visibility='always') + help_info_ids = fields.One2many('helpful.info', 'review_id', + string="Help info", + help="Helpful info details") + _sql_constraints = [ + ('rating_range', 'check(rating >= 0 and rating <= 5)', + 'Rating should be between 0 and 5')] + + @api.model + def rate_review(self, vals): + """For adding Seller review""" + check = self.sudo().search([('seller_id', '=', int(vals['seller_id'])), + ('customer_id', '=', + int(vals['customer_id']))]) + publish = self.env['ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.auto_publish_seller_review') + if check: + if publish: + check.sudo().write({'rating': vals['rating'], + 'message': vals['message']}) + check.pub() + else: + check.write({'rating': vals['rating'], + 'message': vals['message']}) + check.unpub() + else: + if publish: + check.sudo().pub() + return super(SellerReview, self).sudo().create(vals) + else: + check.sudo().unpub() + return super(SellerReview, self).sudo().create(vals) + + def action_publish(self): + """ Function to publish the review""" + self.state = 'published' + + def action_unpublish(self): + """ Function to un publish the review""" + self.state = 'unpublished' + + def _compute_count(self): + """ Function to compute the total count """ + count = None + for record in self: + count = record.env['helpful.info'].search_count( + [('review_id', '=', record.id)]) + if count: + for record in self: + for rec in record.help_info_ids: + record.like_count = rec.search_count([('msg', '=', 'yes'), + ('review_id', '=', + record.id)]) + record.unlike_count = rec.search_count([('msg', '=', 'no'), + ('review_id', '=', + record.id)]) + else: + for record in self: + record.like_count = record.unlike_count = 0 diff --git a/multi_vendor_marketplace/models/seller_shop.py b/multi_vendor_marketplace/models/seller_shop.py new file mode 100644 index 000000000..dc65829fb --- /dev/null +++ b/multi_vendor_marketplace/models/seller_shop.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models,_ +from odoo.exceptions import UserError + + +class SellerShop(models.Model): + """Managing Seller Shops""" + _name = 'seller.shop' + _description = "Seller Shop" + + name = fields.Char(string="Name", help="Name of the shop") + shop_url = fields.Char(string='Shop Url', + help="Shop url which can redirect from the website", + required=True) + shop_banner = fields.Char(string="Shop Banner", + help="Banner of the shop which can be displayed " + "on the website") + tag_line = fields.Char(string='Tag Line', help="Tag line for the shop") + description = fields.Char(string='Description', + help="Description for the shop") + seller_id = fields.Many2one('res.partner', string='Seller', + help="Seller name", default=lambda + self: self.env.user.partner_id.id, + domain=[('state', '=', 'Approved')]) + seller_image = fields.Binary(related='seller_id.image_1920', + string="Seller image", + help="Image of the seller") + address = fields.Text(string='Address', help="Address of the seller") + phone = fields.Integer(string='Phone', help="Phone number of the seller") + mobile_number = fields.Integer(string='Mobile Number', + help="Mobile number of the Seller shop") + email = fields.Char(string='E-mail', help="Email address of the seller") + fax = fields.Char(string='Fax', help="Fax of the seller") + is_publish = fields.Boolean(string="Is Publish", + help="for identifying seller shop is published" + "or not in the website") + product_count = fields.Integer(string='Product Count', + help="Total product count in the shop") + product_ids = fields.Many2many('product.template', + string="Product", + help="Product details") + state = fields.Selection(selection=[ + ('Pending for Approval', 'Pending for Approval'), + ('Approved', 'Approved'), ('Denied', 'Denied')], string="State", + help="State of the shop", default="Pending for Approval") + + def approve_request(self): + """ Approve the seller shop request""" + self.state = 'Approved' + + def reject_request(self): + """ Reject the seller request""" + self.state = 'Denied' + + def action_toggle_is_published(self): + """ Toggle the field `is_published`.""" + if self.state == 'Approved': + self.is_publish = not self.is_publish + else: + raise UserError(_("You can only publish the approved shops")) diff --git a/multi_vendor_marketplace/models/social_media.py b/multi_vendor_marketplace/models/social_media.py new file mode 100755 index 000000000..66d6271ec --- /dev/null +++ b/multi_vendor_marketplace/models/social_media.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class SocialMedia(models.Model): + """ Added social media platform details""" + _name = 'social.media' + _description = "Social Media" + + name = fields.Char(string="Name", help="For getting name", required=True) + icon = fields.Binary(sting="Icon", help="Icon for the Social media") + base_url = fields.Char( + string="Base Url", + help="For storing the base url of the social media page", required=True) diff --git a/multi_vendor_marketplace/models/stock_picking.py b/multi_vendor_marketplace/models/stock_picking.py new file mode 100644 index 000000000..f3ff03e33 --- /dev/null +++ b/multi_vendor_marketplace/models/stock_picking.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class StockPicking(models.Model): + """Picking added with seller's extra details for the products the sell""" + _inherit = 'stock.picking' + + seller_id = fields.Many2one('res.partner', string="Seller", + help="Seller information") + ref_id = fields.Integer(string="Refer id", help="For adding the reference") + + def button_validate(self): + """ Super stock picking function for fetch deliverd qty from delivery + form to sale order """ + res = super(StockPicking, self).button_validate() + sale_order_line_rec = self.env['sale.order.line'].sudo().search( + [('id', '=', self.ref_id)]) + sale_order_line_rec.state = 'shipped' + sale_order_line_rec.update({ + 'qty_delivered': self.move_ids_without_package.quantity_done + }) + return res diff --git a/multi_vendor_marketplace/models/vendor_dashboard.py b/multi_vendor_marketplace/models/vendor_dashboard.py new file mode 100644 index 000000000..6a932bfb1 --- /dev/null +++ b/multi_vendor_marketplace/models/vendor_dashboard.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class VendorDashboard(models.Model): + """Vendor details maintained for the Dashboard""" + _name = 'vendor.dashboard' + + sample = fields.Boolean(string='Sample', help='Sample dashboard') diff --git a/multi_vendor_marketplace/models/website.py b/multi_vendor_marketplace/models/website.py new file mode 100644 index 000000000..85a31c2c0 --- /dev/null +++ b/multi_vendor_marketplace/models/website.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class WebSite(models.Model): + """Added Seller banner fields which shows a banner in the website""" + _inherit = 'website' + + seller_banner = fields.Binary(string="Seller Banner", + help="To store the seller banner which is " + "displayed on the website") diff --git a/multi_vendor_marketplace/models/website_menu.py b/multi_vendor_marketplace/models/website_menu.py new file mode 100755 index 000000000..24898162d --- /dev/null +++ b/multi_vendor_marketplace/models/website_menu.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class WebsiteMenu(models.Model): + """ Adding website menu""" + _inherit = "website.menu" + + def _compute_visible(self): + """Make the 'Sell' menu visible on thw website based on the setting + done from backend""" + super()._compute_visible() + show_sell_menu_header = self.env[ + 'ir.config_parameter'].sudo().get_param( + 'multi_vendor_marketplace.show_sell_menu_header') + for menu in self: + if menu.name == 'Sell' and not show_sell_menu_header: + menu.is_visible = False + if menu.name == 'Sell' and show_sell_menu_header: + menu.is_visible = True diff --git a/multi_vendor_marketplace/security/inventory_request_security.xml b/multi_vendor_marketplace/security/inventory_request_security.xml new file mode 100644 index 000000000..fd7e70342 --- /dev/null +++ b/multi_vendor_marketplace/security/inventory_request_security.xml @@ -0,0 +1,21 @@ + + + + + Record Rule for seller in inventory request + view + + + + [('seller_id.id', '=', + user.partner_id.id)] + + + + + + + + \ No newline at end of file diff --git a/multi_vendor_marketplace/security/ir.model.access.csv b/multi_vendor_marketplace/security/ir.model.access.csv new file mode 100755 index 000000000..32d0d1452 --- /dev/null +++ b/multi_vendor_marketplace/security/ir.model.access.csv @@ -0,0 +1,14 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_vendor_dashboard_user,access.vendor.dashboard.user,model_vendor_dashboard,base.group_user,1,1,1,1 +access_pay_to_seller_user,access.pay.to.seller.user,model_pay_to_seller,base.group_user,1,1,1,1 +access_request_payment,access.request.payment,model_request_payment,base.group_user,1,1,1,1 +access_seller_payment,access.seller.payment,model_seller_payment,base.group_user,1,1,1,1 +access_social_media,access.social.media,model_social_media,base.group_user,1,1,1,1 +access_seller_review,access.seller.review,model_seller_review,base.group_user,1,1,1,1 +access_helpful_info,access.helpful.info,model_helpful_info,base.group_user,1,1,1,1 +access_seller_recommend,access.seller.recommend,model_seller_recommend,base.group_user,1,1,1,1 +access_seller_shop,acces.seller.shop,model_seller_shop,base.group_user,1,1,1,1 +access_inventory_request,access.inventory.request,model_inventory_request,base.group_user,1,1,1,1 +access_multi_vendor_pricelist,access.multi.vendor.pricelist,model_multi_vendor_pricelist,base.group_user,1,1,1,1 +base.ir_ui_menu.access1,access_base_ir_ui_menu,base.model_ir_ui_menu,multi_vendor_marketplace.multi_vendor_marketplace_seller,1,0,0,0 +multi_vendor_marketplace.access_settings_view,access_settings_view,multi_vendor_marketplace.model_settings_view,base.group_user,1,1,1,1 diff --git a/multi_vendor_marketplace/security/multi_vendor_marketplace_groups.xml b/multi_vendor_marketplace/security/multi_vendor_marketplace_groups.xml new file mode 100755 index 000000000..ed77f3e16 --- /dev/null +++ b/multi_vendor_marketplace/security/multi_vendor_marketplace_groups.xml @@ -0,0 +1,26 @@ + + + + + Multi Vendor Marketplace + User access rights + 20 + + + + Admin + + + + + + Seller + + + + + Requested Seller + + + diff --git a/multi_vendor_marketplace/security/product_template_security.xml b/multi_vendor_marketplace/security/product_template_security.xml new file mode 100644 index 000000000..c8c4b3fe7 --- /dev/null +++ b/multi_vendor_marketplace/security/product_template_security.xml @@ -0,0 +1,17 @@ + + + + + Record Rule for seller product + + + [('seller_id.id', '=', + user.partner_id.id)] + + + + + + + diff --git a/multi_vendor_marketplace/security/sale_order_line_security.xml b/multi_vendor_marketplace/security/sale_order_line_security.xml new file mode 100644 index 000000000..b41e32080 --- /dev/null +++ b/multi_vendor_marketplace/security/sale_order_line_security.xml @@ -0,0 +1,18 @@ + + + + + Record Rule for seller sale order + + + [('seller_id.id', '=', + user.partner_id.id)] + + + + + + + diff --git a/multi_vendor_marketplace/security/seller_payment_security.xml b/multi_vendor_marketplace/security/seller_payment_security.xml new file mode 100644 index 000000000..27e954af7 --- /dev/null +++ b/multi_vendor_marketplace/security/seller_payment_security.xml @@ -0,0 +1,17 @@ + + + + + Record Rule for seller payment + + + [('seller_id.id', '=', + user.partner_id.id)] + + + + + + + diff --git a/multi_vendor_marketplace/security/seller_shop_security.xml b/multi_vendor_marketplace/security/seller_shop_security.xml new file mode 100644 index 000000000..194d83f5a --- /dev/null +++ b/multi_vendor_marketplace/security/seller_shop_security.xml @@ -0,0 +1,20 @@ + + + + + Record Rule for seller shop + view + + + + [('seller_id.id', '=', + user.partner_id.id)] + + + + + + + diff --git a/multi_vendor_marketplace/security/stock_picking_security.xml b/multi_vendor_marketplace/security/stock_picking_security.xml new file mode 100644 index 000000000..75ddef203 --- /dev/null +++ b/multi_vendor_marketplace/security/stock_picking_security.xml @@ -0,0 +1,18 @@ + + + + + Record Rule for seller Delivery Order + + + [('seller_id.id', '=', + user.partner_id.id)] + + + + + + + diff --git a/multi_vendor_marketplace/static/description/assets/icons/check.png b/multi_vendor_marketplace/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/check.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/chevron.png b/multi_vendor_marketplace/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/chevron.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/cogs.png b/multi_vendor_marketplace/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/cogs.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/consultation.png b/multi_vendor_marketplace/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/consultation.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/ecom-black.png b/multi_vendor_marketplace/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/ecom-black.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/education-black.png b/multi_vendor_marketplace/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/education-black.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/hotel-black.png b/multi_vendor_marketplace/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/hotel-black.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/license.png b/multi_vendor_marketplace/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/license.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/lifebuoy.png b/multi_vendor_marketplace/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/lifebuoy.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/manufacturing-black.png b/multi_vendor_marketplace/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/manufacturing-black.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/pos-black.png b/multi_vendor_marketplace/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/pos-black.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/puzzle.png b/multi_vendor_marketplace/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/puzzle.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/restaurant-black.png b/multi_vendor_marketplace/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/restaurant-black.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/service-black.png b/multi_vendor_marketplace/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/service-black.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/trading-black.png b/multi_vendor_marketplace/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/trading-black.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/training.png b/multi_vendor_marketplace/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/training.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/update.png b/multi_vendor_marketplace/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/update.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/user.png b/multi_vendor_marketplace/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/user.png differ diff --git a/multi_vendor_marketplace/static/description/assets/icons/wrench.png b/multi_vendor_marketplace/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/icons/wrench.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/categories.png b/multi_vendor_marketplace/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/categories.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/check-box.png b/multi_vendor_marketplace/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/check-box.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/compass.png b/multi_vendor_marketplace/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/compass.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/corporate.png b/multi_vendor_marketplace/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/corporate.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/customer-support.png b/multi_vendor_marketplace/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/customer-support.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/cybrosys-logo.png b/multi_vendor_marketplace/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/cybrosys-logo.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/features.png b/multi_vendor_marketplace/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/features.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/logo.png b/multi_vendor_marketplace/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/logo.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/pictures.png b/multi_vendor_marketplace/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/pictures.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/pie-chart.png b/multi_vendor_marketplace/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/pie-chart.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/right-arrow.png b/multi_vendor_marketplace/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/right-arrow.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/star.png b/multi_vendor_marketplace/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/star.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/support.png b/multi_vendor_marketplace/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/support.png differ diff --git a/multi_vendor_marketplace/static/description/assets/misc/whatsapp.png b/multi_vendor_marketplace/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/misc/whatsapp.png differ diff --git a/multi_vendor_marketplace/static/description/assets/modules/1.png b/multi_vendor_marketplace/static/description/assets/modules/1.png new file mode 100755 index 000000000..5238bdeab Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/modules/1.png differ diff --git a/multi_vendor_marketplace/static/description/assets/modules/2.png b/multi_vendor_marketplace/static/description/assets/modules/2.png new file mode 100755 index 000000000..1ae7cfe3b Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/modules/2.png differ diff --git a/multi_vendor_marketplace/static/description/assets/modules/3.png b/multi_vendor_marketplace/static/description/assets/modules/3.png new file mode 100755 index 000000000..3c3ff1afb Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/modules/3.png differ diff --git a/multi_vendor_marketplace/static/description/assets/modules/4.png b/multi_vendor_marketplace/static/description/assets/modules/4.png new file mode 100755 index 000000000..3fae4631e Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/modules/4.png differ diff --git a/multi_vendor_marketplace/static/description/assets/modules/5.gif b/multi_vendor_marketplace/static/description/assets/modules/5.gif new file mode 100755 index 000000000..2a5f8e659 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/modules/5.gif differ diff --git a/multi_vendor_marketplace/static/description/assets/modules/6.png b/multi_vendor_marketplace/static/description/assets/modules/6.png new file mode 100755 index 000000000..7f2815273 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/modules/6.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/1.png b/multi_vendor_marketplace/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..6051a733d Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/1.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/10.png b/multi_vendor_marketplace/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..b23b0dc49 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/10.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/11.png b/multi_vendor_marketplace/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..94cb5393d Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/11.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/12.png b/multi_vendor_marketplace/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..39a94d898 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/12.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/13.png b/multi_vendor_marketplace/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..acc9fa63d Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/13.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/14.png b/multi_vendor_marketplace/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..5551750b0 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/14.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/15.png b/multi_vendor_marketplace/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..ce6676285 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/15.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/2.png b/multi_vendor_marketplace/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..b54023619 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/2.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/3.png b/multi_vendor_marketplace/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..7244aec8d Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/3.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/4.png b/multi_vendor_marketplace/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..ae596e26a Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/4.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/5.png b/multi_vendor_marketplace/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..a0ef6fa73 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/5.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/6.png b/multi_vendor_marketplace/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..f594710f3 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/6.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/7.png b/multi_vendor_marketplace/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..1585d3418 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/7.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/8.png b/multi_vendor_marketplace/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..291656799 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/8.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/9.png b/multi_vendor_marketplace/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..149c4003c Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/9.png differ diff --git a/multi_vendor_marketplace/static/description/assets/screenshots/hero.gif b/multi_vendor_marketplace/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..8180c7776 Binary files /dev/null and b/multi_vendor_marketplace/static/description/assets/screenshots/hero.gif differ diff --git a/multi_vendor_marketplace/static/description/banner.png b/multi_vendor_marketplace/static/description/banner.png new file mode 100755 index 000000000..45c41c736 Binary files /dev/null and b/multi_vendor_marketplace/static/description/banner.png differ diff --git a/multi_vendor_marketplace/static/description/icon.png b/multi_vendor_marketplace/static/description/icon.png new file mode 100755 index 000000000..bbea93836 Binary files /dev/null and b/multi_vendor_marketplace/static/description/icon.png differ diff --git a/multi_vendor_marketplace/static/description/index.html b/multi_vendor_marketplace/static/description/index.html new file mode 100755 index 000000000..ab32c525b --- /dev/null +++ b/multi_vendor_marketplace/static/description/index.html @@ -0,0 +1,644 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ + + +

Odoo Multi Vendor Marketplace

+

On your website, sellers can easily sign up and start selling their goods.

+ + + +
+ +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This Module Create your own marketplace and facilitate the exchange of buyers and sellers. Accept or reject the seller's requests pending. To track your progress and make good choices, keep tabs on the customer reviews. For your clients to have the best possible shopping experience, you can also opt to display the vendor's business information on the website, such as their profile, shipping policies, purchasing policies, etc. Specify the vendor's payment conditions, either generally or for each individual vendor. Choose the products that you want to showcase on the website. Receive email alerts whenever a new seller requests a sale. In other words, take complete control of the App, select how and with whom to conduct business, and turn your website into a one-stop shop for sellers and buyers. +
+
+ + + +
+
+ +
+

Features For Admin +

+
+
+
+
+ + On the shop, Admin can also market his own products. +
+
+ + Entire control over the seller's and the product's activities. +
+
+ + Set the option for manual or automatic seller approval. +
+
+ + Also provides manual or automatic seller product approval. +
+
+ + Administrators can choose to manually or automatically approve a seller products quantities. +
+
+ + Also provides manual or automatic seller product approval. +
+
+ + Admin can set custom internal categories for all marketplace products from the back-end +
+
+ + Gives users the choice of either displaying or automatically publishing vendor reviews on the website. +
+
+ + Select whether to send mail alerts for acceptance or rejection of requests from sellers for new products, inventory updates, etc. +
+
+ + Enables you to choose whether to display or hide seller information on the website, such as sales and product counts, return policies, joining dates, and shipping policy. +
+
+ + Control over the vendor commission. +
+
+
+ + +
+
+ +
+

Features For Vendors +

+
+
+
+
+ + Each seller in the marketplace gets their own profile page. +
+
+ + Sellers have the option to make their shipping and return policies visible. +
+
+ + On the seller dashboard, you can access all shop-related data such as product approval requests, the total number of orders on your account, and seller payments. +
+
+ + On the website add the products, set their prices, and assign them categories. +
+
+ + Sellers can publish/unpublish their products on the website. +
+
+ + From his profile, the seller can see the approval status of the products: approved or pending. +
+
+ + Give the profile URL a distinctive name that is easy for customers to remember and utilise. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+

Create a new store from website Sell Menu

+ +
+
+

Seller Registration Form

+ +
+ +
+

Marketplace Product Page View

+ +
+ +
+

View of the seller profile with menus on a marketplace.

+ +
+
+

Dashboard for admin

+ +
+
+

Seller Management Menu

+ +
+
+

Edit and Manage Seller Profile

+ +
+
+

Manage seller Reviews and Recommendations From Customers

+ +
+
+

Quick Peek Seller Dashboard

+ +
+
+

Seller Can Manage Inventory And Stock Moves

+ +
+
+

Auto Approval Settings

+ +
+
+

Seller Payment and Global Commission Settings

+ +
+
+

Mail Notification Settings

+ +
+
+

Website View Settings

+ +
+
+

Can manage seller payment and orders

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

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/multi_vendor_marketplace/static/src/img/0.png b/multi_vendor_marketplace/static/src/img/0.png new file mode 100755 index 000000000..775ae699c Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/0.png differ diff --git a/multi_vendor_marketplace/static/src/img/1.1.png b/multi_vendor_marketplace/static/src/img/1.1.png new file mode 100755 index 000000000..defef19f9 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/1.1.png differ diff --git a/multi_vendor_marketplace/static/src/img/2.1.png b/multi_vendor_marketplace/static/src/img/2.1.png new file mode 100755 index 000000000..6d52ad28d Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/2.1.png differ diff --git a/multi_vendor_marketplace/static/src/img/3.png b/multi_vendor_marketplace/static/src/img/3.png new file mode 100755 index 000000000..f614de151 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/3.png differ diff --git a/multi_vendor_marketplace/static/src/img/4.png b/multi_vendor_marketplace/static/src/img/4.png new file mode 100755 index 000000000..044c60021 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/4.png differ diff --git a/multi_vendor_marketplace/static/src/img/5.png b/multi_vendor_marketplace/static/src/img/5.png new file mode 100755 index 000000000..ae9974633 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/5.png differ diff --git a/multi_vendor_marketplace/static/src/img/delete.gif b/multi_vendor_marketplace/static/src/img/delete.gif new file mode 100755 index 000000000..43c6ca876 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/delete.gif differ diff --git a/multi_vendor_marketplace/static/src/img/icon.png b/multi_vendor_marketplace/static/src/img/icon.png new file mode 100755 index 000000000..602d63250 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/icon.png differ diff --git a/multi_vendor_marketplace/static/src/img/product.png b/multi_vendor_marketplace/static/src/img/product.png new file mode 100755 index 000000000..61efef843 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/product.png differ diff --git a/multi_vendor_marketplace/static/src/img/stars1.png b/multi_vendor_marketplace/static/src/img/stars1.png new file mode 100755 index 000000000..a60afa0d3 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/stars1.png differ diff --git a/multi_vendor_marketplace/static/src/img/stars11.png b/multi_vendor_marketplace/static/src/img/stars11.png new file mode 100755 index 000000000..29e37ce2d Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/stars11.png differ diff --git a/multi_vendor_marketplace/static/src/img/stars13.png b/multi_vendor_marketplace/static/src/img/stars13.png new file mode 100755 index 000000000..a73b69711 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/stars13.png differ diff --git a/multi_vendor_marketplace/static/src/img/stars14.png b/multi_vendor_marketplace/static/src/img/stars14.png new file mode 100755 index 000000000..3f5309771 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/stars14.png differ diff --git a/multi_vendor_marketplace/static/src/img/thumb_icon.png b/multi_vendor_marketplace/static/src/img/thumb_icon.png new file mode 100755 index 000000000..2b30f1234 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/thumb_icon.png differ diff --git a/multi_vendor_marketplace/static/src/img/user.png b/multi_vendor_marketplace/static/src/img/user.png new file mode 100755 index 000000000..7127aa862 Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/user.png differ diff --git a/multi_vendor_marketplace/static/src/img/vendor.jpg b/multi_vendor_marketplace/static/src/img/vendor.jpg new file mode 100755 index 000000000..97ce378ca Binary files /dev/null and b/multi_vendor_marketplace/static/src/img/vendor.jpg differ diff --git a/multi_vendor_marketplace/static/src/js/rating.js b/multi_vendor_marketplace/static/src/js/rating.js new file mode 100755 index 000000000..0825038d3 --- /dev/null +++ b/multi_vendor_marketplace/static/src/js/rating.js @@ -0,0 +1,96 @@ +odoo.define('multi_vendor_marketplace.rating', function(require) { + "use strict"; + var session = require('web.session') + var rpc = require('web.rpc') + $(document).ready(function() { + $('.prod_redirect').on('click', function() { + var url = $(this).attr("href"); + var newUrl = url.replaceAll(' ', '-'); + $(this).attr("href", newUrl); + }); + $("#post").on('click', function() { + var seller_id = $("#seller").val() + var customer_id = $("#customer").val() + var message_id = $("#msg").val() + if (message_id == '') { + swal({ + text: "Please Fill Your Comments!", + button: "Close!", + }); + } else { + var rating = 0 + if ($("#rating11").prop("checked")) { + rating = $("#rating11").val() + } + if ($("#rating12").prop("checked")) { + rating = $("#rating12").val() + } + if ($("#rating13").prop("checked")) { + rating = $("#rating13").val() + } + if ($("#rating14").prop("checked")) { + rating = $("#rating14").val() + } + if ($("#rating15").prop("checked")) { + rating = $("#rating15").val() + } + rpc.query({ + model: 'seller.review', + method: 'rate_review', + args: [{ + 'seller_id': seller_id, + 'customer_id': customer_id, + 'rating': rating, + 'message': message_id + }], + }).then(function(data) { + console.log(data); + }); + swal({ + title: "Rated!", + text: "Thank You For Your Rating!", + icon: "success", + button: "Close!" + }).then(function() { + location.reload(); + }); + } + }); + $("#post_yes").on('click', function() { + var seller_id = $("#seller").val(); + var customer_id = $("#customer").val(); + rpc.query({ + model: 'seller.recommend', + method: 'recommend_func', + args: [{ + 'seller_id': seller_id, + 'customer_id': customer_id, + 'recommend': 'yes', + }], + }).then(function(data) { + swal({ + text: "Thank You!", + button: "Close!", + }); + }); + }); + $("#post_no").on('click', function() { + var seller_id = $("#seller").val(); + var customer_id = $("#customer").val(); + rpc.query({ + model: 'seller.recommend', + method: 'recommend_func', + args: [{ + 'seller_id': seller_id, + 'customer_id': customer_id, + 'recommend': 'no', + }], + }).then(function(data) { + swal({ + text: "Thank You!", + button: "Close!", + }); + }); + }); + }); +}); diff --git a/multi_vendor_marketplace/static/src/js/seller_dashboard_action.js b/multi_vendor_marketplace/static/src/js/seller_dashboard_action.js new file mode 100755 index 000000000..cd9510396 --- /dev/null +++ b/multi_vendor_marketplace/static/src/js/seller_dashboard_action.js @@ -0,0 +1,207 @@ +odoo.define('multi_vendor_marketplace.seller_dashboard_action', function (require){ +"use strict"; +var AbstractAction = require('web.AbstractAction'); +var ControlPanel = require('web.ControlPanel'); +var core = require('web.core'); +var QWeb = core.qweb; +var rpc = require('web.rpc'); +var ajax = require('web.ajax'); +var CustomDashBoard = AbstractAction.extend({ + template: 'SellerDashBoard', + //Set the seller dashboard + start: function() { + var self = this; + console.log("started") + ajax.rpc('/seller_dashboard').then(function (res) { + console.log("ajax done") + $('#pending').text(res.pending) + $('#approved').text(res.approved) + $('#rejected').text(res.rejected) + if(res.user_type == false){ + $('#check_user_type').hide() + } + $("#product_pending").click(function(){ + console.log("product pending") + self.do_action({ + name:'Product Pending', + type: 'ir.actions.act_window', + res_model: 'product.template', + view_mode: 'kanban', + views: [[res.product_kanban_id, 'kanban']], + domain: [['state', '=', 'pending']], + }) + }) + $("#product_approved").click(function(){ + console.log("product approved") + self.do_action({ + name:'Product Approved', + type: 'ir.actions.act_window', + res_model: 'product.template', + view_mode: 'kanban', + views: [[res.product_kanban_id, 'kanban']], + domain: [['state', '=', 'approved']], + }) + }) + $("#product_rejected").click(function(){ + console.log("product rejetced") + self.do_action({ + name:'Product Rejected', + type: 'ir.actions.act_window', + res_model: 'product.template', + view_mode: 'kanban', + views: [[res.product_kanban_id, 'kanban']], + domain: [['state', '=', 'rejected']], + }) + }) + $("#seller_pending").text(res.seller_pending) + $("#seller_approved").text(res.seller_approved) + $("#seller_rejected").text(res.seller_rejected) + $("#inventory_pending").text(res.inventory_pending) + $("#inventory_approved").text(res.inventory_approved) + $("#inventory_rejected").text(res.inventory_rejected) + $("#payment_pending").text(res.payment_pending) + $("#payment_approved").text(res.payment_approved) + $("#payment_rejected").text(res.payment_rejected) + $("#order_pending").text(res.order_pending) + $("#order_approved").text(res.order_approved) + $("#order_shipped").text(res.order_shipped) + $("#order_cancel").text(res.order_cancel) + $("#divseller_rejected").click(function(){ + console.log("seller rejetced") + self.do_action({ + name:'Seller Rejected', + type: 'ir.actions.act_window', + res_model: 'res.partner', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Denied']], + }) + }) + $("#divseller_approved").click(function(){ + console.log("seller approved") + self.do_action({ + name:'Seller Approved', + type: 'ir.actions.act_window', + res_model: 'res.partner', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Approved']], + }) + }) + $("#divseller_pending").click(function(){ + console.log("Seller pending") + self.do_action({ + name:'Seller Pending', + type: 'ir.actions.act_window', + res_model: 'res.partner', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Pending for Approval']], + }) + }) + $("#inv_req_pending").click(function(){ + self.do_action({ + name:'Inventory Request Pending', + type: 'ir.actions.act_window', + res_model: 'inventory.request', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Requested']], + }) + }) + $("#inv_req_approved").click(function(){ + self.do_action({ + name:'Inventory Request Approved', + type: 'ir.actions.act_window', + res_model: 'inventory.request', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Approved']], + }) + }) + $("#inv_req_rejected").click(function(){ + self.do_action({ + name:'Inventory Request Rejected', + type: 'ir.actions.act_window', + res_model: 'inventory.request', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Rejected']], + }) + }) + $("#div_payment_pending").click(function(){ + self.do_action({ + name:'Payment Request Pending', + type: 'ir.actions.act_window', + res_model: 'seller.payment', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Requested']], + }) + }) + $("#div_payment_approved").click(function(){ + self.do_action({ + name:'Payment Request Approved', + type: 'ir.actions.act_window', + res_model: 'seller.payment', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Validated']], + }) + }) + $("#div_payment_rejected").click(function(){ + self.do_action({ + name:'Payment Request Rejected', + type: 'ir.actions.act_window', + res_model: 'seller.payment', + view_mode: 'kanban,form', + views: [[false, 'kanban'],[false, 'form']], + domain: [['state', '=', 'Rejected']], + }) + }) + $("#divorder_pending").click(function(){ + self.do_action({ + name:'Sale Order Pending', + type: 'ir.actions.act_window', + res_model: 'sale.order.line', + view_mode: 'kanban,form', + views: [[res.sale_order_kanban_id, 'kanban'],[res.sale_order_form_id, 'form']], + domain: [['state', '=', 'pending']], + }) + }) + $("#divorder_approved").click(function(){ + self.do_action({ + name:'Sale Order Approved', + type: 'ir.actions.act_window', + res_model: 'sale.order.line', + view_mode: 'kanban,form', + views: [[res.sale_order_kanban_id, 'kanban'],[res.sale_order_form_id, 'form']], + domain: [['state', '=', 'approved']], + }) + }) + $("#divorder_shipped").click(function(){ + self.do_action({ + name:'Sale Order Shipped', + type: 'ir.actions.act_window', + res_model: 'sale.order.line', + view_mode: 'kanban,form', + views: [[res.sale_order_kanban_id, 'kanban'],[res.sale_order_form_id, 'form']], + domain: [['state', '=', 'shipped']], + }) + }) + $("#divorder_cancel").click(function(){ + self.do_action({ + name:'Sale Order cancelled', + type: 'ir.actions.act_window', + res_model: 'sale.order.line', + view_mode: 'kanban,form', + views: [[res.sale_order_kanban_id, 'kanban'],[res.sale_order_form_id, 'form']], + domain: [['state', '=', 'cancel']], + }) + }) + }) + }, +}) +core.action_registry.add('seller_dashboard_tag', CustomDashBoard); +return CustomDashBoard +}) diff --git a/multi_vendor_marketplace/static/src/scss/partner_rating.css b/multi_vendor_marketplace/static/src/scss/partner_rating.css new file mode 100755 index 000000000..b9175c1f1 --- /dev/null +++ b/multi_vendor_marketplace/static/src/scss/partner_rating.css @@ -0,0 +1,532 @@ +.starRating{ + display : inline-block; + position : relative; + height : 24px; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 0; + margin-bottom:10px; + margin-left: 8px; + +} +.starR{ + display : inline-block; + position : relative; + height : 24px; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 0; + margin-bottom:7px; +} +.starRating div{ + float : left; + position : relative; + height : 24px; +} +.starRating input{ + position : relative; + z-index : 1; + width : 24px; + height : 24px; + margin : 0; + padding : 0; + opacity : 0; +} +.starRating label{ + position : absolute; + top : 0; + left : 0; + width : 100%; + height : 24px; +} +.starRating span{ + display : none; +} +.starRating input:checked + label, +.starRating:hover input:checked:hover + label{ + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 -24px; +} +.starRating:hover input:checked + label{ + background : transparent; +} +.starRating:hover input:hover + label{ + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 -48px; +} + +.starRating1{ + display : inline-block; + position : relative; + height : 24px; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 0; + vertical-align : bottom; + float:left; + margin-top:-5px; + +} +.starRating1 div{ + float : left; + position : relative; + height : 24px; +} +.starRating1 input{ + position : relative; + z-index : 1; + width : 24px; + height : 24px; + margin : 0; + padding : 0; + opacity : 0; +} + +.starRating1 label{ + position : absolute; + top : 0; + left : 0px; + width : 100%; + height : 24px; + +} +.starRating1 span{ + display : none; +} +.starRating1 input:checked + label{ + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 -24px; +} + +input:checked + label{ + background : transparent; +} + +.starRating2{ + display : inline-block; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 0; + margin-bottom:5px; + margin-left: 8px; +} +.starRating2 div{ + float : left; +} +.starRating2 input{ + width : 24px; + opacity : 0; +} +.starRating2 label{ + position : absolute; +} +.starRating2 span{ + display : none; +} + +.image_star{ + display : inline-block; + position : relative; + height : 24px; + background : url('/multi_vendor_marketplace/static/src/img/stars1.png') repeat-x 0 -24px; + vertical-align : bottom; + color :white; + width:24px; + top:8px; +} +.rate_effect{ + float:left; + color: #168D93; + font-size:17px; + padding-right: 48px; + width: 180px; +} +.social-button_rate{ + display: inline-block; + height: 25px; + vertical-align: middle; + width: 125px; +} +@media (max-width:500px) + { + .social-button_rate + { + width:300px !important; + margin-left:40px; + } + } +@media (max-width:500px) + { + .social-button + { + float:left; + } + } +.cancel_rating_class{ + width: 16px; + height: 16px; + border:none; + background-color:white; + float:left; + margin-left:4px; + margin-top: 5px; +} + +div.cancel_rating_class, div.cancel_rating_class a{ + background: url("/multi_vendor_marketplace/static/src/img/thumb_icon.png") no-repeat scroll 0 -16px rgba(0, 0, 0, 0); + background-position:0 0; + } + +div.cancel_rating_class:hover{ + background: url("/multi_vendor_marketplace/static/src/img/thumb_icon.png") no-repeat scroll 0 -16px rgba(0, 0, 0, 0); + background-position:0 0px; +} +/*---------------------------------average star----------------------------------------*/ +span.stars, span.stars span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; +} +span.stars span { + background-position: 0 0; +} +span.stars3, span.stars span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; +} +span.stars3 span { + background-position: 0 0; +} + + +span.stars4, span.stars4 span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; + margin-top:10px; +} +span.stars4 span { + background-position: 0 0; +} + + + +span.stars3, span.stars3 span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; + +} + +span.stars4 span { + background-position: 0 0; +} + +span.stars3, span.stars3 span { + background: url("/multi_vendor_marketplace/static/src/img/stars11.png") repeat-x scroll 0 -46px rgba(0, 0, 0, 0); + display: block; + height:18px; + width: 85px; + margin: 0 auto; + padding-right: 43px; + +} +span.stars3 span { + background-position: 0 0; +} +/*---------------------------------------blog short--------------------------------------------*/ +.rate_format_short{ + margin-bottom: -10px;margin-bottom: -10px; + float:right; + margin-right: 139px; + margin-top: -7px; + width: 250px; +} +/*------------------------------------pager-------------------------------------------------*/ +.jPaginate{ + height:34px; + position:relative; + color:#168D93; + font-size:small; + width:100%; +} +.jPaginate a{ + line-height:15px; + height:18px; + cursor:pointer; + padding:1px 5px 10px; + margin:2px; + margin-top:5px; + text-decoration:none; + float:left; + } +.jPag-control-back{ + position:absolute; + left:0px; +} + +.jPag-control-front{ + position:absolute; + top:0px; +} +.jPaginate span{ + cursor:pointer; +} +ul.jPag-pages{ + float:left; + list-style-type:none; + margin:0px 0px 0px 0px; + padding:0px; +} +ul.jPag-pages li{ + display:inline; + float:left; + padding:0px; + margin:0px; +} +ul.jPag-pages li a{ + float:left; + padding:2px 5px; + +} +span.jPag-current{ + cursor:default; + font-weight:normal; + line-height:15px; + height:18px; + padding:2px 5px; + margin:2px; + margin-top:5px; + float:left; +} +ul.jPag-pages li span.jPag-previous, +ul.jPag-pages li span.jPag-next, +span.jPag-sprevious, +span.jPag-snext, +ul.jPag-pages li span.jPag-previous-img, +ul.jPag-pages li span.jPag-next-img, +span.jPag-sprevious-img, +span.jPag-snext-img{ + height:22px; + margin:2px; + float:left; + line-height:18px; +} + +ul.jPag-pages li span.jPag-previous, +ul.jPag-pages li span.jPag-previous-img{ + margin:2px 0px 2px 2px; + font-size:12px; + font-weight:bold; + width:10px; + +} +ul.jPag-pages li span.jPag-next, +ul.jPag-pages li span.jPag-next-img{ + margin:2px 2px 2px 0px; + font-size:12px; + font-weight:bold; + width:10px; +} +span.jPag-sprevious, +span.jPag-sprevious-img{ + margin:2px 0px 2px 2px; + font-size:18px; + width:15px; + text-align:right; +} +span.jPag-snext, +span.jPag-snext-img{ + margin:2px 2px 2px 0px; + font-size:18px; + width:15px; + text-align:right; +} +ul.jPag-pages li span.jPag-previous-img{ + background:transparent url(/website_ept/static/src/img/pager/previous.png) no-repeat center right; + } +ul.jPag-pages li span.jPag-next-img{ + background:transparent url(/website_ept/static/src/img/pager/next.png) no-repeat center left; + } +span.jPag-sprevious-img{ + background:transparent url(/website_ept/static/src/img/pager/sprevious.png) no-repeat center right; + } +span.jPag-snext-img{ + background:transparent url(/website_ept/static/src/img/pager/snext.png) no-repeat center left; + } + + + +---------------------------------shop-----------------------------------------------*/ +.class_href1_shop{ + margin-top:-20px; +} +.alert_form_class{ + display:none; +} +.form_shop{ +width:500px; +display: none; +background-color:white; +overflow:hidden; +padding:15px; +box-shadow: 0 5px 9px -7px #168D93 inset, 0 -3px 9px -7px #168D93 inset; +} +@media (max-width:500px) +{ + .form_shop{ + width:200px !important; + } +} +@media (max-width:1000px) +{ + .form_shop{ + width:400px !important; + } +} +.input_class{ + width:350px; +} +@media (max-width:500px) +{ + .input_class{ + width:170px !important; + } +} +@media (max-width:1000px) +{ + .input_class{ + width:300px !important; + } +} +.input_shop +{ +margin-left:50px; +} +.class_href1_shop +{ +color:black; +padding:10px 10px 9px; +font-size:17px; +font-weight:bold; +} +.oe_product .oe_product_image img +{ +position:relative !important; + +} +.rate_format +{ + +display:inline-block; +margin: 0px auto; + +} +.stars3 > span +{ +padding:0px !important; +margin:0px !important; +} +.stars4 > span +{ +padding:0px !important; +margin:0px !important; +} +.oe_product .oe_product_image +{ +left:0px !important; +right:0px !important; +top:0px !important; + +bottom: 55px !important; +text-align: center !important; +} +.posted_on_product_rate_date +{ +font-size:14px; +color: gainsboro; +} +.css_product_long +{ +width: 100%; +display: inline-block; +font-style:italic; +font-size: 14px; +color: aliceblue; +padding-top:10px; + +} +.css_poduct_long >p +{ +margin:0px !important; +} +.review_class_rating +{ +font-size:13px; + +} +.media:first-child +{ +margin-top:10px !important; + +} + + +.medianew +{ +margin-top:10px !important; +background-color: #878787; +padding: 17px; +display: inline-block; +width: 100%; +box-shadow: 0 13px 8px -5px #777; +margin-top: 20px !important; +} + +.product_short +{ +font-weight:bold; +color:white; +margin-bottom:7px; +font-size:16px; +} +form >.media +{ +background-color:transparent !important; +box-shadow:0px 0px 0px 0px !important; +} +.post_your_review +{ +font-size:22px; +margin-top:20px; +margin-bottom:-32px; +color: black; +font-weight: 600; + +} +#demo5 +{ +margin-top:20px; +} +.mb32 +{ +margin-top:0px; +border: 0px !important; +} +div +{ +} +.whole_rate_format_class +{ +display: inline-block; +width: 100%; +background-color: rgba(204, 204, 204,0.6); +} + +.h1 +{ +width:100%; +display:inline-block; +} diff --git a/multi_vendor_marketplace/static/src/xml/saller_dashboard.xml b/multi_vendor_marketplace/static/src/xml/saller_dashboard.xml new file mode 100755 index 000000000..682768e5b --- /dev/null +++ b/multi_vendor_marketplace/static/src/xml/saller_dashboard.xml @@ -0,0 +1,199 @@ + + diff --git a/multi_vendor_marketplace/views/account_payment_method_views.xml b/multi_vendor_marketplace/views/account_payment_method_views.xml new file mode 100644 index 000000000..f05e8965b --- /dev/null +++ b/multi_vendor_marketplace/views/account_payment_method_views.xml @@ -0,0 +1,17 @@ + + + + + Payment Methods + account.payment.method + tree,form + +

Payment Methods

+
+
+ + +
diff --git a/multi_vendor_marketplace/views/helpful_info_views.xml b/multi_vendor_marketplace/views/helpful_info_views.xml new file mode 100644 index 000000000..3acab74e8 --- /dev/null +++ b/multi_vendor_marketplace/views/helpful_info_views.xml @@ -0,0 +1,16 @@ + + + + + helpful.info.view.form + helpful.info + +
+ + + + +
+
+
+
diff --git a/multi_vendor_marketplace/views/inventory_request_views.xml b/multi_vendor_marketplace/views/inventory_request_views.xml new file mode 100755 index 000000000..f60390707 --- /dev/null +++ b/multi_vendor_marketplace/views/inventory_request_views.xml @@ -0,0 +1,104 @@ + + + + + Update Marketplace Product Quantity + + inventory.request + kanban,tree,form + +

Update Marketplace + Product Quantity +

+
+
+ + + inventory.request.view.form + inventory.request + +
+
+
+ + + + + + + + + + + +
+
+
+ + + inventory.request.view.kanban + inventory.request + + + + +
+
+ +
+ + +
+
+
+
+ Location: + +
+ quantity: + +
+
+ Create Date: + +
+
+
+ Seller: + +
+
+
+
+
+
+
+
+ + +
diff --git a/multi_vendor_marketplace/views/multi_vendor_marketplace_menus.xml b/multi_vendor_marketplace/views/multi_vendor_marketplace_menus.xml new file mode 100755 index 000000000..404021030 --- /dev/null +++ b/multi_vendor_marketplace/views/multi_vendor_marketplace_menus.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + diff --git a/multi_vendor_marketplace/views/multi_vendor_pricelist_views.xml b/multi_vendor_marketplace/views/multi_vendor_pricelist_views.xml new file mode 100755 index 000000000..03b28636b --- /dev/null +++ b/multi_vendor_marketplace/views/multi_vendor_pricelist_views.xml @@ -0,0 +1,17 @@ + + + + + multi.vendor.pricelist.view.tree + multi.vendor.pricelist + + + + + + + + + + + diff --git a/multi_vendor_marketplace/views/product_product_views.xml b/multi_vendor_marketplace/views/product_product_views.xml new file mode 100644 index 000000000..1dddd9bbf --- /dev/null +++ b/multi_vendor_marketplace/views/product_product_views.xml @@ -0,0 +1,71 @@ + + + + + product.product.view.kanban + product.product + + + + +
+
+ +
+
+
+
+
+ + + + [ + + ] + + +
+ +
+
+
+ Price: + +
+ State: + +
+ Seller + +
+
+
+
+
+
+
+
+ + + Product Varients + product.product + kanban + + + + + + +
diff --git a/multi_vendor_marketplace/views/product_public_category_views.xml b/multi_vendor_marketplace/views/product_public_category_views.xml new file mode 100644 index 000000000..d1870d4b5 --- /dev/null +++ b/multi_vendor_marketplace/views/product_public_category_views.xml @@ -0,0 +1,18 @@ + + + + + Category + product.public.category + tree,form + +

Category +

+
+
+ + +
diff --git a/multi_vendor_marketplace/views/product_template_views.xml b/multi_vendor_marketplace/views/product_template_views.xml new file mode 100644 index 000000000..0628b968a --- /dev/null +++ b/multi_vendor_marketplace/views/product_template_views.xml @@ -0,0 +1,225 @@ + + + + + product.template.view.form + product.template + +
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + multi.vendor.sellers.view.kanban + res.partner + + + + + +
+
+ +
+
+
+
+
+ + + +
+
+ Commission: + +
+ Status: + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
diff --git a/multi_vendor_marketplace/views/sale_order_line_views.xml b/multi_vendor_marketplace/views/sale_order_line_views.xml new file mode 100755 index 000000000..23551de39 --- /dev/null +++ b/multi_vendor_marketplace/views/sale_order_line_views.xml @@ -0,0 +1,138 @@ + + + + + sale.order.line.view.form + + sale.order.line + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + sale.order.line.view.search + sale.order.line + + + + + + + + + + + + multi.vendor.sale.order.line.kanban + sale.order.line + + + + +
+
+ +
+
+
+
+
+ + + +
+
+
+ State: + +
+ Seller: + + + +
+
+ Total price: + + + +
+
+
+
+
+
+
+
+ + + Sale Order + sale.order.line + kanban,form + {'search_default_state_pending': 1} + [('order_id.website_id','!=',False)] + + + + + +
diff --git a/multi_vendor_marketplace/views/sale_order_views.xml b/multi_vendor_marketplace/views/sale_order_views.xml new file mode 100755 index 000000000..e65bf8ca8 --- /dev/null +++ b/multi_vendor_marketplace/views/sale_order_views.xml @@ -0,0 +1,128 @@ + + + + + Order Analysis + ir.actions.act_window + sale.order + graph,tree,form + + + + + + sale.order.view.graph + sale.order + graph + + + + + + + + + + + sale.order.View.kanban + sale.order + + + + +
+
+ +
+
+
+
+
+ + + +
+
+
+ State: + +
+ Seller: + + + +
+
+ Unit price: + + + +
+
+
+
+
+
+
+
+ + + sale.order.view.form + sale.order + +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + Sale Order + sale.order + kanban,form + [('website_id','!=',False)] + + +
diff --git a/multi_vendor_marketplace/views/sell_page_templates.xml b/multi_vendor_marketplace/views/sell_page_templates.xml new file mode 100755 index 000000000..e5a0df448 --- /dev/null +++ b/multi_vendor_marketplace/views/sell_page_templates.xml @@ -0,0 +1,143 @@ + + + + + + diff --git a/multi_vendor_marketplace/views/seller_list_templates.xml b/multi_vendor_marketplace/views/seller_list_templates.xml new file mode 100755 index 000000000..31818e7d3 --- /dev/null +++ b/multi_vendor_marketplace/views/seller_list_templates.xml @@ -0,0 +1,163 @@ + + + + + diff --git a/multi_vendor_marketplace/views/seller_payment_views.xml b/multi_vendor_marketplace/views/seller_payment_views.xml new file mode 100755 index 000000000..9711d9c4c --- /dev/null +++ b/multi_vendor_marketplace/views/seller_payment_views.xml @@ -0,0 +1,104 @@ + + + + + Seller Payment + seller.payment + {'search_default_seller': 1} + tree,form + +

Seller's Payment

+
+
+ + + seller.payment.view.tree + seller.payment + + + + + + + + + + + + + + + + Seller Payment + seller.payment + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + Payment Search + seller.payment + + + + + + + + + + + seller reference + seller.payment + SP + 5 + + + +
diff --git a/multi_vendor_marketplace/views/seller_product_templates.xml b/multi_vendor_marketplace/views/seller_product_templates.xml new file mode 100755 index 000000000..9ba7b8f46 --- /dev/null +++ b/multi_vendor_marketplace/views/seller_product_templates.xml @@ -0,0 +1,1008 @@ + + + +