mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] apropriate method calls, import tests
This commit is contained in:
committed by
Iryna Vyshnevska
parent
2746583fee
commit
0d3267f261
@@ -1,16 +1,17 @@
|
||||
# Copyright 2013-2018 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
from odoo import models
|
||||
from odoo import models, api
|
||||
|
||||
|
||||
class MassReconcileAdvanced(models.AbstractModel):
|
||||
|
||||
_inherit = 'mass.reconcile.advanced'
|
||||
|
||||
@api.model
|
||||
def _base_columns(self):
|
||||
""" Mandatory columns for move lines queries
|
||||
An extra column aliased as ``key`` should be defined
|
||||
in each query."""
|
||||
aml_cols = super(MassReconcileAdvanced, self)._base_columns()
|
||||
aml_cols = super()._base_columns()
|
||||
aml_cols.append('account_move_line.transaction_ref')
|
||||
return aml_cols
|
||||
|
||||
@@ -8,8 +8,8 @@ class AccountMassReconcileMethod(models.Model):
|
||||
_inherit = 'account.mass.reconcile.method'
|
||||
|
||||
@api.model
|
||||
def _get_all_rec_method(self):
|
||||
methods = super(AccountMassReconcileMethod, self)._get_all_rec_method()
|
||||
def _get_reconcilation_methods(self):
|
||||
methods = super()._get_reconcilation_methods()
|
||||
methods += [
|
||||
('mass.reconcile.advanced.transaction_ref',
|
||||
'Advanced. Partner and Transaction Ref.'),
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
from . import test_account_reconcile_transaction_ref
|
||||
|
||||
@@ -72,6 +72,7 @@ class TestAccountReconcileTransactionRef(SavepointCase):
|
||||
})
|
||||
count = reconcile.unreconciled_count
|
||||
reconcile.run_reconcile()
|
||||
reconcile._get_total_unrec()
|
||||
self.assertEqual(self.cust_invoice.state, 'paid')
|
||||
self.assertEqual(reconcile.unreconciled_count, count - 2)
|
||||
|
||||
@@ -114,5 +115,6 @@ class TestAccountReconcileTransactionRef(SavepointCase):
|
||||
})
|
||||
count = reconcile.unreconciled_count
|
||||
reconcile.run_reconcile()
|
||||
reconcile._get_total_unrec()
|
||||
self.assertEqual(self.cust_invoice.state, 'paid')
|
||||
self.assertEqual(reconcile.unreconciled_count, count - 2)
|
||||
|
||||
Reference in New Issue
Block a user