[PYTHON] ~fix malformed analytic account in sage export
authorLudovic CHEVALIER <ludovic@beurresarrasin.net>
Fri, 27 Oct 2023 12:40:00 +0000 (14:40 +0200)
committerLudovic CHEVALIER <ludovic@beurresarrasin.net>
Fri, 27 Oct 2023 12:40:00 +0000 (14:40 +0200)
wizard/account_export_csv.py

index ed42a8e..6d73cf5 100644 (file)
@@ -193,7 +193,7 @@ class AccountCSVExport(osv.osv_memory):
                     cr, uid, account.user_type.id, context=context)
             if account_type.code in ("expense", "income"):
                 dico['general_analytic'] = "A"
                     cr, uid, account.user_type.id, context=context)
             if account_type.code in ("expense", "income"):
                 dico['general_analytic'] = "A"
-                dico['analytic_account'] = journal.code[3:]
+                dico['analytic_account'] = journal.code[2:]
                 if dico['debit']:
                     row = self.format_row_sage(dico, numero_piece, "D")
                     rows.append(row)
                 if dico['debit']:
                     row = self.format_row_sage(dico, numero_piece, "D")
                     rows.append(row)