diff --git a/product_visibility_website/README.rst b/product_visibility_website/README.rst new file mode 100644 index 000000000..f5f3dcd19 --- /dev/null +++ b/product_visibility_website/README.rst @@ -0,0 +1,36 @@ +============================ +Website Product Visibility +============================ +This module helps you to make visible only the filtered products and +product categories for a logged in and logged out users/visitors.Also, +it enables the user to search products and product categories only from +those available products and categories. . +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/13.0/setup/install.html +- Install our custom addon + +Developer: Shijin V @Cybrosys + V14: Muhammed Nafih @Cybrosys + V15: Neeraj @Cybrosys + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Credits +======= +* Cybrosys Techno Solutions + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. + diff --git a/product_visibility_website/__init__.py b/product_visibility_website/__init__.py new file mode 100644 index 000000000..ec25d99be --- /dev/null +++ b/product_visibility_website/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies (). +# Author: Shijin V () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import controllers +from . import models diff --git a/product_visibility_website/__manifest__.py b/product_visibility_website/__manifest__.py new file mode 100644 index 000000000..64d728cf0 --- /dev/null +++ b/product_visibility_website/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies (). +# Author: Neeraj Krishnan V M () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +{ + 'name': 'Website Product Visibility', + 'summary': 'Website Product visibility for Users', + 'version': '15.0.1.0.0', + 'description': """Website Product visibility for Users""", + 'author': 'Cybrosys Techno Solution', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'category': 'Website', + 'depends': ['contacts', 'website_sale'], + 'data': [ + 'views/website_product_visibility.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/product_visibility_website/controllers/__init__.py b/product_visibility_website/controllers/__init__.py new file mode 100644 index 000000000..9cd3e8212 --- /dev/null +++ b/product_visibility_website/controllers/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies (). +# Author: Neeraj Krishnan V M () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import main diff --git a/product_visibility_website/controllers/main.py b/product_visibility_website/controllers/main.py new file mode 100644 index 000000000..8368c4202 --- /dev/null +++ b/product_visibility_website/controllers/main.py @@ -0,0 +1,332 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies (). +# Author: Neeraj Krishnan V M () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from werkzeug.exceptions import NotFound +from odoo.addons.http_routing.models.ir_http import slug +from odoo.addons.website.controllers.main import QueryURL +from odoo.addons.website_sale.controllers.main import TableCompute +from odoo import http +from ast import literal_eval +from odoo.http import request +from odoo.addons.website.models.ir_http import sitemap_qs2dom +from odoo.addons.website_sale.controllers.main import WebsiteSale + +from odoo.osv import expression + + + +class ProductVisibilityCon(WebsiteSale): + + def sitemap_shop(env, rule, qs): + if not qs or qs.lower() in '/shop': + yield {'loc': '/shop'} + category = env['product.public.category'] + dom = sitemap_qs2dom(qs, '/shop/category', category._rec_name) + dom += env['website'].get_current_website().website_domain() + for cat in category.search(dom): + loc = '/shop/category/%s' % slug(cat) + if not qs or qs.lower() in loc: + yield {'loc': loc} + + def reset_domain(self, search, categories, available_products, attrib_values, search_in_description=True): + ''' + Function returns a domain consist of filter conditions + :param search: search variable + :param categories: list of category available + :param available_products: list of available product ids from product.template + :param attrib_values:product attiribute values + :param search_in_description: boolean filed showing there is search variable exist or not''' + + domains = [request.website.sale_product_domain()] + if search: + for srch in search.split(" "): + subdomains = [ + [('name', 'ilike', srch)], + [('product_variant_ids.default_code', 'ilike', srch)] + ] + if search_in_description: + subdomains.append([('description', 'ilike', srch)]) + subdomains.append([('description_sale', 'ilike', srch)]) + domains.append(expression.OR(subdomains)) + if available_products: + domains.append([('id', 'in', available_products.ids)]) + if categories: + domains.append([('public_categ_ids', 'child_of', categories.ids)]) + if attrib_values: + print("hello world....") + # attrib = None + # ids = [] + # print("hello...", ids) + # for value in attrib_values: + # if not attrib: + # attrib = value[0] + # ids.append(value[1]) + # elif value[0] == attrib: + # ids.append(value[1]) + # else: + # domains.append([('attribute_line_ids.value_ids', 'in', ids)]) + # attrib = value[0] + # ids = [value[1]] + # if attrib: + # domains.append([('attribute_line_ids.value_ids', 'in', ids)]) + + return expression.AND(domains) + + @http.route([ + '''/shop''', + '''/shop/page/''', + '''/shop/category/''', + '''/shop/category//page/''' + ], type='http', auth="public", website=True, sitemap=sitemap_shop) + def shop(self, page=0, category=None, search='', ppg=False, **post): + ''''Override shop function.''' + available_categ = available_products = '' + user = request.env['res.users'].sudo().search([('id', '=', request.env.user.id)]) + if not user: + mode = request.env['ir.config_parameter'].sudo().get_param('filter_mode') + products = literal_eval(request.env['ir.config_parameter'].sudo().get_param('website_product_visibility.available_product_ids', 'False')) + if mode == 'product_only': + available_products = request.env['product.template'].search([('id', 'in', products)]) + cat = literal_eval(request.env['ir.config_parameter'].sudo().get_param('website_product_visibility.available_cat_ids', 'False')) + available_categ = request.env['product.public.category'].search([('id', 'in', cat)]) + else: + partner = request.env['res.partner'].sudo().search([('id', '=', user.partner_id.id)]) + mode = partner.filter_mode + if mode == 'product_only': + available_products = self.availavle_products() + available_categ = partner.website_available_cat_ids + + Category_avail = [] + Category = request.env['product.public.category'] + + for ids in available_categ: + if not ids.parent_id.id in available_categ.ids: + Category_avail.append(ids.id) + categ = request.env['product.public.category'].search([('id', 'in', Category_avail)]) + if mode == 'product_only': + categ = Category.search([('parent_id', '=', False), ('product_tmpl_ids', 'in', available_products.ids)]) + + # supering shop*** + + if not available_categ and not available_products: + return super(ProductVisibilityCon, self).shop(page, category, search, ppg, **post) + add_qty = int(post.get('add_qty', 1)) + + if category: + category = Category.search([('id', '=', int(category))], limit=1) + if not category or not category.can_access_from_current_website(): + raise NotFound() + else: + category = Category + + if ppg: + try: + ppg = int(ppg) + post['ppg'] = ppg + except ValueError: + ppg = False + if not ppg: + ppg = request.env['website'].get_current_website().shop_ppg or 20 + ppr = request.env['website'].get_current_website().shop_ppr or 4 + attrib_list = request.httprequest.args.getlist('attrib') + attrib_values = [[int(x) for x in v.split("-")] for v in attrib_list if v] + attributes_ids = {v[0] for v in attrib_values} + attrib_set = {v[1] for v in attrib_values} + domain = self._get_search_domain(search, category, attrib_values) + Product = request.env['product.template'].with_context(bin_size=True) + if available_products: + domain_pro = self.reset_domain(search, category, available_products, attrib_values) + Product = Product.search(domain_pro) + keep = QueryURL('/shop', category=category and int(category), search=search, attrib=attrib_list, + order=post.get('order')) + pricelist_context, pricelist = self._get_pricelist_context() + request.context = dict(request.context, pricelist=pricelist.id, partner=request.env.user.partner_id) + url = "/shop" + if search: + post["search"] = search + if attrib_list: + post['attrib'] = attrib_list + if not category: + domain = self.reset_domain(search, available_categ, available_products, attrib_values) + search_product = Product.search(domain) + website_domain = request.website.website_domain() + categs_domain = [('parent_id', '=', False), ('product_tmpl_ids', 'in', search_product.ids)] + website_domain + if search: + search_categories = Category.search( + [('product_tmpl_ids', 'in', search_product.ids)] + website_domain).parents_and_self + categs_domain.append(('id', 'in', search_categories.ids)) + else: + search_categories = available_categ + if category: + url = "/shop/category/%s" % slug(category) + product_count = len(search_product) + pager = request.website.pager(url=url, total=product_count, page=page, step=ppg, scope=7, url_args=post) + products = Product.search(domain, limit=ppg, offset=pager['offset'], order=self._get_search_order(post)) + if not category: + if available_products: + products = Product.search(domain_pro, limit=ppg, offset=pager['offset'], + order=self._get_search_order(post)) + else: + products = Product.search(domain, limit=ppg, offset=pager['offset'], + order=self._get_search_order(post)) + else: + if available_products: + products = Product.search(domain_pro, limit=ppg, offset=pager['offset'], + order=self._get_search_order(post)) + else: + products = Product.search(domain, limit=ppg, offset=pager['offset'], + order=self._get_search_order(post)) + ProductAttribute = request.env['product.attribute'] + if products: + # get all products without limit + attributes = ProductAttribute.search([('product_tmpl_ids', 'in', search_product.ids)]) + else: + attributes = ProductAttribute.browse(attributes_ids) + + layout_mode = request.session.get('website_sale_shop_layout_mode') + if not layout_mode: + if request.website.viewref('website_sale.products_list_view').active: + layout_mode = 'list' + else: + layout_mode = 'grid' + values = { + 'search': search, + 'category': category, + 'attrib_values': attrib_values, + 'attrib_set': attrib_set, + 'pager': pager, + 'pricelist': pricelist, + 'add_qty': add_qty, + 'products': products, + 'search_count': product_count, # common for all searchbox + 'bins': TableCompute().process(products, ppg, ppr), + 'ppg': ppg, + 'ppr': ppr, + 'categories': categ, + 'attributes': attributes, + 'keep': keep, + 'search_categories_ids': categ.ids, + 'layout_mode': layout_mode, + } + + if category: + values['main_object'] = category + return request.render("website_sale.products", values) + + def availavle_products(self): + ''''Returns the available product (product.template) ids''' + user = request.env['res.users'].sudo().search([('id', '=', request.env.user.id)]) + partner = request.env['res.partner'].sudo().search([('id', '=', user.partner_id.id)]) + return partner.website_available_product_ids + + # -------------------------------------------------------------------------- + # Products Search Bar + # -------------------------------------------------------------------------- + + @http.route('/shop/products/autocomplete', type='json', auth='public', website=True) + def products_autocomplete(self, term, options={}, **kwargs): + """ + Returns list of products according to the term and product options + + Params: + term (str): search term written by the user + options (dict) + - 'limit' (int), default to 5: number of products to consider + - 'display_description' (bool), default to True + - 'display_price' (bool), default to True + - 'order' (str) + - 'max_nb_chars' (int): max number of characters for the + description if returned + + Returns: + dict (or False if no result) + - 'products' (list): products (only their needed field values) + note: the prices will be strings properly formatted and + already containing the currency + - 'products_count' (int): the number of products in the database + that matched the search query + """ + + user = request.env['res.users'].sudo().search([('id', '=', request.env.user.id)]) + available_categ = available_products = '' + if not user: + mode = request.env['ir.config_parameter'].sudo().get_param('filter_mode') + products = literal_eval( + request.env['ir.config_parameter'].sudo().get_param('website_product_visibility.available_product_ids', + 'False')) + if mode == 'product_only': + available_products = request.env['product.template'].search([('id', 'in', products)]) + cat = literal_eval( + request.env['ir.config_parameter'].sudo().get_param('website_product_visibility.available_cat_ids', + 'False')) + available_categ = request.env['product.public.category'].search([('id', 'in', cat)]) + else: + partner = request.env['res.partner'].sudo().search([('id', '=', user.partner_id.id)]) + mode = partner.filter_mode + if mode != 'categ_only': + available_products = self.availavle_products() + available_categ = partner.website_available_cat_ids + ProductTemplate = request.env['product.template'] + display_description = options.get('display_description', True) + display_price = options.get('display_price', True) + order = self._get_search_order(options) + max_nb_chars = options.get('max_nb_chars', 999) + category = options.get('category') + attrib_values = options.get('attrib_values') + + if not available_products and not available_categ: + domain = self._get_search_domain(term, category, attrib_values, display_description) + else: + domain = self.reset_domain(term,available_categ, available_products, attrib_values,display_description) + products = ProductTemplate.search( + domain, + limit=min(20, options.get('limit', 5)), + order=order + ) + fields = ['id', 'name', 'website_url'] + if display_description: + fields.append('description_sale') + + res = { + 'products': products.read(fields), + 'products_count': ProductTemplate.search_count(domain), + } + + if display_description: + for res_product in res['products']: + desc = res_product['description_sale'] + if desc and len(desc) > max_nb_chars: + res_product['description_sale'] = "%s..." % desc[:(max_nb_chars - 3)] + + if display_price: + FieldMonetary = request.env['ir.qweb.field.monetary'] + monetary_options = { + 'display_currency': request.website.get_current_pricelist().currency_id, + } + for res_product, product in zip(res['products'], products): + combination_info = product._get_combination_info(only_template=True) + res_product.update(combination_info) + res_product['list_price'] = FieldMonetary.value_to_html(res_product['list_price'], monetary_options) + res_product['price'] = FieldMonetary.value_to_html(res_product['price'], monetary_options) + + return res diff --git a/product_visibility_website/doc/RELEASE_NOTES.md b/product_visibility_website/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..f9b308e03 --- /dev/null +++ b/product_visibility_website/doc/RELEASE_NOTES.md @@ -0,0 +1,9 @@ +## Module + +#### 31.01.2021 +#### Version 15.0.1.0.0 +##### ADD + + + + diff --git a/product_visibility_website/models/__init__.py b/product_visibility_website/models/__init__.py new file mode 100644 index 000000000..d6bd6554a --- /dev/null +++ b/product_visibility_website/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies (). +# Author: Neeraj Krishnan V M () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import website_product_visibility diff --git a/product_visibility_website/models/website_product_visibility.py b/product_visibility_website/models/website_product_visibility.py new file mode 100644 index 000000000..c6b2b3afb --- /dev/null +++ b/product_visibility_website/models/website_product_visibility.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies (). +# Author: Neeraj Krishnan V M() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from odoo import fields, models, api +from ast import literal_eval + + +class ProductVisibility(models.Model): + _inherit = 'res.partner' + + filter_mode = fields.Selection([('null', 'No Filter'), ('product_only', 'Product Wise'), + ('categ_only', 'Category Wise')], string='Filter Mode', default='null') + website_available_product_ids = fields.Many2many('product.template', string='Available Product', + domain="[('is_published', '=', True)]", + help='The website will only display products which are within one ' + 'of the selected category trees. If no category is specified,' + ' all available products will be shown') + website_available_cat_ids = fields.Many2many('product.public.category', string='Available Product Categories', + help='The website will only display products which are selected.' + ' If no product is specified,' + ' all available products will be shown') + + @api.onchange("filter_mode") + def onchange_filter_mod(self): + if self.filter_mode == 'null': + self.website_available_cat_ids = None + self.website_available_product_ids = None + +class WebsiteGuestVisibility(models.TransientModel): + _inherit = 'res.config.settings' + + product_visibility_guest_user = fields.Boolean(string="Product visibility Guest User") + filter_mode = fields.Selection([('product_only', 'Product Wise'), + ('categ_only', 'Category Wise')], string='Filter Mode', default='product_only') + + available_product_ids = fields.Many2many('product.template', string='Available Product', + domain="[('is_published', '=', True)]", + help='The website will only display products which are within one ' + 'of the selected category trees. If no category is specified,' + ' all available products will be shown') + available_cat_ids = fields.Many2many('product.public.category', string='Available Product Categories', + help='The website will only display products which are selected.' + ' If no product is specified,' + ' all available products will be shown') + + @api.model + def set_values(self): + res = super(WebsiteGuestVisibility, self).set_values() + self.env['ir.config_parameter'].sudo().set_param('product_visibility_guest_user', + self.product_visibility_guest_user) + self.env['ir.config_parameter'].sudo().set_param('filter_mode', self.filter_mode) + if not self.product_visibility_guest_user: + self.available_cat_ids = None + self.available_product_ids = None + self.env['ir.config_parameter'].sudo().set_param('filter_mode','product_only') + if self.filter_mode == 'product_only': + self.available_cat_ids = None + elif self.filter_mode == 'categ_only': + self.available_product_ids = None + + self.env['ir.config_parameter'].sudo().set_param('website_product_visibility.available_product_ids', + self.available_product_ids.ids) + self.env['ir.config_parameter'].sudo().set_param('website_product_visibility.available_cat_ids', + self.available_cat_ids.ids) + return res + + @api.model + def get_values(self): + res = super(WebsiteGuestVisibility, self).get_values() + product_ids = literal_eval(self.env['ir.config_parameter'].sudo().get_param('website_product_visibility.available_product_ids', 'False')) + cat_ids = literal_eval(self.env['ir.config_parameter'].sudo().get_param('website_product_visibility.available_cat_ids', 'False')) + mod = self.env['ir.config_parameter'].sudo().get_param('filter_mode') + res.update( + product_visibility_guest_user=self.env['ir.config_parameter'].sudo().get_param( + 'product_visibility_guest_user'), + filter_mode=mod if mod else 'product_only', + available_product_ids=[(6, 0, product_ids)], + available_cat_ids=[(6, 0, cat_ids)], + ) + return res diff --git a/product_visibility_website/static/description/assets/icons/check.png b/product_visibility_website/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/check.png differ diff --git a/product_visibility_website/static/description/assets/icons/chevron.png b/product_visibility_website/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/chevron.png differ diff --git a/product_visibility_website/static/description/assets/icons/cogs.png b/product_visibility_website/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/cogs.png differ diff --git a/product_visibility_website/static/description/assets/icons/consultation.png b/product_visibility_website/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/consultation.png differ diff --git a/product_visibility_website/static/description/assets/icons/ecom-black.png b/product_visibility_website/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/ecom-black.png differ diff --git a/product_visibility_website/static/description/assets/icons/education-black.png b/product_visibility_website/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/education-black.png differ diff --git a/product_visibility_website/static/description/assets/icons/hotel-black.png b/product_visibility_website/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/hotel-black.png differ diff --git a/product_visibility_website/static/description/assets/icons/license.png b/product_visibility_website/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/license.png differ diff --git a/product_visibility_website/static/description/assets/icons/lifebuoy.png b/product_visibility_website/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/lifebuoy.png differ diff --git a/product_visibility_website/static/description/assets/icons/logo.png b/product_visibility_website/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/logo.png differ diff --git a/product_visibility_website/static/description/assets/icons/manufacturing-black.png b/product_visibility_website/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_visibility_website/static/description/assets/icons/pos-black.png b/product_visibility_website/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/pos-black.png differ diff --git a/product_visibility_website/static/description/assets/icons/puzzle.png b/product_visibility_website/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/puzzle.png differ diff --git a/product_visibility_website/static/description/assets/icons/restaurant-black.png b/product_visibility_website/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/restaurant-black.png differ diff --git a/product_visibility_website/static/description/assets/icons/service-black.png b/product_visibility_website/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/service-black.png differ diff --git a/product_visibility_website/static/description/assets/icons/trading-black.png b/product_visibility_website/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/trading-black.png differ diff --git a/product_visibility_website/static/description/assets/icons/training.png b/product_visibility_website/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/training.png differ diff --git a/product_visibility_website/static/description/assets/icons/update.png b/product_visibility_website/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/update.png differ diff --git a/product_visibility_website/static/description/assets/icons/user.png b/product_visibility_website/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/user.png differ diff --git a/product_visibility_website/static/description/assets/icons/wrench.png b/product_visibility_website/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_visibility_website/static/description/assets/icons/wrench.png differ diff --git a/product_visibility_website/static/description/assets/modules/1.png b/product_visibility_website/static/description/assets/modules/1.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/product_visibility_website/static/description/assets/modules/1.png differ diff --git a/product_visibility_website/static/description/assets/modules/2.png b/product_visibility_website/static/description/assets/modules/2.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/product_visibility_website/static/description/assets/modules/2.png differ diff --git a/product_visibility_website/static/description/assets/modules/3.png b/product_visibility_website/static/description/assets/modules/3.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/product_visibility_website/static/description/assets/modules/3.png differ diff --git a/product_visibility_website/static/description/assets/modules/4.png b/product_visibility_website/static/description/assets/modules/4.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/product_visibility_website/static/description/assets/modules/4.png differ diff --git a/product_visibility_website/static/description/assets/modules/5.png b/product_visibility_website/static/description/assets/modules/5.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/product_visibility_website/static/description/assets/modules/5.png differ diff --git a/product_visibility_website/static/description/assets/modules/6.png b/product_visibility_website/static/description/assets/modules/6.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/product_visibility_website/static/description/assets/modules/6.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/hero.png b/product_visibility_website/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..7d83121b3 Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/hero.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn1.png b/product_visibility_website/static/description/assets/screenshots/scrn1.png new file mode 100644 index 000000000..462407dbd Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn1.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn10.png b/product_visibility_website/static/description/assets/screenshots/scrn10.png new file mode 100644 index 000000000..5f67bf6a5 Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn10.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn2.png b/product_visibility_website/static/description/assets/screenshots/scrn2.png new file mode 100644 index 000000000..54628a8dd Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn2.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn3.png b/product_visibility_website/static/description/assets/screenshots/scrn3.png new file mode 100644 index 000000000..626c16571 Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn3.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn4.png b/product_visibility_website/static/description/assets/screenshots/scrn4.png new file mode 100644 index 000000000..01bf06e39 Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn4.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn5.png b/product_visibility_website/static/description/assets/screenshots/scrn5.png new file mode 100644 index 000000000..85befd215 Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn5.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn6.png b/product_visibility_website/static/description/assets/screenshots/scrn6.png new file mode 100644 index 000000000..263c5679a Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn6.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn7.png b/product_visibility_website/static/description/assets/screenshots/scrn7.png new file mode 100644 index 000000000..fc9ee5ed3 Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn7.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn8.png b/product_visibility_website/static/description/assets/screenshots/scrn8.png new file mode 100644 index 000000000..e78a07031 Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn8.png differ diff --git a/product_visibility_website/static/description/assets/screenshots/scrn9.png b/product_visibility_website/static/description/assets/screenshots/scrn9.png new file mode 100644 index 000000000..21744894f Binary files /dev/null and b/product_visibility_website/static/description/assets/screenshots/scrn9.png differ diff --git a/product_visibility_website/static/description/banner.png b/product_visibility_website/static/description/banner.png new file mode 100644 index 000000000..b4c3395f7 Binary files /dev/null and b/product_visibility_website/static/description/banner.png differ diff --git a/product_visibility_website/static/description/icon.png b/product_visibility_website/static/description/icon.png new file mode 100644 index 000000000..de7138f58 Binary files /dev/null and b/product_visibility_website/static/description/icon.png differ diff --git a/product_visibility_website/static/description/images/checked.png b/product_visibility_website/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/product_visibility_website/static/description/images/checked.png differ diff --git a/product_visibility_website/static/description/images/cybrosys.png b/product_visibility_website/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/product_visibility_website/static/description/images/cybrosys.png differ diff --git a/product_visibility_website/static/description/images/odoo-powr-countdown-timer-12.0.1.0.zip b/product_visibility_website/static/description/images/odoo-powr-countdown-timer-12.0.1.0.zip new file mode 100644 index 000000000..54b4beb1f Binary files /dev/null and b/product_visibility_website/static/description/images/odoo-powr-countdown-timer-12.0.1.0.zip differ diff --git a/product_visibility_website/static/description/images/product_brand_ecommerce.png b/product_visibility_website/static/description/images/product_brand_ecommerce.png new file mode 100644 index 000000000..2ac89b363 Binary files /dev/null and b/product_visibility_website/static/description/images/product_brand_ecommerce.png differ diff --git a/product_visibility_website/static/description/images/product_brand_ecommerce.png~ b/product_visibility_website/static/description/images/product_brand_ecommerce.png~ new file mode 100644 index 000000000..4a3246e78 Binary files /dev/null and b/product_visibility_website/static/description/images/product_brand_ecommerce.png~ differ diff --git a/product_visibility_website/static/description/images/scrn1.png b/product_visibility_website/static/description/images/scrn1.png new file mode 100644 index 000000000..462407dbd Binary files /dev/null and b/product_visibility_website/static/description/images/scrn1.png differ diff --git a/product_visibility_website/static/description/images/scrn10.png b/product_visibility_website/static/description/images/scrn10.png new file mode 100644 index 000000000..5f67bf6a5 Binary files /dev/null and b/product_visibility_website/static/description/images/scrn10.png differ diff --git a/product_visibility_website/static/description/images/scrn2.png b/product_visibility_website/static/description/images/scrn2.png new file mode 100644 index 000000000..54628a8dd Binary files /dev/null and b/product_visibility_website/static/description/images/scrn2.png differ diff --git a/product_visibility_website/static/description/images/scrn3.png b/product_visibility_website/static/description/images/scrn3.png new file mode 100644 index 000000000..626c16571 Binary files /dev/null and b/product_visibility_website/static/description/images/scrn3.png differ diff --git a/product_visibility_website/static/description/images/scrn4.png b/product_visibility_website/static/description/images/scrn4.png new file mode 100644 index 000000000..01bf06e39 Binary files /dev/null and b/product_visibility_website/static/description/images/scrn4.png differ diff --git a/product_visibility_website/static/description/images/scrn5.png b/product_visibility_website/static/description/images/scrn5.png new file mode 100644 index 000000000..85befd215 Binary files /dev/null and b/product_visibility_website/static/description/images/scrn5.png differ diff --git a/product_visibility_website/static/description/images/scrn6.png b/product_visibility_website/static/description/images/scrn6.png new file mode 100644 index 000000000..263c5679a Binary files /dev/null and b/product_visibility_website/static/description/images/scrn6.png differ diff --git a/product_visibility_website/static/description/images/scrn7.png b/product_visibility_website/static/description/images/scrn7.png new file mode 100644 index 000000000..fc9ee5ed3 Binary files /dev/null and b/product_visibility_website/static/description/images/scrn7.png differ diff --git a/product_visibility_website/static/description/images/scrn8.png b/product_visibility_website/static/description/images/scrn8.png new file mode 100644 index 000000000..e78a07031 Binary files /dev/null and b/product_visibility_website/static/description/images/scrn8.png differ diff --git a/product_visibility_website/static/description/images/scrn9.png b/product_visibility_website/static/description/images/scrn9.png new file mode 100644 index 000000000..21744894f Binary files /dev/null and b/product_visibility_website/static/description/images/scrn9.png differ diff --git a/product_visibility_website/static/description/images/website_featured_products.jpeg b/product_visibility_website/static/description/images/website_featured_products.jpeg new file mode 100644 index 000000000..9542b3f7a Binary files /dev/null and b/product_visibility_website/static/description/images/website_featured_products.jpeg differ diff --git a/product_visibility_website/static/description/images/website_repeat_sale.jpeg b/product_visibility_website/static/description/images/website_repeat_sale.jpeg new file mode 100644 index 000000000..a749a22d9 Binary files /dev/null and b/product_visibility_website/static/description/images/website_repeat_sale.jpeg differ diff --git a/product_visibility_website/static/description/images/website_repeat_sale.jpeg~ b/product_visibility_website/static/description/images/website_repeat_sale.jpeg~ new file mode 100644 index 000000000..dc8e987fb Binary files /dev/null and b/product_visibility_website/static/description/images/website_repeat_sale.jpeg~ differ diff --git a/product_visibility_website/static/description/images/website_sale_advanced_search.png b/product_visibility_website/static/description/images/website_sale_advanced_search.png new file mode 100644 index 000000000..691f06847 Binary files /dev/null and b/product_visibility_website/static/description/images/website_sale_advanced_search.png differ diff --git a/product_visibility_website/static/description/images/website_sale_product_quick_view.jpeg b/product_visibility_website/static/description/images/website_sale_product_quick_view.jpeg new file mode 100644 index 000000000..6fa520659 Binary files /dev/null and b/product_visibility_website/static/description/images/website_sale_product_quick_view.jpeg differ diff --git a/product_visibility_website/static/description/index.html b/product_visibility_website/static/description/index.html new file mode 100644 index 000000000..87085639c --- /dev/null +++ b/product_visibility_website/static/description/index.html @@ -0,0 +1,675 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Website Product Visibility

