mirror of
				https://github.com/brain-tec/account_ebics.git
				synced 2025-11-04 07:00:35 +00:00 
			
		
		
		
	suffix no longer required
This commit is contained in:
		@@ -56,7 +56,6 @@ class EbicsFileFormat(models.Model):
 | 
				
			|||||||
    )
 | 
					    )
 | 
				
			||||||
    description = fields.Char()
 | 
					    description = fields.Char()
 | 
				
			||||||
    suffix = fields.Char(
 | 
					    suffix = fields.Char(
 | 
				
			||||||
        required=True,
 | 
					 | 
				
			||||||
        help="Specify the filename suffix for this File Format.\nE.g. c53.xml",
 | 
					        help="Specify the filename suffix for this File Format.\nE.g. c53.xml",
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    # EBICS 3.0 BTF
 | 
					    # EBICS 3.0 BTF
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -374,7 +374,7 @@ class EbicsXfer(models.TransientModel):
 | 
				
			|||||||
                        ef_note += "\n" + _("Origin: %s") % self._context["origin"]
 | 
					                        ef_note += "\n" + _("Origin: %s") % self._context["origin"]
 | 
				
			||||||
                    suffix = self.format_id.suffix
 | 
					                    suffix = self.format_id.suffix
 | 
				
			||||||
                    fn = self.upload_fname
 | 
					                    fn = self.upload_fname
 | 
				
			||||||
                    if not fn.endswith(suffix):
 | 
					                    if suffix and not fn.endswith(suffix):
 | 
				
			||||||
                        fn = ".".join([fn, suffix])
 | 
					                        fn = ".".join([fn, suffix])
 | 
				
			||||||
                    ef_vals = {
 | 
					                    ef_vals = {
 | 
				
			||||||
                        "name": self.upload_fname,
 | 
					                        "name": self.upload_fname,
 | 
				
			||||||
@@ -554,7 +554,10 @@ class EbicsXfer(models.TransientModel):
 | 
				
			|||||||
        if file_format.name in ff_methods:
 | 
					        if file_format.name in ff_methods:
 | 
				
			||||||
            data = ff_methods[file_format.name](data)
 | 
					            data = ff_methods[file_format.name](data)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        fn = ".".join([base_fn, file_format.suffix])
 | 
					        fn = base_fn
 | 
				
			||||||
 | 
					        suffix = file_format.suffix
 | 
				
			||||||
 | 
					        if suffix and not fn.endswith(suffix):
 | 
				
			||||||
 | 
					            fn = ".".join([fn, suffix])
 | 
				
			||||||
        dups = self._check_duplicate_ebics_file(fn, file_format)
 | 
					        dups = self._check_duplicate_ebics_file(fn, file_format)
 | 
				
			||||||
        if dups:
 | 
					        if dups:
 | 
				
			||||||
            raise UserError(
 | 
					            raise UserError(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user