Browse Source

limit notes to 1000 chars

marton levente 3 months ago
parent
commit
578456958c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      anafapi/anafoauth.py

+ 1 - 0
anafapi/anafoauth.py

@@ -549,6 +549,7 @@ class Efactoauth(Anafoauth):
             notes_ = ''
             notes_ = ''
         for line in invoice.lines:
         for line in invoice.lines:
             notes_ += ' ' + line.item_name
             notes_ += ' ' + line.item_name
+            notes_ = notes_[:1000]
         post = client.add_invoice2(code_,  # ciel.partners.PARTNERS[invoice.seller_party.name]
         post = client.add_invoice2(code_,  # ciel.partners.PARTNERS[invoice.seller_party.name]
                                    lines=document_lines,
                                    lines=document_lines,
                                    date=invoice.issue_date.strftime('%Y-%m-%d'),
                                    date=invoice.issue_date.strftime('%Y-%m-%d'),