diff --git a/account_advanced_reconcile_transaction_ref/__init__.py b/account_advanced_reconcile_transaction_ref/__init__.py index 2b663dd0..e19ad65a 100644 --- a/account_advanced_reconcile_transaction_ref/__init__.py +++ b/account_advanced_reconcile_transaction_ref/__init__.py @@ -18,7 +18,6 @@ # ############################################################################## -from . import account from . import easy_reconcile from . import base_advanced_reconciliation from . import advanced_reconciliation diff --git a/account_advanced_reconcile_transaction_ref/__openerp__.py b/account_advanced_reconcile_transaction_ref/__openerp__.py index d806ba9e..7ac87b57 100644 --- a/account_advanced_reconcile_transaction_ref/__openerp__.py +++ b/account_advanced_reconcile_transaction_ref/__openerp__.py @@ -20,8 +20,8 @@ {'name': 'Advanced Reconcile Transaction Ref', 'description': """ -Advanced reconciliation method for the module account_easy_reconcile -================================================= +Advanced reconciliation method for the module account_advanced_reconcile +======================================================================== Reconcile rules with transaction_ref """, diff --git a/account_advanced_reconcile_transaction_ref/account.py b/account_advanced_reconcile_transaction_ref/account.py deleted file mode 100644 index 0525de31..00000000 --- a/account_advanced_reconcile_transaction_ref/account.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Romain Deheele -# Copyright 2013 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv.orm import Model, fields - -class AccountMoveLine(Model): - """ - Inherit account.move.line class in order to add transaction_ref field - """ - _inherit = "account.move.line" - _columns = { - 'transaction_ref': fields.char('Transaction Ref.', size=128), - } - -class AccountBankSatement(Model): - """ - Inherit account.bank.statement class in order to set transaction_ref info on account.move.line - """ - _inherit = "account.bank.statement" - - def _prepare_move_line_vals( - self, cr, uid, st_line, move_id, debit, credit, currency_id=False, - amount_currency=False, account_id=False, analytic_id=False, - partner_id=False, context=None): - - if context is None: - context = {} - res = super(AccountBankSatement, self)._prepare_move_line_vals( - cr, uid, st_line, move_id, debit, credit, - currency_id=currency_id, - amount_currency=amount_currency, - account_id=account_id, - analytic_id=analytic_id, - partner_id=partner_id, context=context) - res.update({'transaction_ref': st_line.ref}) - return res diff --git a/account_statement_transactionid_completion/statement.py b/account_statement_transactionid_completion/statement.py index 807eb136..b0b0a89e 100644 --- a/account_statement_transactionid_completion/statement.py +++ b/account_statement_transactionid_completion/statement.py @@ -163,12 +163,12 @@ class AccountBankStatement(Model): :return: dict of value to create() the account.move.line """ res = super(AccountBankStatement, self)._prepare_move_line_vals( - cr, uid, st_line, move_id, debit, credit, - currency_id=currency_id, - amount_currency=amount_currency, - account_id=account_id, - analytic_id=analytic_id, - partner_id=partner_id, context=context) + cr, uid, st_line, move_id, debit, credit, + currency_id=currency_id, + amount_currency=amount_currency, + account_id=account_id, + analytic_id=analytic_id, + partner_id=partner_id, context=context) if st_line.transaction_ref: res['transaction_ref'] = st_line.transaction_ref return res