Browse Source

Feb 09 : [ADD] Initial Commit 'website_sample_product_request'

pull/267/merge
RisvanaCybro 1 year ago
parent
commit
dadfc0b97b
  1. 51
      website_sample_product_request/README.rst
  2. 23
      website_sample_product_request/__init__.py
  3. 48
      website_sample_product_request/__manifest__.py
  4. 22
      website_sample_product_request/controllers/__init__.py
  5. 313
      website_sample_product_request/controllers/website_sample_product_request.py
  6. 12
      website_sample_product_request/data/website_menu_data.xml
  7. 7
      website_sample_product_request/doc/RELEASE_NOTES.md
  8. 23
      website_sample_product_request/models/__init__.py
  9. 37
      website_sample_product_request/models/product_template.py
  10. 30
      website_sample_product_request/models/sale_order.py
  11. BIN
      website_sample_product_request/static/description/assets/icons/check.png
  12. BIN
      website_sample_product_request/static/description/assets/icons/chevron.png
  13. BIN
      website_sample_product_request/static/description/assets/icons/cogs.png
  14. BIN
      website_sample_product_request/static/description/assets/icons/consultation.png
  15. BIN
      website_sample_product_request/static/description/assets/icons/ecom-black.png
  16. BIN
      website_sample_product_request/static/description/assets/icons/education-black.png
  17. BIN
      website_sample_product_request/static/description/assets/icons/hotel-black.png
  18. BIN
      website_sample_product_request/static/description/assets/icons/license.png
  19. BIN
      website_sample_product_request/static/description/assets/icons/lifebuoy.png
  20. BIN
      website_sample_product_request/static/description/assets/icons/manufacturing-black.png
  21. BIN
      website_sample_product_request/static/description/assets/icons/pos-black.png
  22. BIN
      website_sample_product_request/static/description/assets/icons/puzzle.png
  23. BIN
      website_sample_product_request/static/description/assets/icons/restaurant-black.png
  24. BIN
      website_sample_product_request/static/description/assets/icons/service-black.png
  25. BIN
      website_sample_product_request/static/description/assets/icons/trading-black.png
  26. BIN
      website_sample_product_request/static/description/assets/icons/training.png
  27. BIN
      website_sample_product_request/static/description/assets/icons/update.png
  28. BIN
      website_sample_product_request/static/description/assets/icons/user.png
  29. BIN
      website_sample_product_request/static/description/assets/icons/wrench.png
  30. BIN
      website_sample_product_request/static/description/assets/misc/categories.png
  31. BIN
      website_sample_product_request/static/description/assets/misc/check-box.png
  32. BIN
      website_sample_product_request/static/description/assets/misc/compass.png
  33. BIN
      website_sample_product_request/static/description/assets/misc/corporate.png
  34. BIN
      website_sample_product_request/static/description/assets/misc/customer-support.png
  35. BIN
      website_sample_product_request/static/description/assets/misc/cybrosys-logo.png
  36. BIN
      website_sample_product_request/static/description/assets/misc/features.png
  37. BIN
      website_sample_product_request/static/description/assets/misc/logo.png
  38. BIN
      website_sample_product_request/static/description/assets/misc/pictures.png
  39. BIN
      website_sample_product_request/static/description/assets/misc/pie-chart.png
  40. BIN
      website_sample_product_request/static/description/assets/misc/right-arrow.png
  41. BIN
      website_sample_product_request/static/description/assets/misc/star.png
  42. BIN
      website_sample_product_request/static/description/assets/misc/support.png
  43. BIN
      website_sample_product_request/static/description/assets/misc/whatsapp.png
  44. BIN
      website_sample_product_request/static/description/assets/modules/1.png
  45. BIN
      website_sample_product_request/static/description/assets/modules/2.png
  46. BIN
      website_sample_product_request/static/description/assets/modules/3.png
  47. BIN
      website_sample_product_request/static/description/assets/modules/4.png
  48. BIN
      website_sample_product_request/static/description/assets/modules/5.png
  49. BIN
      website_sample_product_request/static/description/assets/modules/6.png
  50. BIN
      website_sample_product_request/static/description/assets/screenshots/1-web.png
  51. BIN
      website_sample_product_request/static/description/assets/screenshots/2-web.png
  52. BIN
      website_sample_product_request/static/description/assets/screenshots/3-web.png
  53. BIN
      website_sample_product_request/static/description/assets/screenshots/4-web.png
  54. BIN
      website_sample_product_request/static/description/assets/screenshots/5-web.png
  55. BIN
      website_sample_product_request/static/description/assets/screenshots/6-web.png
  56. BIN
      website_sample_product_request/static/description/assets/screenshots/7-web.png
  57. BIN
      website_sample_product_request/static/description/assets/screenshots/8-web.png
  58. BIN
      website_sample_product_request/static/description/assets/screenshots/hero.gif
  59. BIN
      website_sample_product_request/static/description/banner.png
  60. BIN
      website_sample_product_request/static/description/icon.png
  61. 606
      website_sample_product_request/static/description/index.html
  62. 24
      website_sample_product_request/views/product_product_views.xml
  63. 31
      website_sample_product_request/views/product_template_views.xml
  64. 23
      website_sample_product_request/views/sale_order_views.xml
  65. 19
      website_sample_product_request/views/website_sample_product_request_menus.xml
  66. 143
      website_sample_product_request/views/website_sample_product_templates.xml

51
website_sample_product_request/README.rst

@ -0,0 +1,51 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Website Sample Product Request
==============================
Website Sample Product Request to handle sample product order.
Configuration
=============
- Additional configuration not required
Installation
============
- www.odoo.com/documentation/16.0/setup/install.html
- Install our custom addon
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
=======
Affero General Public License v3.0 (AGPL v3)
(https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Credits
-------
* Developer: (V16): Rosmy John, Contact:odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

23
website_sample_product_request/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright(C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Rosmy John (<https://www.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 controllers
from . import models

48
website_sample_product_request/__manifest__.py

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright(C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Rosmy John (<https://www.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': 'Website Sample Product Request',
'version': '16.0.1.0.0',
'category': 'Website',
'summary': 'This module allows us to create sample request from website,'
'in odoo 16',
'description': 'This module allows us to create sample request from website'
'by choosing sample product from backend,odoo 16',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['sale_management', 'website_sale'],
'data': [
'data/website_menu_data.xml',
'views/product_product_views.xml',
'views/product_template_views.xml',
'views/website_sample_product_templates.xml',
'views/sale_order_views.xml',
'views/website_sample_product_request_menus.xml',
],
'images': ['static/description/banner.png'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

22
website_sample_product_request/controllers/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright(C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Rosmy John (<https://www.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 website_sample_product_request

313
website_sample_product_request/controllers/website_sample_product_request.py

@ -0,0 +1,313 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright(C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Rosmy John (<https://www.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 datetime import datetime
from werkzeug.exceptions import NotFound
from odoo.http import request
from odoo.tools import lazy
from odoo import fields, http, tools
from odoo.addons.http_routing.models.ir_http import slug
from odoo.addons.website.models.ir_http import sitemap_qs2dom
from odoo.addons.website.controllers.main import QueryURL
from odoo.addons.website_sale.controllers.main import TableCompute
from odoo.addons.website_sale.controllers.main import WebsiteSale
class WebsiteSaleInherit(WebsiteSale):
"""This class inherits from the base WebsiteSale class and includes
overridden methods and additional functionality for handling sample
products in the shop,creating sitemap entries for categories, and
managing the shopping cart."""
def sitemap_shop(env, rule, qs):
"""This function is overridden to create category.
Generate sitemap entries for categories in the shop.
Args:
env(env): Environment of the function.
rule: The Sitemap rule object.
qs (str): Query string parameter.
Returns:
yield (dict):Sitemap entries for shop categories."""
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}
@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='', min_price=0.0,
max_price=0.0, ppg=False, **post):
"""This function is used to create sample products shop.
page:Representing the page number for pagination.
category: An optional parameter specifying the category of products
to display.
search: An optional string representing the search term entered by
the user.
min_price: An optional float indicating the minimum price for
filtering products.
max_price: An optional float indicating the maximum price for
filtering products.
ppg: A boolean indicating whether to override the number of
products per page.
**post: Additional keyword arguments that can be passed to the function.
return: If `shop_type` is set, render a sample order template view.
Otherwise, render the products template with the necessary values.
"""
add_qty = int(post.get('add_qty', 1))
try:
min_price = float(min_price)
except ValueError:
min_price = 0
try:
max_price = float(max_price)
except ValueError:
max_price = 0
Category = request.env['product.public.category']
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
website = request.env['website'].get_current_website()
if ppg:
try:
ppg = int(ppg)
post['ppg'] = ppg
except ValueError:
ppg = False
if not ppg:
ppg = website.shop_ppg or 20
ppr = 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}
keep = QueryURL('/shop',
**self._shop_get_query_url_kwargs(
category and int(category), search, min_price,
max_price,
**post))
now = datetime.timestamp(datetime.now())
pricelist = request.env['product.pricelist'].browse(
request.session.get('website_sale_current_pl'))
if not pricelist or request.session.get('website_sale_pricelist_time',
0) < now - 60 * 60:
pricelist = website.get_current_pricelist()
request.session['website_sale_pricelist_time'] = now
request.session['website_sale_current_pl'] = pricelist.id
request.update_context(pricelist=pricelist.id,
partner=request.env.user.partner_id)
filter_by_price_enabled = website.is_view_active(
'website_sale.filter_products_price')
if filter_by_price_enabled:
company_currency = website.company_id.currency_id
conversion_rate = request.env['res.currency']._get_conversion_rate(
company_currency, pricelist.currency_id,
request.website.company_id, fields.Date.today())
else:
conversion_rate = 1
url = "/shop"
if search:
post["search"] = search
if attrib_list:
post['attrib'] = attrib_list
options = self._get_search_options(
category=category,
attrib_values=attrib_values,
pricelist=pricelist,
min_price=min_price,
max_price=max_price,
conversion_rate=conversion_rate,
**post
)
fuzzy_search_term, product_count, search_product = (
self._shop_lookup_products(attrib_set, options, post,
search, website))
filter_by_price_enabled = website.is_view_active(
'website_sale.filter_products_price')
if filter_by_price_enabled:
product = request.env['product.template'].with_context(
bin_size=True)
domain = self._get_search_domain(search, category, attrib_values)
from_clause, where_clause, where_params = product._where_calc(
domain).get_sql()
query = (
f"SELECT COALESCE(MIN(list_price), 0) * {conversion_rate}, "
f"COALESCE(MAX(list_price), 0) * {conversion_rate} "
f"FROM {from_clause} "
f"WHERE {where_clause}"
)
request.env.cr.execute(query, where_params)
available_min_price, available_max_price = request.env.cr.fetchone()
if min_price or max_price:
if min_price:
min_price = min_price if min_price <= available_max_price \
else available_min_price
post['min_price'] = min_price
if max_price:
max_price = max_price if max_price >= available_min_price \
else available_max_price
post['max_price'] = max_price
website_domain = website.website_domain()
categs_domain = [('parent_id', '=', False)] + 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 = Category
categs = lazy(lambda: Category.search(categs_domain))
if category:
url = "/shop/category/%s" % slug(category)
pager = website.pager(url=url, total=product_count, page=page, step=ppg,
scope=7, url_args=post)
offset = pager['offset']
products = search_product[offset:offset + ppg]
shop_type = post.get('type') if post.get('type') else False
if shop_type:
products = request.env['product.template'].search(
[('is_sample_product', '=', True)])
ProductAttribute = request.env['product.attribute']
if products:
# get all products without limit
attributes = lazy(lambda: ProductAttribute.search([
('product_tmpl_ids', 'in', search_product.ids),
('visibility', '=', 'visible'),
]))
else:
attributes = lazy(lambda: ProductAttribute.browse(attributes_ids))
layout_mode = request.session.get('website_sale_shop_layout_mode')
if not layout_mode:
if website.viewref('website_sale.products_list_view').active:
layout_mode = 'list'
else:
layout_mode = 'grid'
request.session['website_sale_shop_layout_mode'] = layout_mode
products_prices = lazy(lambda: products._get_sales_prices(pricelist))
fiscal_position_id = website._get_current_fiscal_position_id(
request.env.user.partner_id)
values = {
'search': fuzzy_search_term or search,
'original_search': fuzzy_search_term and search,
'order': post.get('order', ''),
'category': category,
'attrib_values': attrib_values,
'attrib_set': attrib_set,
'pager': pager,
'pricelist': pricelist,
'add_qty': add_qty,
'products': products,
'search_product': search_product,
'search_count': product_count, # common for all searchbox
'bins': lazy(lambda: TableCompute().process(products, ppg, ppr)),
'ppg': ppg,
'ppr': ppr,
'categories': categs,
'attributes': attributes,
'keep': keep,
'search_categories_ids': search_categories.ids,
'layout_mode': layout_mode,
'products_prices': products_prices,
'get_product_prices': lambda product: lazy(
lambda: products_prices[product.id]),
'float_round': tools.float_round,
'fiscal_position_id': fiscal_position_id,
}
if filter_by_price_enabled:
values['min_price'] = min_price or available_min_price
values['max_price'] = max_price or available_max_price
values['available_min_price'] = tools.float_round(
available_min_price, 2)
values['available_max_price'] = tools.float_round(
available_max_price, 2)
if category:
values['main_object'] = category
values.update(self._get_additional_shop_values(values))
if shop_type:
return request.render(
"website_sample_product_request.sample_order_template_view",
values)
else:
return request.render("website_sale.products", values)
@http.route(['/shop/cart'], type='http', auth="public", website=True,
sitemap=False)
def cart(self, access_token=None, revive='', **post):
"""This function is used to create sample product cart."""
order = request.website.sale_get_order()
sample_order_line = order.order_line
for rec in sample_order_line:
if rec.product_template_id.is_sample_product:
order.is_sample_order = True
else:
order.is_sample_order = False
if order and order.state != 'draft':
request.session['sale_order_id'] = None
order = request.website.sale_get_order()
request.session['website_sale_cart_quantity'] = order.cart_quantity
values = {}
if access_token:
abandoned_order = request.env['sale.order'].sudo().search(
[('access_token', '=', access_token)], limit=1)
if not abandoned_order:
raise NotFound()
if abandoned_order.state != 'draft':
values.update({'abandoned_proceed': True})
elif revive == 'squash' or (
revive == 'merge' and not request.session.get(
'sale_order_id')):
request.session['sale_order_id'] = abandoned_order.id
return request.redirect('/shop/cart')
elif revive == 'merge':
abandoned_order.order_line.write(
{'order_id': request.session['sale_order_id']})
abandoned_order.action_cancel()
elif abandoned_order.id != request.session.get(
'sale_order_id'):
values.update({'access_token': abandoned_order.access_token})
values.update({
'website_sale_order': order,
'date': fields.Date.today(),
'suggested_products': [],
})
if order:
order.order_line.filtered(
lambda l: not l.product_id.active).unlink()
values['suggested_products'] = order._cart_accessories()
values.update(self._get_express_shop_payment_values(order))
if post.get('type') == 'popover':
return request.render("website_sale.cart_popover", values,
headers={'Cache-Control': 'no-cache'})
return request.render("website_sale.cart", values)

12
website_sample_product_request/data/website_menu_data.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="1">
<!-- Defines a sample order menu item for a website.-->
<record id="menu_sample_order" model="website.menu">
<field name="name">Sample Order</field>
<field name="url">/shop?type=sample</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">10</field>
</record>
</data>
</odoo>

7
website_sample_product_request/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <website_sample_product_request>
#### 31.01.2024
#### Version 16.0.1.0.0
#### ADD
- Initial commit for Website Sample Product Request

23
website_sample_product_request/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright(C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Rosmy John (<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import product_template
from . import sale_order

37
website_sample_product_request/models/product_template.py

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright(C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Rosmy John (<https://www.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, fields, models
class ProductTemplate(models.Model):
"""It introduces an additional field 'is_sample_product' to mark products
as sample products. When a product is marked as a sample, its list price
is set to 0.0."""
_inherit = "product.template"
is_sample_product = fields.Boolean(string="Sample Product",
help="To know as a sample product")
@api.onchange('is_sample_product')
def _onchange_is_sample_product(self):
"""Change the product price when it is sample product"""
self.list_price = 0.0 if self.is_sample_product else self.list_price

30
website_sample_product_request/models/sale_order.py

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright(C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Rosmy John (<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class SaleOrder(models.Model):
"""This class represents the order of samples in the sale order"""
_inherit = 'sale.order'
is_sample_order = fields.Boolean(string="Sample order",
help="To identify as a sample order")

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
website_sample_product_request/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
website_sample_product_request/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
website_sample_product_request/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
website_sample_product_request/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
website_sample_product_request/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
website_sample_product_request/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
website_sample_product_request/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
website_sample_product_request/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
website_sample_product_request/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
website_sample_product_request/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
website_sample_product_request/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
website_sample_product_request/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
website_sample_product_request/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
website_sample_product_request/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/1-web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/2-web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/3-web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/4-web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/5-web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/6-web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/7-web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/8-web.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

BIN
website_sample_product_request/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

BIN
website_sample_product_request/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
website_sample_product_request/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

606
website_sample_product_request/static/description/index.html

@ -0,0 +1,606 @@
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div class="d-flex align-items-center justify-content-between"
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="assets/misc/cybrosys-logo.png" width="42" height="42"
style="width: 42px; height: 42px;"/>
<div>
<div
style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Website Sample Product Request</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
Website Sample Product Request</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif" class="img-responsive"
style="width: 100%; margin-left: auto; margin-right: auto;"/>
</div>
</div>
</div>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/compass.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn
more about this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#features">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
features of this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#screenshots">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
screenshots for this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="overview">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pie-chart.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Overview
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
This module helps to create sample orders from website By Choosing
Sample Product from Backend.
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="features">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/features.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Features
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center"
style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Available in Odoo 16.0
Community and Enterprise.</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Create a sample order.</span>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Choose Sample Product in products.
</h3>
<img src="assets/screenshots/2-web.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
We can see the Sample Product in Products menu.
</h3>
<img src="assets/screenshots/3-web.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Create Sample Orders in sale.
</h3>
<img src="assets/screenshots/6-web.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Sample Product, Sample Variant and Sample Order.
</h3>
<img src="assets/screenshots/1-web.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Sample product in website.</h3>
<img src="assets/screenshots/7-web.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Sample product order.Price will be zero for the sample
product</h3>
<img src="assets/screenshots/8-web.png" class="img-thumbnail">
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/categories.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Related
Products
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/odoo_website_helpdesk/#"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
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/16.0/odoo_website_helpdesk_dashboard/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
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/16.0/website_product_attachments/#"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item active"
style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/animated_snippet/#"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
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/16.0/customer_geolocation/#"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
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/16.0/insta_feed_snippet/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
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="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="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 RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<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>
</div>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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>
</div>
<!-- END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4 d-flex justify-content-center align-items-center"
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/support.png" height="48" width="48"
style="width: 42px; height: 42px;"/>
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need help?
Get in touch.</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com</p>
</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4 d-flex justify-content-center align-items-center"
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/whatsapp.png" height="52" width="52"
style="width: 52px; height: 52px;"/>
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
+91 86068
27707</p>
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="assets/misc/logo.png" width="144" height="31"
style="width:144px; height: 31px; margin-top: 40px;"/>
</div>
</div>
</div>
<!-- END OF SUPPORT -->

24
website_sample_product_request/views/product_product_views.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- The `action_menu_sample_variant` record represents an action window that allows users to access a list of sample variants.-->
<record id="product_product_action" model="ir.actions.act_window">
<field name="name">Sample Variant</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('is_sample_product','=',True)]</field>
</record>
<!-- This XML snippet defines a form view for a product variant in a system or application.
It sets a default value of 0 for the 'is_sample_product' field.-->
<record id="sample_product_variant_view_form" model="ir.ui.view">
<field name="name">product.product.view.form.inherit.website.sample.product.request</field>
<field name="model">product.product</field>
<field name="arch" type="xml">
<form>
<xpath expr="//field[@name='is_sample_product']"
position="attributes">
<attribute name="default">0</attribute>
</xpath>
</form>
</field>
</record>
</odoo>

31
website_sample_product_request/views/product_template_views.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Adding field and set it attributes in product.template-->
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">
product.template.view.form.inherit.website.sample.product.request
</field>
<field name="model">product.template</field>
<field name="priority" eval="20"/>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='options']" position='inside'>
<span class="d-inline-block">
<field name="is_sample_product"/>
<label for="is_sample_product"/>
</span>
</xpath>
<xpath expr="//field[@name='is_sample_product']"
position="attributes">
<attribute name="default">0</attribute>
</xpath>
</field>
</record>
<!-- Filtering sample products in tree and form view -->
<record id="product_template_action" model="ir.actions.act_window">
<field name="name">Sample Product</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('is_sample_product','=',True)]</field>
</record>
</odoo>

23
website_sample_product_request/views/sale_order_views.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- It opens a window displaying the sales orders related to sample orders.-->
<record id="sale_order_action" model="ir.actions.act_window">
<field name="name">Sample Order</field>
<field name="res_model">sale.order</field>
<field name="view_mode">tree,form</field>
<field name="domain">['&amp;',('website_id', '!=',
False),('is_sample_order','=',True)]
</field>
</record>
<!-- Added a new field in sale order-->
<record id="view_order_form" model="ir.ui.view">
<field name="name">sale.order.view.form.inherit.website.sample.product.request</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='website_id']" position="after">
<field name="is_sample_order"/>
</xpath>
</field>
</record>
</odoo>

19
website_sample_product_request/views/website_sample_product_request_menus.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- This menu item represents the 'Sample' menu in the sales module's main menu.
It provides access to various sample-related actions and sub-menus.-->
<menuitem id="website_sample_product_request_menu_root"
name="Sample"
sequence="10"
parent="sale.sale_menu_root">
<menuitem id="product_template_menu"
action="product_template_action"
sequence="10"/>
<menuitem id="product_product_menu"
action="product_product_action"
sequence="9"/>
<menuitem id="sale_order_menu_action"
action="sale_order_action"
sequence="11"/>
</menuitem>
</odoo>

143
website_sample_product_request/views/website_sample_product_templates.xml

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- This template is responsible for rendering the layout of the products page in a web shop.
It includes features such as product grids, filtering options, sorting, and category headers.
The template handles the display of products in a table format and provides options for customization.-->
<template id="sample_order_template_view" name="Products">
<t t-call="website.layout">
<t t-set="additional_title">Shop</t>
<t t-set="grid_block_name">Grid</t>
<t t-set="product_block_name">Product</t>
<t t-set="navClass" t-valuef="light"/>
<t t-set="opt_wsale_categories"
t-value="is_view_active('website_sale.products_categories')"/>
<t t-set="opt_wsale_attributes"
t-value="is_view_active('website_sale.products_attributes')"/>
<t t-set="opt_wsale_filter_price"
t-value="is_view_active('website_sale.filter_products_price')"/>
<t t-set="opt_wsale_categories_top"
t-value="is_view_active('website_sale.products_categories_top')"/>
<t t-set="opt_wsale_attributes_top"
t-value="is_view_active('website_sale.products_attributes_top')"/>
<t t-set="website_sale_pricelists"
t-value="website.get_pricelist_available(show_visible=True)"/>
<t t-set="website_sale_sortable"
t-value="website._get_product_sort_mapping()"/>
<t t-set="hasLeftColumn"
t-value="opt_wsale_categories or opt_wsale_attributes"/>
<t t-set="isFilteringByPrice" t-if="opt_wsale_filter_price"
t-value="float_round(available_min_price, 2) != float_round(min_price, 2) or float_round(available_max_price, 2) != float_round(max_price, 2)"/>
<t t-set="hasPricelistDropdown"
t-value="website_sale_pricelists and len(website_sale_pricelists)&gt;1"/>
<t t-set="isSortingBy"
t-value="[sort for sort in website_sale_sortable if sort[0]==request.params.get('order', '')]"/>
<div id="wrap" class="js_sale o_wsale_products_page">
<div class="oe_structure oe_empty oe_structure_not_nearest"
id="oe_structure_website_sale_products_1"/>
<div class="container oe_website_sale pt-2">
<div class="row o_wsale_products_main_row align-items-start flex-nowrap">
<div id="products_grid"
t-attf-class="#{'o_wsale_layout_list' if layout_mode == 'list' else ''} {{'col-lg-9' if hasLeftColumn else 'col-12'}}">
<t t-call="website_sale.products_breadcrumb">
<t t-set="_classes"
t-valuef="d-none d-lg-flex w-100 p-0 small"/>
</t>
<div class="products_header btn-toolbar flex-nowrap align-items-center justify-content-between mb-3">
<button t-if="is_view_active('website_sale.sort') or opt_wsale_categories or opt_wsale_attributes or opt_wsale_attributes_top"
t-attf-class="btn btn-{{navClass}} position-relative ms-3 {{not opt_wsale_attributes_top and 'd-lg-none'}}"
data-bs-toggle="offcanvas"
data-bs-target="#o_wsale_offcanvas">
<i class="fa fa-sliders"/>
<span t-if="isFilteringByPrice or attrib_set"
t-attf-class="position-absolute top-0 start-100 translate-middle badge border border-{{navClass}} rounded-circle bg-danger p-1">
<span class="visually-hidden">filters
active
</span>
</span>
</button>
</div>
<div t-if="original_search and products"
class="alert alert-warning mt8">
No results found for '<span
t-esc="original_search"/>'. Showing results
for '<span t-esc="search"/>'.
</div>
<t t-if="category">
<t t-set='editor_msg'>Drag building blocks here
to customize the header for "<t
t-esc='category.name'/>" category.
</t>
<div class="mb16" id="category_header"
t-att-data-editor-message="editor_msg"
t-field="category.website_description"/>
</t>
<div t-cache="pricelist,products" t-if="products"
class="o_wsale_products_grid_table_wrapper pt-3 pt-lg-0">
<table class="table table-borderless h-100 m-0"
t-att-data-ppg="ppg" t-att-data-ppr="ppr"
t-att-data-default-sort="website.shop_default_sort"
t-att-data-name="grid_block_name">
<colgroup t-ignore="true">
<col t-foreach="ppr" t-as="p"/>
</colgroup>
<tbody>
<tr t-foreach="bins" t-as="tr_product">
<t t-foreach="tr_product"
t-as="td_product">
<t t-if="td_product">
<td t-att-colspan="td_product['x'] != 1 and td_product['x']"
t-att-rowspan="td_product['y'] != 1 and td_product['y']"
t-attf-class="oe_product"
t-att-data-ribbon-id="td_product['ribbon'].id"
t-att-data-name="product_block_name">
<div t-attf-class="o_wsale_product_grid_wrapper position-relative h-100 o_wsale_product_grid_wrapper_#{td_product['x']}_#{td_product['y']}">
<t t-call="website_sale.products_item">
<t t-set="product"
t-value="td_product['product']"/>
</t>
</div>
</td>
</t>
<td t-else=""/>
</t>
</tr>
</tbody>
</table>
</div>
<div t-else=""
class="text-center text-muted mt128 mb256">
<t t-if="not search">
<h3 class="mt8">No product defined</h3>
<p t-if="category">No product defined in
category "
<strong
t-esc="category.display_name"/>
".
</p>
</t>
<t t-else="">
<h3 class="mt8">No results</h3>
<p>No results for "<strong t-esc='search'/>"
<t t-if="category">in category "<strong
t-esc="category.display_name"/>"
</t>
.
</p>
</t>
<p t-ignore="true"
groups="sales_team.group_sale_manager">Click <i>
'New'
</i> in the top-right corner to create your
first product.
</p>
</div>
</div>
</div>
<t t-call="website_sale.o_wsale_offcanvas"/>
</div>
<div class="oe_structure oe_empty oe_structure_not_nearest"
id="oe_structure_website_sale_products_2"/>
</div>
</t>
</template>
</odoo>
Loading…
Cancel
Save