mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] abstract method
(lp:account-extra-addons rev 26.1.14)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user