Browse Source

[FIX] Args Value to Function

pull/30/merge
SHEREEF PT 8 years ago
parent
commit
341a721524
  1. 2
      website_sale_product_quick_view/__manifest__.py
  2. 48
      website_sale_product_quick_view/__manifest__.py~
  3. 2
      website_sale_product_quick_view/controllers/main.py
  4. 29
      website_sale_product_quick_view/controllers/main.py~

2
website_sale_product_quick_view/__manifest__.py

@ -23,7 +23,7 @@
{
'name': "E-commerce Product Quick View",
'version': '10.0.1.0.0',
'version': '10.0.2.0.0',
'summary': """E-commerce Product Quick View.""",
'description': """E-commerce Product Quick View.""",
'author': 'Cybrosys Techno Solutions',

48
website_sale_product_quick_view/__manifest__.py~

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Hilar AK(<hilar@cybrosys.in>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': "E-commerce Product Quick View",
'version': '10.0.1.0.0',
'summary': """E-commerce Product Quick View.""",
'description': """E-commerce Product Quick View.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': "https://cybrosys.com",
'category': 'eCommerce',
'depends': ['base',
'website_sale',
'website_mail',
'rating',
],
'data': [
# 'security/ir.model.access.csv',
'views/assets.xml',
'views/template.xml',
],
'demo': [],
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'installable': True,
'application': True
}

2
website_sale_product_quick_view/controllers/main.py

@ -21,7 +21,7 @@ class WebsiteSaleExtend(main.WebsiteSale):
:param post:
:return:
"""
response = super(WebsiteSaleExtend, self).shop(page=0, category=None, search='', ppg=False, **post)
response = super(WebsiteSaleExtend, self).shop(page=page, category=category, search=search, ppg=ppg, **post)
response.qcontext.update({
'get_attribute_value_ids': self.get_attribute_value_ids,
'rating_status': response.qcontext.get('rating_product'),

29
website_sale_product_quick_view/controllers/main.py~

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
from odoo import http
from odoo.addons.website_sale.controllers import main
class WebsiteSaleExtend(main.WebsiteSale):
@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)
def shop(self, page=0, category=None, search='', ppg=False, **post):
"""
Overrided function to update the response with products objects.Here we are updating qcontext.
:param page:
:param category:
:param search:
:param ppg:
:param post:
:return:
"""
response = super(WebsiteSaleExtend, self).shop(page=0, category=None, search='', ppg=False, **post)
response.qcontext.update({
'get_attribute_value_ids': self.get_attribute_value_ids,
'rating_status': response.qcontext.get('rating_product'),
})
return response
Loading…
Cancel
Save