mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
account_move_line.transaction_ref is now in base_transaction_id. We do no longer want the ref in transaction_ref
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from . import account
|
|
||||||
from . import easy_reconcile
|
from . import easy_reconcile
|
||||||
from . import base_advanced_reconciliation
|
from . import base_advanced_reconciliation
|
||||||
from . import advanced_reconciliation
|
from . import advanced_reconciliation
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
{'name': 'Advanced Reconcile Transaction Ref',
|
{'name': 'Advanced Reconcile Transaction Ref',
|
||||||
'description': """
|
'description': """
|
||||||
Advanced reconciliation method for the module account_easy_reconcile
|
Advanced reconciliation method for the module account_advanced_reconcile
|
||||||
=================================================
|
========================================================================
|
||||||
Reconcile rules with transaction_ref
|
Reconcile rules with transaction_ref
|
||||||
|
|
||||||
""",
|
""",
|
||||||
|
|||||||
@@ -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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -163,12 +163,12 @@ class AccountBankStatement(Model):
|
|||||||
:return: dict of value to create() the account.move.line
|
:return: dict of value to create() the account.move.line
|
||||||
"""
|
"""
|
||||||
res = super(AccountBankStatement, self)._prepare_move_line_vals(
|
res = super(AccountBankStatement, self)._prepare_move_line_vals(
|
||||||
cr, uid, st_line, move_id, debit, credit,
|
cr, uid, st_line, move_id, debit, credit,
|
||||||
currency_id=currency_id,
|
currency_id=currency_id,
|
||||||
amount_currency=amount_currency,
|
amount_currency=amount_currency,
|
||||||
account_id=account_id,
|
account_id=account_id,
|
||||||
analytic_id=analytic_id,
|
analytic_id=analytic_id,
|
||||||
partner_id=partner_id, context=context)
|
partner_id=partner_id, context=context)
|
||||||
if st_line.transaction_ref:
|
if st_line.transaction_ref:
|
||||||
res['transaction_ref'] = st_line.transaction_ref
|
res['transaction_ref'] = st_line.transaction_ref
|
||||||
return res
|
return res
|
||||||
|
|||||||
Reference in New Issue
Block a user