Browse Source

Nov 3 : [FIX] Bug Fixed 'odoo_icecat_connector'

pull/295/head
AjmalCybro 2 years ago
parent
commit
4dc49a3d61
  1. 2
      odoo_icecat_connector/__manifest__.py
  2. 2
      odoo_icecat_connector/controllers/odoo_icecat_connector.py
  3. 4
      odoo_icecat_connector/models/product_template.py

2
odoo_icecat_connector/__manifest__.py

@ -31,7 +31,7 @@
' the Icecat database with Odoo, businesses can import ' ' the Icecat database with Odoo, businesses can import '
'accurate product details', 'accurate product details',
'category': 'eCommerce', 'category': 'eCommerce',
'version': '16.0.1.0.0', 'version': '16.0.1.0.1',
'author': 'Cybrosys Techno Solutions', 'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions',

2
odoo_icecat_connector/controllers/odoo_icecat_connector.py

@ -43,7 +43,7 @@ class Icecat(WebsiteSale):
category=category and category.id, search=search, **kwargs, ), ) category=category and category.id, search=search, **kwargs, ), )
# Needed to trigger the recently viewed product rpc # Needed to trigger the recently viewed product rpc
view_track = request.website.viewref("website_sale.product").track view_track = request.website.viewref("website_sale.product").track
username = request.env['ir.config_parameter'].get_param( username = request.env['ir.config_parameter'].sudo().get_param(
'odoo_icecat_connector.user_id_icecat') 'odoo_icecat_connector.user_id_icecat')
if username: if username:
response = requests.get( response = requests.get(

4
odoo_icecat_connector/models/product_template.py

@ -33,8 +33,8 @@ class ProductTemplateInherited(models.Model):
def get_icecat_product_details(self, product_id): def get_icecat_product_details(self, product_id):
"""Returns the details of a product""" """Returns the details of a product"""
if product_id: if product_id:
products = self.env['product.product'].browse(int(product_id)) products = self.env['product.product'].sudo().browse(int(product_id))
username = self.env['ir.config_parameter'].get_param( username = self.env['ir.config_parameter'].sudo().get_param(
'odoo_icecat_connector.user_id_icecat') 'odoo_icecat_connector.user_id_icecat')
icecat_product_details = {'brand': products.brand, icecat_product_details = {'brand': products.brand,
'product_code': products.default_code, 'product_code': products.default_code,

Loading…
Cancel
Save