UBL Integration Naming UBL-File

develop
Andreas Osim 2025-03-26 13:21:12 +01:00
parent ddb89057d7
commit 905d4264df
1 changed files with 6 additions and 0 deletions

View File

@ -89,6 +89,12 @@ class AccountInvoice(models.Model):
sent_by_mail = fields.Boolean(string='Per EMail versandt',track_visibility='onchange')
@api.multi
def get_ubl_filename(self, version='2.1'):
self.ensure_one()
"""This method is designed to be inherited"""
return 'Invoice_%s-UBL-%s.xml' % (self.number, version)
@api.multi
@api.onchange('partner_shipping_id')