Skip to content

Commit 2ed836d

Browse files
committed
Values handled with quote_attrib are now encoded properly
1 parent 89fa18d commit 2ed836d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

finvoice/finvoice201.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13265,7 +13265,7 @@ def export(self, outfile, level, namespace_='', name_='QuantityType', namespaced
1326513265
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='QuantityType'):
1326613266
if self.QuantityUnitCode is not None and 'QuantityUnitCode' not in already_processed:
1326713267
already_processed.add('QuantityUnitCode')
13268-
outfile.write(' QuantityUnitCode=%s' % (quote_attrib(self.QuantityUnitCode), ))
13268+
outfile.write(' QuantityUnitCode=%s' % (quote_attrib(self.QuantityUnitCode).encode(ExternalEncoding), ))
1326913269
if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
1327013270
already_processed.add('xsi:type')
1327113271
outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
@@ -13510,7 +13510,7 @@ def export(self, outfile, level, namespace_='', name_='AnyPartyTextType', namesp
1351013510
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AnyPartyTextType'):
1351113511
if self.AnyPartyCode is not None and 'AnyPartyCode' not in already_processed:
1351213512
already_processed.add('AnyPartyCode')
13513-
outfile.write(' AnyPartyCode=%s' % (quote_attrib(self.AnyPartyCode), ))
13513+
outfile.write(' AnyPartyCode=%s' % (quote_attrib(self.AnyPartyCode).encode(ExternalEncoding), ))
1351413514
if self.extensiontype_ is not None and 'xsi:type' not in already_processed:
1351513515
already_processed.add('xsi:type')
1351613516
outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
@@ -13675,7 +13675,7 @@ def export(self, outfile, level, namespace_='', name_='date', namespacedef_='',
1367513675
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='date'):
1367613676
if self.Format is not None and 'Format' not in already_processed:
1367713677
already_processed.add('Format')
13678-
outfile.write(' Format=%s' % (self.gds_format_string(quote_attrib(self.Format).encode(ExternalEncoding), input_name='Format'), ))
13678+
outfile.write(' Format=%s' % (self.gds_format_string(quote_attrib(self.Format).encode(ExternalEncoding).encode(ExternalEncoding), input_name='Format'), ))
1367913679
def exportChildren(self, outfile, level, namespace_='', name_='date', fromsubclass_=False, pretty_print=True):
1368013680
pass
1368113681
def exportLiteral(self, outfile, level, name_='date'):
@@ -13927,7 +13927,7 @@ def exportAttributes(self, outfile, level, already_processed, namespace_='', nam
1392713927
outfile.write(' AmountCurrencyIdentifier=%s' % (self.gds_format_string(quote_attrib(self.AmountCurrencyIdentifier).encode(ExternalEncoding), input_name='AmountCurrencyIdentifier'), ))
1392813928
if self.UnitPriceUnitCode is not None and 'UnitPriceUnitCode' not in already_processed:
1392913929
already_processed.add('UnitPriceUnitCode')
13930-
outfile.write(' UnitPriceUnitCode=%s' % (quote_attrib(self.UnitPriceUnitCode), ))
13930+
outfile.write(' UnitPriceUnitCode=%s' % (quote_attrib(self.UnitPriceUnitCode).encode(ExternalEncoding), ))
1393113931
def exportChildren(self, outfile, level, namespace_='', name_='unitAmount', fromsubclass_=False, pretty_print=True):
1393213932
pass
1393313933
def exportLiteral(self, outfile, level, name_='unitAmount'):
@@ -15359,7 +15359,7 @@ def export(self, outfile, level, namespace_='', name_='DefinitionHeaderTextType'
1535915359
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DefinitionHeaderTextType'):
1536015360
if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
1536115361
already_processed.add('DefinitionCode')
15362-
outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode), ))
15362+
outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode).encode(ExternalEncoding), ))
1536315363
def exportChildren(self, outfile, level, namespace_='', name_='DefinitionHeaderTextType', fromsubclass_=False, pretty_print=True):
1536415364
pass
1536515365
def exportLiteral(self, outfile, level, name_='DefinitionHeaderTextType'):
@@ -15543,7 +15543,7 @@ def export(self, outfile, level, namespace_='', name_='RowDefinitionHeaderTextTy
1554315543
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RowDefinitionHeaderTextType'):
1554415544
if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
1554515545
already_processed.add('DefinitionCode')
15546-
outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode), ))
15546+
outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode).encode(ExternalEncoding), ))
1554715547
def exportChildren(self, outfile, level, namespace_='', name_='RowDefinitionHeaderTextType', fromsubclass_=False, pretty_print=True):
1554815548
pass
1554915549
def exportLiteral(self, outfile, level, name_='RowDefinitionHeaderTextType'):
@@ -17086,7 +17086,7 @@ def export(self, outfile, level, namespace_='', name_='SubRowDefinitionHeaderTex
1708617086
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='SubRowDefinitionHeaderTextType'):
1708717087
if self.DefinitionCode is not None and 'DefinitionCode' not in already_processed:
1708817088
already_processed.add('DefinitionCode')
17089-
outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode), ))
17089+
outfile.write(' DefinitionCode=%s' % (quote_attrib(self.DefinitionCode).encode(ExternalEncoding), ))
1709017090
def exportChildren(self, outfile, level, namespace_='', name_='SubRowDefinitionHeaderTextType', fromsubclass_=False, pretty_print=True):
1709117091
pass
1709217092
def exportLiteral(self, outfile, level, name_='SubRowDefinitionHeaderTextType'):

0 commit comments

Comments
 (0)