| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -59,8 +59,7 @@ odoo.define('pos_multi_variant.ProductPopup', function (require) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        show: function(options) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        {   var self =this; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this._super(options); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        {   this._super(options); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.render_list(options); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -78,7 +77,7 @@ odoo.define('pos_multi_variant.ProductPopup', function (require) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            var category = $(self).find('.action').data('category'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            $('.product-img').find('.variant-selected').each(function () | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {   if($(this).data('category') ==  category) // if so
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {   if($(this).data('category') ==  category) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                {   $(this).text("").removeClass('variant-selected'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    $(self).find('.action').text("Selected").addClass('variant-selected'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -106,6 +105,9 @@ odoo.define('pos_multi_variant.ProductPopup', function (require) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {   if(this.list[i].pos_active == false) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                {   NotActive += 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if(this.list.length == NotActive) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                {   $("#notify").append(ActiveError); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if(this.list[i].pos_active == true) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                {   if (!pushed.includes(this.list[i].attribute[0])) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    {   var temp = {}; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -115,9 +117,6 @@ odoo.define('pos_multi_variant.ProductPopup', function (require) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        AttributeNumbers.push(temp) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if(this.list.length == NotActive) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                {   $("#notify").append(ActiveError); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            var tag = "<div class='"+i+"'>"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            for ( var i in AttributeNumbers) | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -136,7 +135,7 @@ odoo.define('pos_multi_variant.ProductPopup', function (require) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    "<div class='product-img'>"+ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    "<img src='"+this.image_url+"'/>" + | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    "<span class='extra-price'>"+price+"</span>"+ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    "<h2 class='action' data-price='' data-type='' data-category='"+AttributeNumbers[i].name+""'></h2>"+ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    "<h2 class='action' data-price='' data-type='' data-category='"+AttributeNumbers[i].name+"'></h2>"+ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    "<span class='variants'>"+this.variant_values[k].name+"</span>"+ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    "</div>"+ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    "</article>" | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -162,7 +161,7 @@ odoo.define('pos_multi_variant.ProductPopup', function (require) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        click_confirm: function() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        {   var price = 0.00 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            var order = this.self.pos.get_order(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            var order = this.self.pos.get('selectedOrder'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            var selected_orderline = order.selected_orderline | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            $('.product-img').find('.variant-selected').each(function () | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {   price += parseFloat($(this).data('price')) | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |