Browse Source

[ADD] Initial Commit

pull/198/head
Ajmal Cybro 3 years ago
parent
commit
61f5a718cd
  1. 36
      product_visibility_website/README.rst
  2. 25
      product_visibility_website/__init__.py
  3. 43
      product_visibility_website/__manifest__.py
  4. 24
      product_visibility_website/controllers/__init__.py
  5. 332
      product_visibility_website/controllers/main.py
  6. 9
      product_visibility_website/doc/RELEASE_NOTES.md
  7. 24
      product_visibility_website/models/__init__.py
  8. 100
      product_visibility_website/models/website_product_visibility.py
  9. BIN
      product_visibility_website/static/description/assets/icons/check.png
  10. BIN
      product_visibility_website/static/description/assets/icons/chevron.png
  11. BIN
      product_visibility_website/static/description/assets/icons/cogs.png
  12. BIN
      product_visibility_website/static/description/assets/icons/consultation.png
  13. BIN
      product_visibility_website/static/description/assets/icons/ecom-black.png
  14. BIN
      product_visibility_website/static/description/assets/icons/education-black.png
  15. BIN
      product_visibility_website/static/description/assets/icons/hotel-black.png
  16. BIN
      product_visibility_website/static/description/assets/icons/license.png
  17. BIN
      product_visibility_website/static/description/assets/icons/lifebuoy.png
  18. BIN
      product_visibility_website/static/description/assets/icons/logo.png
  19. BIN
      product_visibility_website/static/description/assets/icons/manufacturing-black.png
  20. BIN
      product_visibility_website/static/description/assets/icons/pos-black.png
  21. BIN
      product_visibility_website/static/description/assets/icons/puzzle.png
  22. BIN
      product_visibility_website/static/description/assets/icons/restaurant-black.png
  23. BIN
      product_visibility_website/static/description/assets/icons/service-black.png
  24. BIN
      product_visibility_website/static/description/assets/icons/trading-black.png
  25. BIN
      product_visibility_website/static/description/assets/icons/training.png
  26. BIN
      product_visibility_website/static/description/assets/icons/update.png
  27. BIN
      product_visibility_website/static/description/assets/icons/user.png
  28. BIN
      product_visibility_website/static/description/assets/icons/wrench.png
  29. BIN
      product_visibility_website/static/description/assets/modules/1.png
  30. BIN
      product_visibility_website/static/description/assets/modules/2.png
  31. BIN
      product_visibility_website/static/description/assets/modules/3.png
  32. BIN
      product_visibility_website/static/description/assets/modules/4.png
  33. BIN
      product_visibility_website/static/description/assets/modules/5.png
  34. BIN
      product_visibility_website/static/description/assets/modules/6.png
  35. BIN
      product_visibility_website/static/description/assets/screenshots/hero.png
  36. BIN
      product_visibility_website/static/description/assets/screenshots/scrn1.png
  37. BIN
      product_visibility_website/static/description/assets/screenshots/scrn10.png
  38. BIN
      product_visibility_website/static/description/assets/screenshots/scrn2.png
  39. BIN
      product_visibility_website/static/description/assets/screenshots/scrn3.png
  40. BIN
      product_visibility_website/static/description/assets/screenshots/scrn4.png
  41. BIN
      product_visibility_website/static/description/assets/screenshots/scrn5.png
  42. BIN
      product_visibility_website/static/description/assets/screenshots/scrn6.png
  43. BIN
      product_visibility_website/static/description/assets/screenshots/scrn7.png
  44. BIN
      product_visibility_website/static/description/assets/screenshots/scrn8.png
  45. BIN
      product_visibility_website/static/description/assets/screenshots/scrn9.png
  46. BIN
      product_visibility_website/static/description/banner.png
  47. BIN
      product_visibility_website/static/description/icon.png
  48. BIN
      product_visibility_website/static/description/images/checked.png
  49. BIN
      product_visibility_website/static/description/images/cybrosys.png
  50. BIN
      product_visibility_website/static/description/images/odoo-powr-countdown-timer-12.0.1.0.zip
  51. BIN
      product_visibility_website/static/description/images/product_brand_ecommerce.png
  52. BIN
      product_visibility_website/static/description/images/product_brand_ecommerce.png~
  53. BIN
      product_visibility_website/static/description/images/scrn1.png
  54. BIN
      product_visibility_website/static/description/images/scrn10.png
  55. BIN
      product_visibility_website/static/description/images/scrn2.png
  56. BIN
      product_visibility_website/static/description/images/scrn3.png
  57. BIN
      product_visibility_website/static/description/images/scrn4.png
  58. BIN
      product_visibility_website/static/description/images/scrn5.png
  59. BIN
      product_visibility_website/static/description/images/scrn6.png
  60. BIN
      product_visibility_website/static/description/images/scrn7.png
  61. BIN
      product_visibility_website/static/description/images/scrn8.png
  62. BIN
      product_visibility_website/static/description/images/scrn9.png
  63. BIN
      product_visibility_website/static/description/images/website_featured_products.jpeg
  64. BIN
      product_visibility_website/static/description/images/website_repeat_sale.jpeg
  65. BIN
      product_visibility_website/static/description/images/website_repeat_sale.jpeg~
  66. BIN
      product_visibility_website/static/description/images/website_sale_advanced_search.png
  67. BIN
      product_visibility_website/static/description/images/website_sale_product_quick_view.jpeg
  68. 675
      product_visibility_website/static/description/index.html
  69. 66
      product_visibility_website/views/website_product_visibility.xml
  70. 36
      product_volume/README.rst
  71. 23
      product_volume/__init__.py
  72. 40
      product_volume/__manifest__.py
  73. 6
      product_volume/doc/RELEASE_NOTES.md
  74. 23
      product_volume/models/__init__.py
  75. 36
      product_volume/models/volume.py
  76. BIN
      product_volume/static/description/assets/icons/check.png
  77. BIN
      product_volume/static/description/assets/icons/chevron.png
  78. BIN
      product_volume/static/description/assets/icons/cogs.png
  79. BIN
      product_volume/static/description/assets/icons/consultation.png
  80. BIN
      product_volume/static/description/assets/icons/ecom-black.png
  81. BIN
      product_volume/static/description/assets/icons/education-black.png
  82. BIN
      product_volume/static/description/assets/icons/hotel-black.png
  83. BIN
      product_volume/static/description/assets/icons/license.png
  84. BIN
      product_volume/static/description/assets/icons/lifebuoy.png
  85. BIN
      product_volume/static/description/assets/icons/logo.png
  86. BIN
      product_volume/static/description/assets/icons/manufacturing-black.png
  87. BIN
      product_volume/static/description/assets/icons/pos-black.png
  88. BIN
      product_volume/static/description/assets/icons/puzzle.png
  89. BIN
      product_volume/static/description/assets/icons/restaurant-black.png
  90. BIN
      product_volume/static/description/assets/icons/service-black.png
  91. BIN
      product_volume/static/description/assets/icons/trading-black.png
  92. BIN
      product_volume/static/description/assets/icons/training.png
  93. BIN
      product_volume/static/description/assets/icons/update.png
  94. BIN
      product_volume/static/description/assets/icons/user.png
  95. BIN
      product_volume/static/description/assets/icons/wrench.png
  96. BIN
      product_volume/static/description/assets/modules/approval_image.png
  97. BIN
      product_volume/static/description/assets/modules/budget_image.png
  98. BIN
      product_volume/static/description/assets/modules/export_image.png
  99. BIN
      product_volume/static/description/assets/modules/magento_image.png
  100. BIN
      product_volume/static/description/assets/modules/pos_image.png.png

36
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 <https://www.cybrosys.com>
Maintainer
----------
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.

25
product_visibility_website/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Shijin V (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import controllers
from . import models

43
product_visibility_website/__manifest__.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Neeraj Krishnan V M (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'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,
}

24
product_visibility_website/controllers/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Neeraj Krishnan V M (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import main

332
product_visibility_website/controllers/main.py

@ -0,0 +1,332 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Neeraj Krishnan V M (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
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/<int:page>''',
'''/shop/category/<model("product.public.category"):category>''',
'''/shop/category/<model("product.public.category"):category>/page/<int: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

9
product_visibility_website/doc/RELEASE_NOTES.md

@ -0,0 +1,9 @@
## Module <website_product_visibility>
#### 31.01.2021
#### Version 15.0.1.0.0
##### ADD

24
product_visibility_website/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Neeraj Krishnan V M (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import website_product_visibility

100
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 (<https://www.cybrosys.com>).
# Author: Neeraj Krishnan V M(<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
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

BIN
product_visibility_website/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
product_visibility_website/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
product_visibility_website/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
product_visibility_website/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
product_visibility_website/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
product_visibility_website/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
product_visibility_website/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
product_visibility_website/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
product_visibility_website/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
product_visibility_website/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
product_visibility_website/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
product_visibility_website/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
product_visibility_website/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
product_visibility_website/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
product_visibility_website/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
product_visibility_website/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
product_visibility_website/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
product_visibility_website/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
product_visibility_website/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
product_visibility_website/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
product_visibility_website/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
product_visibility_website/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
product_visibility_website/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
product_visibility_website/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
product_visibility_website/static/description/assets/modules/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
product_visibility_website/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
product_visibility_website/static/description/assets/screenshots/hero.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
product_visibility_website/static/description/assets/screenshots/scrn9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
product_visibility_website/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
product_visibility_website/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
product_visibility_website/static/description/images/checked.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
product_visibility_website/static/description/images/cybrosys.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
product_visibility_website/static/description/images/odoo-powr-countdown-timer-12.0.1.0.zip

Binary file not shown.

BIN
product_visibility_website/static/description/images/product_brand_ecommerce.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
product_visibility_website/static/description/images/product_brand_ecommerce.png~

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
product_visibility_website/static/description/images/scrn1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
product_visibility_website/static/description/images/scrn10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
product_visibility_website/static/description/images/scrn2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
product_visibility_website/static/description/images/scrn3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
product_visibility_website/static/description/images/scrn4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
product_visibility_website/static/description/images/scrn5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
product_visibility_website/static/description/images/scrn6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
product_visibility_website/static/description/images/scrn7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
product_visibility_website/static/description/images/scrn8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
product_visibility_website/static/description/images/scrn9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
product_visibility_website/static/description/images/website_featured_products.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
product_visibility_website/static/description/images/website_repeat_sale.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
product_visibility_website/static/description/images/website_repeat_sale.jpeg~

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
product_visibility_website/static/description/images/website_sale_advanced_search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
product_visibility_website/static/description/images/website_sale_product_quick_view.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

675
product_visibility_website/static/description/index.html

@ -0,0 +1,675 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between"
style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
</div>
</div>
</div>
</div>
<div class="container" style="padding: 0rem 1.5rem 4rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
Website Product Visibility</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Website Product visibility for logged in and logged out users/Visitors
</p>
<img src="./assets/screenshots/hero.png" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
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.</p>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 mb-4 pl-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Filter according to the logged users</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Filter product and product categories according to the logged user.</p>
</div>
</div>
<div class="col-md-6 mb-4 pl-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Filter according to the public users/visitors</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Filter product and product categories according to the public users/visitors.</p>
</div>
</div>
<div class="col-md-6 mb-4 pl-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Restrict user searches to available product/category only</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
User can only search product and category among from the available product/category.</p>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Set filter for a logged user</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Setting the filtering mode for a logged user.
</p>
<img src="assets/screenshots/scrn1.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product wise filtering for website shop (Logged in Users)</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Product wise filtering mode for logged user in website shop.</p>
<img src="assets/screenshots/scrn2.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product wise visibility for website shop (Product wise)</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Product visibility (Product wise) for the logged user in website shop.</p>
<img src="assets/screenshots/scrn3.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Category wise filtering for website shop (Logged in Users)</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Category wise filtering mode for logged user in website shop.</p>
<img src="assets/screenshots/scrn4.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product visibility for website shop (Category wise)</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Product visibility (Category wise) for the logged user in website shop.</p>
<img src="assets/screenshots/scrn5.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product wise filtering for website shop (Visitors)</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Product wise filtering mode for the visitors in the website shop.</p>
<img src="assets/screenshots/scrn6.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product wise visibility for website shop (Visitors)</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Product visibility (Product wise) for the visitors in website shop.</p>
<img src="assets/screenshots/scrn7.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Category wise filtering for website shop (Visitors)</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Category wise filtering mode for the visitors in the website shop.</p>
<img src="assets/screenshots/scrn8.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Product visibility for website shop visitors (Category wise)</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Product visibility (Category wise) for the visitors in website shop.</p>
<img src="assets/screenshots/scrn9.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Search available product from the list</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Search product from the available product list.</p>
<img src="assets/screenshots/scrn10.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/website_sale_extend/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/1.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/shopify_odoo_connector/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/2.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/export_stockinfo_xls/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/dynamic_product_fields/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/4.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/product_return_pos/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/5.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/website_product_attachments/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a
class="carousel-control-next" href="#demo1" data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>WhatsApp</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

66
product_visibility_website/views/website_product_visibility.xml

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="base_view_partner_form_inherit" model="ir.ui.view">
<field name="name"> base.view.partner.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet/notebook/page[@name='internal_notes']" position="after">
<page name="product_visibility" string="Product Visibility" groups="website.group_website_designer">
<group name ='container_row_2'>
<field name="filter_mode" widget="radio"/>
</group>
<group name="container_row_2">
<field name="website_available_cat_ids" widget="many2many_tags" attrs="{'invisible': [('filter_mode', 'in', ['product_only','null'])]}" />
</group>
<group name="container_row_3">
<field name="website_available_product_ids" widget="many2many_tags" attrs="{'invisible': [('filter_mode', 'in', ['categ_only','null'])]}" />
</group>
</page>
</xpath>
</field>
</record>
<record id="website_config_view_inherit" model="ir.ui.view">
<field name="name">website.config.view.inherit</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('app_settings_block')]/div[@id='website_selection_settings']" position="after">
<div class="app_settings_block" data-string="Website" string="Website">
<h2>Product Visibility</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box" >
<div class="o_setting_left_pane">
<field name="product_visibility_guest_user"/>
</div>
<div class="o_setting_right_pane">
<label for="product_visibility_guest_user"/>
<div class="text-muted">
Enable Product Visibility
</div>
<div attrs="{'invisible': [('product_visibility_guest_user', '=', False)]}">
<div class="mt16">
<label class="o_light_label col-lg-3" for="filter_mode"/>
<field name="filter_mode" widget="radio"/>
</div>
<div class="mt16" attrs="{'invisible': [('filter_mode', 'in', ['categ_only'])]}">
<label class="o_light_label col-lg-3" for="available_product_ids"/>
<field name="available_product_ids" widget="many2many_tags" />
</div>
<div class="mt16" attrs="{'invisible': [('filter_mode', 'in', ['product_only'])]}">
<label class="o_light_label col-lg-3" for="available_cat_ids"/>
<field name="available_cat_ids" widget="many2many_tags" />
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>

36
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.

23
product_volume/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

40
product_volume/__manifest__.py

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'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,
}

6
product_volume/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <product_volume>
#### 03.02.2022
#### Version 15.0.1.0.0
#### ADD
Initial Commit Product Volume Calculation

23
product_volume/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import volume

36
product_volume/models/volume.py

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# 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 <http://www.gnu.org/licenses/>.
#
#############################################################################
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)

BIN
product_volume/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
product_volume/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
product_volume/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
product_volume/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
product_volume/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
product_volume/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
product_volume/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
product_volume/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
product_volume/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
product_volume/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
product_volume/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
product_volume/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
product_volume/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
product_volume/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
product_volume/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
product_volume/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
product_volume/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
product_volume/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
product_volume/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
product_volume/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
product_volume/static/description/assets/modules/approval_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
product_volume/static/description/assets/modules/budget_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
product_volume/static/description/assets/modules/export_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
product_volume/static/description/assets/modules/magento_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
product_volume/static/description/assets/modules/pos_image.png.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save