[PYTHON] ~export wizard: +arbitrary 'OD' journal code for journals 'BQ' and 'CB' 7.0_export_sage
authorLudovic CHEVALIER <ludovic@beurresarrasin.net>
Sat, 1 Oct 2022 11:36:44 +0000 (13:36 +0200)
committerLudovic CHEVALIER <ludovic@beurresarrasin.net>
Sat, 1 Oct 2022 11:36:44 +0000 (13:36 +0200)
wizard/account_export_csv.py

index 2cab3bd..ed42a8e 100644 (file)
@@ -158,6 +158,8 @@ class AccountCSVExport(osv.osv_memory):
             dico = {}
             journal = journal_obj.browse(cr, uid, line[1], context=context)
             dico['journal_code'] = journal.code[0:2]
+            if dico['journal_code'] in ('BQ', 'CB'):
+                dico['journal_code'] = 'OD'
             period = period_obj.browse(cr, uid, line[0], context=context)
             if prev_journal != journal or prev_period != period:
                 numero_piece += 1