+

+ Website Product visibility for logged in and logged out users/Visitors +

+ +
+
+ + + + +
+
+

+ Overview +

+
+ +
+

+ This module helps you to make visible only the filtered products and product categories for a logged + in and logged out users/visitors.Also, it enables the user to search products and product categories + only from those available products and categories.

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ + Filter according to the logged users

+

+ Filter product and product categories according to the logged user.

+
+
+ +
+
+ +
+
+

+ + Filter according to the public users/visitors

+

+ Filter product and product categories according to the public users/visitors.

+ +
+
+ +
+
+ +
+
+

+ + Restrict user searches to available product/category only

+

+ User can only search product and category among from the available product/category.

+ + +
+
+ + +
+ +
+
+

+ Screenshots +

+
+
+

+ Set filter for a logged user

+

+ Setting the filtering mode for a logged user. +

+ +
+
+

+ Product wise filtering for website shop (Logged in Users)

+

+ Product wise filtering mode for logged user in website shop.

+ +
+ +
+

+ Product wise visibility for website shop (Product wise)

+

+ Product visibility (Product wise) for the logged user in website shop.

+ +
+ +
+

+ Category wise filtering for website shop (Logged in Users)

+

+ Category wise filtering mode for logged user in website shop.

+ +
+
+

+ Product visibility for website shop (Category wise)

+

+ Product visibility (Category wise) for the logged user in website shop.

+ +
+ +
+

+ Product wise filtering for website shop (Visitors)

+

+ Product wise filtering mode for the visitors in the website shop.

+ +
+ +
+

+ Product wise visibility for website shop (Visitors)

+

+ Product visibility (Product wise) for the visitors in website shop.

+ +
+ +
+

+ Category wise filtering for website shop (Visitors)

+

+ Category wise filtering mode for the visitors in the website shop.

+ +
+ +
+

+ Product visibility for website shop visitors (Category wise)

+

+ Product visibility (Category wise) for the visitors in website shop.

+ +
+ +
+

+ Search available product from the list

+

+ Search product from the available product list.

+ +
+ + +
+ + + +
+
+

Suggested 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

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/product_visibility_website/views/website_product_visibility.xml b/product_visibility_website/views/website_product_visibility.xml new file mode 100644 index 000000000..e12b3235d --- /dev/null +++ b/product_visibility_website/views/website_product_visibility.xml @@ -0,0 +1,66 @@ + + + + + base.view.partner.form.inherit + res.partner + + + + + + + + + + + + + + + + + + + + + website.config.view.inherit + res.config.settings + + + +
+

Product Visibility

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/product_volume/README.rst b/product_volume/README.rst new file mode 100644 index 000000000..b6b617ce4 --- /dev/null +++ b/product_volume/README.rst @@ -0,0 +1,36 @@ +Product Volume v14 +================== +This module will helps you to give the length, breadth and height of the product + +Features +======== + +* Provision to enter the length, breadth and height of the product. +* Automaticaly calculates the volume + +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/13.0/setup/install.html +- Install our custom addon + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + + +Developer: Tintuk Tomin @ cybrosys, odoo@cybrosys.com + Kripal K V13 @ cybrosys, odoo@cybrosys.com + Muhammed Nafih V14 @ cybrosys, odoo@cybrosys.com + Neeraj V15 @ cybrosys, odoo@cybrosys.com + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. diff --git a/product_volume/__init__.py b/product_volume/__init__.py new file mode 100644 index 000000000..698385290 --- /dev/null +++ b/product_volume/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import models diff --git a/product_volume/__manifest__.py b/product_volume/__manifest__.py new file mode 100644 index 000000000..f1b4222fc --- /dev/null +++ b/product_volume/__manifest__.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Neeraj Krishnan V M @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +{ + 'name': 'Product Volume Calculation', + 'version': '15.0.1.0.0', + 'summary': """This module will helps you to give dimensions of the product.""", + 'description': "Module helps you to manage the length, breadth and height of the product and calculates its volume accordingily.", + 'category': "Inventory", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'stock'], + 'data': [ + 'views/volume_view.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': True, +} diff --git a/product_volume/doc/RELEASE_NOTES.md b/product_volume/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..a8205e85b --- /dev/null +++ b/product_volume/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 03.02.2022 +#### Version 15.0.1.0.0 +#### ADD +Initial Commit Product Volume Calculation diff --git a/product_volume/models/__init__.py b/product_volume/models/__init__.py new file mode 100644 index 000000000..ef2f5750c --- /dev/null +++ b/product_volume/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import volume diff --git a/product_volume/models/volume.py b/product_volume/models/volume.py new file mode 100644 index 000000000..c4292feaa --- /dev/null +++ b/product_volume/models/volume.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Neeraj Krishnan V M @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import api, models, fields + + +class ProductDimensionsVolume(models.Model): + _inherit = 'product.template' + + length = fields.Char(string="Length") + breadth = fields.Char(string="Breadth") + height = fields.Char(string="Height") + + @api.onchange('length', 'breadth', 'height') + def onchange_l_b_h(self): + self.volume = float(self.length if self.length else 0) * float(self.breadth if self.breadth else 0) * float( + self.height if self.height else 0) diff --git a/product_volume/static/description/assets/icons/check.png b/product_volume/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/product_volume/static/description/assets/icons/check.png differ diff --git a/product_volume/static/description/assets/icons/chevron.png b/product_volume/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/product_volume/static/description/assets/icons/chevron.png differ diff --git a/product_volume/static/description/assets/icons/cogs.png b/product_volume/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_volume/static/description/assets/icons/cogs.png differ diff --git a/product_volume/static/description/assets/icons/consultation.png b/product_volume/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_volume/static/description/assets/icons/consultation.png differ diff --git a/product_volume/static/description/assets/icons/ecom-black.png b/product_volume/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_volume/static/description/assets/icons/ecom-black.png differ diff --git a/product_volume/static/description/assets/icons/education-black.png b/product_volume/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_volume/static/description/assets/icons/education-black.png differ diff --git a/product_volume/static/description/assets/icons/hotel-black.png b/product_volume/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_volume/static/description/assets/icons/hotel-black.png differ diff --git a/product_volume/static/description/assets/icons/license.png b/product_volume/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_volume/static/description/assets/icons/license.png differ diff --git a/product_volume/static/description/assets/icons/lifebuoy.png b/product_volume/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_volume/static/description/assets/icons/lifebuoy.png differ diff --git a/product_volume/static/description/assets/icons/logo.png b/product_volume/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_volume/static/description/assets/icons/logo.png differ diff --git a/product_volume/static/description/assets/icons/manufacturing-black.png b/product_volume/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_volume/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_volume/static/description/assets/icons/pos-black.png b/product_volume/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_volume/static/description/assets/icons/pos-black.png differ diff --git a/product_volume/static/description/assets/icons/puzzle.png b/product_volume/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_volume/static/description/assets/icons/puzzle.png differ diff --git a/product_volume/static/description/assets/icons/restaurant-black.png b/product_volume/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_volume/static/description/assets/icons/restaurant-black.png differ diff --git a/product_volume/static/description/assets/icons/service-black.png b/product_volume/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_volume/static/description/assets/icons/service-black.png differ diff --git a/product_volume/static/description/assets/icons/trading-black.png b/product_volume/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_volume/static/description/assets/icons/trading-black.png differ diff --git a/product_volume/static/description/assets/icons/training.png b/product_volume/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_volume/static/description/assets/icons/training.png differ diff --git a/product_volume/static/description/assets/icons/update.png b/product_volume/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_volume/static/description/assets/icons/update.png differ diff --git a/product_volume/static/description/assets/icons/user.png b/product_volume/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_volume/static/description/assets/icons/user.png differ diff --git a/product_volume/static/description/assets/icons/wrench.png b/product_volume/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_volume/static/description/assets/icons/wrench.png differ diff --git a/product_volume/static/description/assets/modules/approval_image.png b/product_volume/static/description/assets/modules/approval_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/product_volume/static/description/assets/modules/approval_image.png differ diff --git a/product_volume/static/description/assets/modules/budget_image.png b/product_volume/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/product_volume/static/description/assets/modules/budget_image.png differ diff --git a/product_volume/static/description/assets/modules/export_image.png b/product_volume/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/product_volume/static/description/assets/modules/export_image.png differ diff --git a/product_volume/static/description/assets/modules/magento_image.png b/product_volume/static/description/assets/modules/magento_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/product_volume/static/description/assets/modules/magento_image.png differ diff --git a/product_volume/static/description/assets/modules/pos_image.png.png b/product_volume/static/description/assets/modules/pos_image.png.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/product_volume/static/description/assets/modules/pos_image.png.png differ diff --git a/product_volume/static/description/assets/modules/shopify_image.png b/product_volume/static/description/assets/modules/shopify_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/product_volume/static/description/assets/modules/shopify_image.png differ diff --git a/product_volume/static/description/assets/screenshots/hero.png b/product_volume/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..d8247a630 Binary files /dev/null and b/product_volume/static/description/assets/screenshots/hero.png differ diff --git a/product_volume/static/description/assets/screenshots/product volume.png b/product_volume/static/description/assets/screenshots/product volume.png new file mode 100644 index 000000000..efdebe23a Binary files /dev/null and b/product_volume/static/description/assets/screenshots/product volume.png differ diff --git a/product_volume/static/description/banner.png b/product_volume/static/description/banner.png new file mode 100644 index 000000000..5aa08a5fd Binary files /dev/null and b/product_volume/static/description/banner.png differ diff --git a/product_volume/static/description/cybro_logo.png b/product_volume/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/product_volume/static/description/cybro_logo.png differ diff --git a/product_volume/static/description/icon.png b/product_volume/static/description/icon.png new file mode 100644 index 000000000..ed202538f Binary files /dev/null and b/product_volume/static/description/icon.png differ diff --git a/product_volume/static/description/index.html b/product_volume/static/description/index.html new file mode 100644 index 000000000..d69f4bf54 --- /dev/null +++ b/product_volume/static/description/index.html @@ -0,0 +1,572 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Product Volume Calculation

+

+ Calculates the product volume +

+ +
+
+ + + + +
+
+

+ Overview +

+
+ +
+

+ The module provisions to add the length, breadth and height of the chosen product. It also enables the + end user to perform automatic volume calculation of the product.

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Seamless Adding of Properties

+

+ Length, Breadth and Height of the product in the product master page

+
+
+
+
+ +
+
+

+ Automatic Calculation

+

+ Automatic calculation of volume with the above details

+
+
+ + +
+ +
+
+

+ Screenshots +

+
+
+

+ Provision for the product dimensions

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

Suggested 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

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/product_volume/views/volume_view.xml b/product_volume/views/volume_view.xml new file mode 100644 index 000000000..f38f17175 --- /dev/null +++ b/product_volume/views/volume_view.xml @@ -0,0 +1,30 @@ + + + + + product.template.volume + product.template + + + + + + + + + +