| 
						
						
							
								
							
						
						
					 | 
					@ -61,10 +61,9 @@ class ProductImageImportWizard(models.TransientModel): | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        'image_medium': image_base64, | 
					 | 
					 | 
					                        'image_medium': image_base64, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        'name': product, | 
					 | 
					 | 
					                        'name': product, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    if self.pdt_operation == '1': | 
					 | 
					 | 
					                    if self.pdt_operation == '1' and not product_id: | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					                        if not product_id: | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                        product_obj.create(vals) | 
					 | 
					 | 
					                        product_obj.create(vals) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        else: | 
					 | 
					 | 
					                    elif self.pdt_operation == '1' and product_id: | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                        product_id.write(vals) | 
					 | 
					 | 
					                        product_id.write(vals) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    elif self.pdt_operation == '2' and product_id: | 
					 | 
					 | 
					                    elif self.pdt_operation == '2' and product_id: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        product_id.write(vals) | 
					 | 
					 | 
					                        product_id.write(vals) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -85,15 +84,15 @@ class ProductImageImportWizard(models.TransientModel): | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            'image_medium': image_base64, | 
					 | 
					 | 
					                            'image_medium': image_base64, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            'name': product, | 
					 | 
					 | 
					                            'name': product, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        } | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        if self.pdt_operation == '1': | 
					 | 
					 | 
					                        if self.pdt_operation == '1' and not product_id: | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					                            if not product_id: | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                            product_obj.create(vals) | 
					 | 
					 | 
					                            product_obj.create(vals) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                            else: | 
					 | 
					 | 
					                        elif self.pdt_operation == '1' and product_id: | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                            product_id.write(vals) | 
					 | 
					 | 
					                            product_id.write(vals) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        elif self.pdt_operation == '2' and product_id: | 
					 | 
					 | 
					                        elif self.pdt_operation == '2' and product_id: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            product_id.write(vals) | 
					 | 
					 | 
					                            product_id.write(vals) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        elif not product_id and self.pdt_operation == '2': | 
					 | 
					 | 
					                        elif not product_id and self.pdt_operation == '2': | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            raise Warning("Could not find the product '%s'" % product) | 
					 | 
					 | 
					                            raise Warning("Could not find the product '%s'" % product) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                except IOError: | 
					 | 
					 | 
					                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) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |