|  |  | @ -32,7 +32,16 @@ class PaymentTransaction(models.Model): | 
			
		
	
		
			
				
					|  |  |  | string='Online payment', copy=False, readonly=True) | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | reference2=fields.Char('type',compute='compute_reference') | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | invoice_bug=fields.Boolean(string="invoice bug", compute='_compute_invoice_bug',store=True) | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | def _compute_invoice_bug(self): | 
			
		
	
		
			
				
					|  |  |  | for rec in self: | 
			
		
	
		
			
				
					|  |  |  | rec.invoice_bug=False | 
			
		
	
		
			
				
					|  |  |  | for invoice in rec.invoice_ids: | 
			
		
	
		
			
				
					|  |  |  | if rec.state in ['done','authorized'] and invoice.payment_state!='paid' and invoice.state=='posted': | 
			
		
	
		
			
				
					|  |  |  | rec.invoice_bug=True | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | def compute_reference(self): | 
			
		
	
		
			
				
					|  |  |  | for rec in self: | 
			
		
	
		
			
				
					|  |  |  | rec.reference2='Participation' | 
			
		
	
	
		
			
				
					|  |  | 
 |