Browse Source

[FIX] Package Updated

pull/79/merge
Sreejith P 7 years ago
parent
commit
356579e903
  1. 2
      .travis.yml
  2. 4
      import_product_image/models/import_image.py

2
.travis.yml

@ -27,7 +27,7 @@ virtualenv:
before_install: before_install:
- pip install codecov coverage - pip install codecov coverage
- pip install httpagentparser - pip install httpagentparser
- pip install urllib2 - pip install urllib
install: install:

4
import_product_image/models/import_image.py

@ -20,7 +20,7 @@
# #
################################################################################### ###################################################################################
import csv import csv
import urllib2 import urllib
import base64 import base64
import StringIO import StringIO
import sys import sys
@ -49,7 +49,7 @@ class ProductImageImportWizard(models.TransientModel):
image_path = row[1] image_path = row[1]
if "http://" in image_path or "https://" in image_path: if "http://" in image_path or "https://" in image_path:
try: try:
link = urllib2.urlopen(image_path).read() link = urllib.urlopen(image_path).read()
image_base64 = base64.encodestring(link) image_base64 = base64.encodestring(link)
if self.product_model == '1': if self.product_model == '1':
product_obj = self.env['product.template'] product_obj = self.env['product.template']

Loading…
Cancel
Save