mirror of
				https://github.com/brain-tec/account_ebics.git
				synced 2025-11-04 07:00:35 +00:00 
			
		
		
		
	add passphrase constraint
This commit is contained in:
		@@ -228,6 +228,13 @@ class EbicsConfig(models.Model):
 | 
				
			|||||||
            cfg.ebics_keys_found = (
 | 
					            cfg.ebics_keys_found = (
 | 
				
			||||||
                cfg.ebics_keys and os.path.isfile(cfg.ebics_keys))
 | 
					                cfg.ebics_keys and os.path.isfile(cfg.ebics_keys))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @api.constrains('ebics_passphrase')
 | 
				
			||||||
 | 
					    def _check_ebics_passphrase(self):
 | 
				
			||||||
 | 
					        for cfg in self:
 | 
				
			||||||
 | 
					            if not cfg.ebics_passphrase or len(cfg.ebics_passphrase) < 8:
 | 
				
			||||||
 | 
					                raise UserError(_(
 | 
				
			||||||
 | 
					                    "The passphrase must be at least 8 characters long"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @api.constrains('order_number')
 | 
					    @api.constrains('order_number')
 | 
				
			||||||
    def _check_order_number(self):
 | 
					    def _check_order_number(self):
 | 
				
			||||||
        for cfg in self:
 | 
					        for cfg in self:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user