mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
Add module account_statement_import_base
The 2 modules account_statement_import_online and account_statement_import depend on account_statement_import_base (and not on each other) and share common code, in particular a hook to update the statement line. So we can now have reconciliation modules that use this hook and therefore work both on file import and online import. More details on https://github.com/OCA/bank-statement-import/issues/481. Improve bank statement line form view and journal form view.
This commit is contained in:
@@ -1,2 +1 @@
|
||||
from . import account_journal
|
||||
from . import account_bank_statement_line
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Copyright 2004-2020 Odoo S.A.
|
||||
# Copyright 2020 Akretion France (http://www.akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountBankStatementLine(models.Model):
|
||||
_inherit = "account.bank.statement.line"
|
||||
|
||||
# Ensure transactions can be imported only once
|
||||
# (if the import format provides unique transaction ids)
|
||||
unique_import_id = fields.Char(string="Import ID", readonly=True, copy=False)
|
||||
|
||||
_sql_constraints = [
|
||||
(
|
||||
"unique_import_id",
|
||||
"unique(unique_import_id)",
|
||||
"A bank account transaction can be imported only once!",
|
||||
)
|
||||
]
|
||||
Reference in New Issue
Block a user