From 0fc480dc7b1e30e410df39502a60ef5b3707df29 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Thu, 1 Nov 2012 17:14:03 +0100 Subject: [PATCH] [IMP] account_easy_reconcile : improve add reconciliation by reference (lp:account-extra-addons rev 30) --- account_easy_reconcile/easy_reconcile.py | 2 +- account_easy_reconcile/simple_reconciliation.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/account_easy_reconcile/easy_reconcile.py b/account_easy_reconcile/easy_reconcile.py index 0c7b2372..6a2899cd 100644 --- a/account_easy_reconcile/easy_reconcile.py +++ b/account_easy_reconcile/easy_reconcile.py @@ -75,6 +75,7 @@ class account_easy_reconcile_method(Model): return [ ('easy.reconcile.simple.name', 'Simple. Amount and Name'), ('easy.reconcile.simple.partner', 'Simple. Amount and Partner'), + ('easy.reconcile.simple.reference', 'Simple. Amount and Reference'), ] def _get_rec_method(self, cr, uid, context=None): @@ -175,7 +176,6 @@ class account_easy_reconcile(Model): total_partial_rec = 0 details = [] count = 0 - for method in rec.reconcile_method: count += 1 diff --git a/account_easy_reconcile/simple_reconciliation.py b/account_easy_reconcile/simple_reconciliation.py index 474eff84..37786551 100644 --- a/account_easy_reconcile/simple_reconciliation.py +++ b/account_easy_reconcile/simple_reconciliation.py @@ -111,3 +111,12 @@ class easy_reconcile_simple_partner(TransientModel): # field name used as key for matching the move lines _key_field = 'partner_id' +class easy_reconcile_simple_reference(TransientModel): + + _name = 'easy.reconcile.simple.reference' + _inherit = 'easy.reconcile.simple' + _auto = True # False when inherited from AbstractModel + + # has to be subclassed + # field name used as key for matching the move lines + _key_field = 'ref'