فهرست منبع

[FIX] bank statemen when journal type is bank

Gogs 7 سال پیش
والد
کامیت
122f18a410
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      models/account_voucher.py

+ 1 - 1
models/account_voucher.py

@@ -218,7 +218,7 @@ class AccountVoucher(models.Model):
             'journal_id': account_voucher.journal_id.id,
             'period_id': account_voucher.period_id.id,
             'line_ids': bank_statement_lines,
-            'state': 'open'
+            'state': 'open' if account_voucher.journal_id.type == 'cash' else 'draft'
         }
 
         if account_bank_statement: