diff --git a/account_easy_reconcile/base_reconciliation.py b/account_easy_reconcile/base_reconciliation.py index 2625798c..3d28f9ed 100644 --- a/account_easy_reconcile/base_reconciliation.py +++ b/account_easy_reconcile/base_reconciliation.py @@ -35,6 +35,13 @@ class easy_reconcile_base(AbstractModel): } def automatic_reconcile(self, cr, uid, ids, context=None): + if isinstance(ids, (int, long)): + ids = [ids] + assert len(ids) == 1, "Has to be called on one id" + rec = self.browse(cr, uid, ids[0], context=context) + return self._action_rec(cr, uid, rec, context=context) + + def _action_rec(self, cr, uid, rec, context=None): """Must be inherited to implement the reconciliation""" raise NotImplementedError diff --git a/account_easy_reconcile/simple_reconciliation.py b/account_easy_reconcile/simple_reconciliation.py index c1f13e44..deef4fab 100644 --- a/account_easy_reconcile/simple_reconciliation.py +++ b/account_easy_reconcile/simple_reconciliation.py @@ -87,13 +87,6 @@ class easy_reconcile_simple(AbstractModel): lines = cr.dictfetchall() return self.rec_auto_lines_simple(cr, uid, lines, context) - def automatic_reconcile(self, cr, uid, ids, context=None): - if isinstance(ids, (int, long)): - ids = [ids] - assert len(ids) == 1, "Has to be called on one id" - rec = self.browse(cr, uid, ids[0], context=context) - return self._action_rec_simple(cr, uid, rec, context=context) - class easy_reconcile_simple_name(TransientModel):