Browse Source

[uptd] Index File Updated

pull/57/head
Sreejith 8 years ago
parent
commit
82601002a1
  1. 21
      import_product_image/models/import_image.py
  2. 16
      import_product_image/static/description/index.html
  3. BIN
      import_product_image/static/description/product.png

21
import_product_image/models/import_image.py

@ -61,11 +61,10 @@ class ProductImageImportWizard(models.TransientModel):
'image_medium': image_base64,
'name': product,
}
if self.pdt_operation == '1':
if not product_id:
product_obj.create(vals)
else:
product_id.write(vals)
if self.pdt_operation == '1' and not product_id:
product_obj.create(vals)
elif self.pdt_operation == '1' and product_id:
product_id.write(vals)
elif self.pdt_operation == '2' and product_id:
product_id.write(vals)
elif not product_id and self.pdt_operation == '2':
@ -85,15 +84,15 @@ class ProductImageImportWizard(models.TransientModel):
'image_medium': image_base64,
'name': product,
}
if self.pdt_operation == '1':
if not product_id:
product_obj.create(vals)
else:
product_id.write(vals)
if self.pdt_operation == '1' and not product_id:
product_obj.create(vals)
elif self.pdt_operation == '1' and product_id:
product_id.write(vals)
elif self.pdt_operation == '2' and product_id:
product_id.write(vals)
elif not product_id and self.pdt_operation == '2':
raise Warning("Could not find the product '%s'" % product)
except IOError:
raise Warning("Could not find the image '%s' - please make sure it is accessible to this script" % product)
raise Warning("Could not find the image '%s' - please make sure it is accessible to this script" %
product)

16
import_product_image/static/description/index.html

@ -57,6 +57,22 @@
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Imported Product Images</h4>
<p>
</div>
<div style="text-align: center">
<span>Here you can see all your product with imported images</span>
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="product.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>

BIN
import_product_image/static/description/product.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Loading…
Cancel
Save