mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
Import code just before commit 9ba8734f15e1a292ca27b1a026e8366a91b2a8c9 that moved the module account_bank_statement_import to Odoo Enterprise Only modifications : - add author (Odoo SA) and license (LGPL) keys in manifest - add copyright headers Odoo SA all main files
18 lines
731 B
Python
18 lines
731 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2004-2020 Odoo S.A.
|
|
# Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
|
|
|
|
from odoo import models, fields, api
|
|
|
|
|
|
class SetupBarBankConfigWizard(models.TransientModel):
|
|
_inherit = 'account.setup.bank.manual.config'
|
|
|
|
def validate(self):
|
|
""" Default the bank statement source of new bank journals as 'file_import'
|
|
"""
|
|
super(SetupBarBankConfigWizard, self).validate()
|
|
if (self.num_journals_without_account == 0 or self.linked_journal_id.bank_statements_source == 'undefined') \
|
|
and self.env['account.journal']._get_bank_statements_available_import_formats():
|
|
self.linked_journal_id.bank_statements_source = 'file_import'
|