@ -0,0 +1,37 @@ |
|||||
|
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg |
||||
|
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html |
||||
|
:alt: License: LGPL-3 |
||||
|
|
||||
|
Theme Coffee Shop |
||||
|
================= |
||||
|
This is a theme for Coffee Shop. |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
Developer: Ayisha Sumayya K and Abbas P @cybrosys, Contact: odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
* Website : https://cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
|
||||
|
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Ayisha Sumayya K (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from . import models |
||||
|
from . import controllers |
@ -0,0 +1,65 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Ayisha Sumayya K(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': 'Coffee Shop', |
||||
|
'description': 'Theme Coffee Shop', |
||||
|
'summary': 'Theme Coffee Shop', |
||||
|
'version': '16.0.1.0.0', |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'website': 'https://www.cybrosys.com', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'category': 'Theme/Creative', |
||||
|
'depends': ['website_sale', 'website_sale_wishlist','auth_oauth', ], |
||||
|
'data': [ |
||||
|
'data/menu.xml', |
||||
|
'views/header.xml', |
||||
|
'views/login.xml', |
||||
|
'views/footer.xml', |
||||
|
'views/contact_us.xml', |
||||
|
'views/cart.xml', |
||||
|
'views/cart_lines.xml', |
||||
|
'views/cart_popover.xml', |
||||
|
'views/cart_summary.xml', |
||||
|
'views/payment.xml', |
||||
|
'views/payment_summary.xml', |
||||
|
'views/product.xml', |
||||
|
'views/address.xml', |
||||
|
'views/shop.xml', |
||||
|
'views/about_us.xml', |
||||
|
'views/feature.xml', |
||||
|
'views/menu_page.xml', |
||||
|
], |
||||
|
'assets': { |
||||
|
'web.assets_frontend': [ |
||||
|
'theme_coffee_shop/static/src/css/style.css', |
||||
|
'theme_coffee_shop/static/src/js/action.js', |
||||
|
], |
||||
|
}, |
||||
|
'images': ['static/description/banner.png', |
||||
|
'static/src/images/thumbnail/theme_coffee.jpeg', ], |
||||
|
'license': 'LGPL-3', |
||||
|
'auto_install': False, |
||||
|
'installable': True, |
||||
|
'application': False |
||||
|
} |
||||
|
|
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Ayisha Sumayya K (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from . import menu_page |
@ -0,0 +1,385 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Ayisha Sumayya K (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from collections import defaultdict |
||||
|
from itertools import product as cartesian_product |
||||
|
from datetime import datetime |
||||
|
from werkzeug.exceptions import NotFound |
||||
|
|
||||
|
from odoo import fields, http, tools, _ |
||||
|
from odoo.http import request |
||||
|
from odoo.addons.http_routing.models.ir_http import slug |
||||
|
from odoo.addons.website.controllers.main import QueryURL |
||||
|
from odoo.addons.website.models.ir_http import sitemap_qs2dom |
||||
|
|
||||
|
from odoo.osv import expression |
||||
|
from odoo.tools import lazy |
||||
|
|
||||
|
|
||||
|
class TableComputeCoffee(object): |
||||
|
""" Compute data related to coffee shop theme """ |
||||
|
|
||||
|
def __init__(self): |
||||
|
self.table = {} |
||||
|
|
||||
|
def _check_place(self, posx, posy, sizex, sizey, ppr): |
||||
|
res = True |
||||
|
for yaxix in range(sizey): |
||||
|
for xaxix in range(sizex): |
||||
|
if posx + xaxix >= ppr: |
||||
|
res = False |
||||
|
break |
||||
|
row = self.table.setdefault(posy + yaxix, {}) |
||||
|
if row.setdefault(posx + xaxix) is not None: |
||||
|
res = False |
||||
|
break |
||||
|
for x in range(ppr): |
||||
|
self.table[posy + yaxix].setdefault(xaxix, None) |
||||
|
return res |
||||
|
|
||||
|
def process(self, products, ppg=20, ppr=4): |
||||
|
"""Compute products positions on the grid""" |
||||
|
minpos = 0 |
||||
|
index = 0 |
||||
|
maxy = 0 |
||||
|
rec = 0 |
||||
|
for pdct in products: |
||||
|
rec = min(max(pdct.website_size_x, 1), ppr) |
||||
|
res = min(max(pdct.website_size_y, 1), ppr) |
||||
|
if index >= ppg: |
||||
|
rec = res = 1 |
||||
|
|
||||
|
pos = minpos |
||||
|
while not self._check_place(pos % ppr, pos // ppr, rec, res, ppr): |
||||
|
pos += 1 |
||||
|
if index >= ppg and ((pos + 1.0) // ppr) > maxy: |
||||
|
break |
||||
|
|
||||
|
if rec == 1 and res == 1: |
||||
|
minpos = pos // ppr |
||||
|
|
||||
|
for y2 in range(res): |
||||
|
for x2 in range(rec): |
||||
|
self.table[(pos // ppr) + y2][(pos % ppr) + x2] = False |
||||
|
self.table[pos // ppr][pos % ppr] = { |
||||
|
'product': pdct, 'x': rec, 'y': res, |
||||
|
'ribbon': pdct._get_website_ribbon(), |
||||
|
} |
||||
|
if index <= ppg: |
||||
|
maxy = max(maxy, res + (pos // ppr)) |
||||
|
index += 1 |
||||
|
|
||||
|
rows = sorted(self.table.items()) |
||||
|
rows = [r[1] for r in rows] |
||||
|
for col in range(len(rows)): |
||||
|
cols = sorted(rows[col].items()) |
||||
|
rec += len(cols) |
||||
|
rows[col] = [r[1] for r in cols if r[1]] |
||||
|
|
||||
|
return rows |
||||
|
|
||||
|
|
||||
|
class ThemeCoffeeMenu(http.Controller): |
||||
|
""" controller for rendering datas to menu page """ |
||||
|
|
||||
|
def _get_search_order(self, post): |
||||
|
""" OrderBy will be parsed in orm and so no direct sql injection id is |
||||
|
added to be sure that order is a unique sort key |
||||
|
""" |
||||
|
order = post.get('order') or \ |
||||
|
request.env['website'].get_current_website().shop_default_sort |
||||
|
return 'is_published desc, %s, id desc' % order |
||||
|
|
||||
|
def _get_search_domain(self, search, category, attrib_values, |
||||
|
search_in_description=True): |
||||
|
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([('website_description', 'ilike', srch)]) |
||||
|
subdomains.append([('description_sale', 'ilike', srch)]) |
||||
|
domains.append(expression.OR(subdomains)) |
||||
|
|
||||
|
if category: |
||||
|
domains.append([('public_categ_ids', 'child_of', int(category))]) |
||||
|
|
||||
|
if attrib_values: |
||||
|
attrib = None |
||||
|
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) |
||||
|
|
||||
|
def sitemap_shop(env, rule, qs): |
||||
|
if not qs or qs.lower() in '/menu': |
||||
|
yield {'loc': '/menu'} |
||||
|
|
||||
|
Category = env['product.public.category'] |
||||
|
dom = sitemap_qs2dom(qs, '/menu/category', Category._rec_name) |
||||
|
dom += env['website'].get_current_website().website_domain() |
||||
|
for cat in Category.search(dom): |
||||
|
loc = '/menu/category/%s' % slug(cat) |
||||
|
if not qs or qs.lower() in loc: |
||||
|
yield {'loc': loc} |
||||
|
|
||||
|
def _get_search_options( |
||||
|
self, category=None, attrib_values=None, pricelist=None, **post): |
||||
|
return { |
||||
|
'displayDescription': True, |
||||
|
'displayDetail': True, |
||||
|
'displayExtraDetail': True, |
||||
|
'displayExtraLink': True, |
||||
|
'displayImage': True, |
||||
|
'allowFuzzy': not post.get('noFuzzy'), |
||||
|
'category': str(category.id) if category else None, |
||||
|
'attrib_values': attrib_values, |
||||
|
'display_currency': pricelist.currency_id, |
||||
|
} |
||||
|
|
||||
|
def _shop_lookup_products(self, attrib_set, options, post, search, website): |
||||
|
""" No limit because attributes are obtained from complete |
||||
|
product list""" |
||||
|
|
||||
|
product_count, details, fuzzy_search_term = website._search_with_fuzzy( |
||||
|
"products_only", search, limit=None, |
||||
|
order=self._get_search_order(post), options=options |
||||
|
) |
||||
|
search_result = details[0].get( |
||||
|
'results', request.env['product.template'] |
||||
|
).with_context(bin_size=True) |
||||
|
if attrib_set: |
||||
|
attribute_values = request.env['product.attribute.value'].browse(attrib_set) |
||||
|
values_per_attribute = defaultdict( |
||||
|
lambda: request.env['product.attribute.value']) |
||||
|
|
||||
|
multi_value_attribute = False |
||||
|
for value in attribute_values: |
||||
|
values_per_attribute[value.attribute_id] |= value |
||||
|
if len(values_per_attribute[value.attribute_id]) > 1: |
||||
|
multi_value_attribute = True |
||||
|
|
||||
|
def filter_template(template, attribute_values_list): |
||||
|
"""Transform product.attribute.value to |
||||
|
product.template.attribute.value """ |
||||
|
attribute_value_to_ptav = dict() |
||||
|
for ptav in template.attribute_line_ids.product_template_value_ids: |
||||
|
attribute_value_to_ptav[ptav.product_attribute_value_id] = ptav.id |
||||
|
possible_combinations = False |
||||
|
for attribute_values in attribute_values_list: |
||||
|
ptavs = request.env['product.template.attribute.value'].browse( |
||||
|
[attribute_value_to_ptav[val] |
||||
|
for val in attribute_values |
||||
|
if val in attribute_value_to_ptav] |
||||
|
) |
||||
|
if len(ptavs) < len(attribute_values): |
||||
|
continue |
||||
|
if len(ptavs) == len(template.attribute_line_ids): |
||||
|
if template._is_combination_possible(ptavs): |
||||
|
return True |
||||
|
elif len(ptavs) < len(template.attribute_line_ids): |
||||
|
if len(attribute_values_list) == 1: |
||||
|
if any(template._get_possible_combinations( |
||||
|
necessary_values=ptavs)): |
||||
|
return True |
||||
|
if not possible_combinations: |
||||
|
possible_combinations = template._get_possible_combinations() |
||||
|
if any(len(ptavs & combination) == len(ptavs) |
||||
|
for combination in possible_combinations): |
||||
|
return True |
||||
|
return False |
||||
|
|
||||
|
if not multi_value_attribute: |
||||
|
possible_attrib_values_list = [attribute_values] |
||||
|
else: |
||||
|
possible_attrib_values_list = [ |
||||
|
request.env['product.attribute.value'].browse( |
||||
|
[v.id for v in values]) for values in cartesian_product( |
||||
|
*values_per_attribute.values()) |
||||
|
] |
||||
|
|
||||
|
search_result = search_result.filtered( |
||||
|
lambda tmpl: filter_template(tmpl, possible_attrib_values_list) |
||||
|
) |
||||
|
return fuzzy_search_term, product_count, search_result |
||||
|
|
||||
|
def _menu_get_query_url_kwargs(self, category, search, attrib=None, |
||||
|
order=None, **post): |
||||
|
return { |
||||
|
'category': category, |
||||
|
'search': search, |
||||
|
'attrib': attrib, |
||||
|
'order': order, |
||||
|
} |
||||
|
|
||||
|
def _get_additional_shop_values(self, values): |
||||
|
""" Hook to update values used for rendering website_sale.products template """ |
||||
|
return {} |
||||
|
|
||||
|
@http.route([ |
||||
|
'/menu', |
||||
|
'/menu/page/<int:page>', |
||||
|
'/menu/category/<model("product.public.category"):category>', |
||||
|
'/menu/category/<model("product.public.category"):category>/page/<int:page>', |
||||
|
], type='http', auth="public", website=True, sitemap=sitemap_shop) |
||||
|
def menu_page(self, page=0, category=None, search='', |
||||
|
min_price=0.0, max_price=0.0, ppg=False, **post): |
||||
|
add_qty = int(post.get('add_qty', 1)) |
||||
|
|
||||
|
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('/menu', **self._menu_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) |
||||
|
|
||||
|
url = "/menu" |
||||
|
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, |
||||
|
**post |
||||
|
) |
||||
|
fuzzy_search_term, product_count, search_product = \ |
||||
|
self._shop_lookup_products(attrib_set, options, post, search, website) |
||||
|
|
||||
|
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 = "/menu/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] |
||||
|
|
||||
|
ProductAttribute = request.env['product.attribute'] |
||||
|
if products: |
||||
|
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)) |
||||
|
|
||||
|
values = { |
||||
|
'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, |
||||
|
'bins': lazy(lambda: TableComputeCoffee().process(products, ppg, ppr)), |
||||
|
'ppg': ppg, |
||||
|
'ppr': ppr, |
||||
|
'categories': categs, |
||||
|
'attributes': attributes, |
||||
|
'keep': keep, |
||||
|
'search_categories_ids': search_categories.ids, |
||||
|
'products_prices': products_prices, |
||||
|
'get_product_prices': lambda product: lazy( |
||||
|
lambda: products_prices[product.id] |
||||
|
), |
||||
|
'float_round': tools.float_round, |
||||
|
} |
||||
|
if category: |
||||
|
values['main_object'] = category |
||||
|
values.update(self._get_additional_shop_values(values)) |
||||
|
return request.render("theme_coffee_shop.coffee_menu", values) |
@ -0,0 +1,27 @@ |
|||||
|
<odoo> |
||||
|
<data noupdate="1"> |
||||
|
|
||||
|
<record id="menu_about_sub" model="website.menu"> |
||||
|
<field name="name">About us</field> |
||||
|
<field name="url">/about</field> |
||||
|
<field name="parent_id" ref="website.main_menu"/> |
||||
|
<field name="sequence" type="int">30</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="menu_feature" model="website.menu"> |
||||
|
<field name="name">Features</field> |
||||
|
<field name="url">/feature</field> |
||||
|
<field name="parent_id" ref="website.main_menu"/> |
||||
|
<field name="sequence" type="int">35</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="menu_menu" model="website.menu"> |
||||
|
<field name="name">Menu</field> |
||||
|
<field name="url">/menu</field> |
||||
|
<field name="parent_id" ref="website.main_menu"/> |
||||
|
<field name="sequence" type="int">15</field> |
||||
|
</record> |
||||
|
|
||||
|
|
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,7 @@ |
|||||
|
## Module <theme_coffee_shop> |
||||
|
|
||||
|
#### 21.02.2023 |
||||
|
#### Version 16.0.1.0.0 |
||||
|
#### ADD |
||||
|
|
||||
|
- Initial commit for Theme Coffee Shop |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Ayisha Sumayya K (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import main |
@ -0,0 +1,43 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Ayisha Sumayya K (odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import models, api, fields |
||||
|
|
||||
|
|
||||
|
class ThemeCoffee(models.AbstractModel): |
||||
|
""" class for enable and disable templates when using coffee shop theme """ |
||||
|
_inherit = 'theme.utils' |
||||
|
|
||||
|
@api.model |
||||
|
def _theme_coffee_shop_post_copy(self, mod): |
||||
|
""" enable and disable templates when using coffee shop theme """ |
||||
|
|
||||
|
self.enable_view("website_sale.products_categories") |
||||
|
self.enable_view("website_sale.products_description") |
||||
|
self.enable_view("website_sale.products_design_card") |
||||
|
self.enable_view("website_sale.products_add_to_cart") |
||||
|
self.enable_view("website_sale.product_comment") |
||||
|
self.enable_view("website_sale.option_collapse_products_categories") |
||||
|
self.enable_view("website_sale.product_buy_now") |
||||
|
|
||||
|
self.disable_view("website_sale.products_categories_top") |
||||
|
self.disable_view("website_sale.products_design_grid") |
||||
|
|
After Width: | Height: | Size: 219 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 376 KiB |
After Width: | Height: | Size: 5.1 MiB |
After Width: | Height: | Size: 843 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 899 B |
After Width: | Height: | Size: 848 B |
After Width: | Height: | Size: 936 B |
After Width: | Height: | Size: 1001 B |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.6 MiB |
After Width: | Height: | Size: 990 KiB |
After Width: | Height: | Size: 930 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 165 KiB |
After Width: | Height: | Size: 1.7 MiB |
After Width: | Height: | Size: 269 KiB |
After Width: | Height: | Size: 195 KiB |
After Width: | Height: | Size: 950 KiB |
After Width: | Height: | Size: 570 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 245 KiB |
After Width: | Height: | Size: 328 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 890 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 283 KiB |
After Width: | Height: | Size: 993 KiB |
After Width: | Height: | Size: 928 KiB |
After Width: | Height: | Size: 940 KiB |
After Width: | Height: | Size: 553 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 975 KiB |
After Width: | Height: | Size: 999 KiB |
After Width: | Height: | Size: 329 KiB |
After Width: | Height: | Size: 969 KiB |
After Width: | Height: | Size: 924 KiB |
After Width: | Height: | Size: 735 KiB |
After Width: | Height: | Size: 576 KiB |
After Width: | Height: | Size: 954 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 953 KiB |
After Width: | Height: | Size: 972 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 809 KiB |
After Width: | Height: | Size: 922 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 168 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 670 KiB |
After Width: | Height: | Size: 251 KiB |
After Width: | Height: | Size: 975 KiB |
After Width: | Height: | Size: 269 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 524 B |
After Width: | Height: | Size: 795 B |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 343 KiB |
After Width: | Height: | Size: 5.6 MiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 1.7 MiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 24 KiB |