mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_easy_reconcile: add reconciliation by reference
(lp:account-extra-addons rev 30) [FIX] account_easy_reconcile : fix domain evaluation (lp:account-extra-addons rev 29)
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
'maintainer': 'Camptocamp',
|
||||
'category': 'Finance',
|
||||
'complexity': 'normal',
|
||||
'depends': ['account_easy_reconcile', # this comes from lp:account-extra-addons
|
||||
'depends': ['account_easy_reconcile',
|
||||
],
|
||||
'description': """
|
||||
Advanced reconciliation methods for the module account_easy_reconcile.
|
||||
|
||||
@@ -98,7 +98,7 @@ class easy_reconcile_base(AbstractModel):
|
||||
params = []
|
||||
if rec.filter:
|
||||
dummy, where, params = ml_obj._where_calc(
|
||||
cr, uid, rec.filter, context=context).get_sql()
|
||||
cr, uid, eval(rec.filter), context=context).get_sql()
|
||||
if where:
|
||||
where = " AND %s" % where
|
||||
return where, params
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user