mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] TransactionID importation and completion
(lp:c2c-financial-addons/6.1 rev 24.1.32)
This commit is contained in:
@@ -59,9 +59,9 @@ class AccountStatementCompletionRule(Model):
|
|||||||
res = {}
|
res = {}
|
||||||
if st_line:
|
if st_line:
|
||||||
so_obj = self.pool.get('sale.order')
|
so_obj = self.pool.get('sale.order')
|
||||||
so_id = so_obj.search(cursor, uid, [('transaction_id', '=', st_line.transaction_id)])
|
so_id = so_obj.search(cr, uid, [('transaction_id', '=', st_line.transaction_id)])
|
||||||
if so_id and len(so_id) == 1:
|
if so_id and len(so_id) == 1:
|
||||||
so = so_obj.browse(cursor, uid, so_id[0])
|
so = so_obj.browse(cr, uid, so_id[0])
|
||||||
res['partner_id'] = so.partner_id.id
|
res['partner_id'] = so.partner_id.id
|
||||||
res['ref'] = so.name
|
res['ref'] = so.name
|
||||||
elif so_id and len(so_id) > 1:
|
elif so_id and len(so_id) > 1:
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class TransactionIDFileParser(FileParser):
|
|||||||
"""
|
"""
|
||||||
Compute the commission from value of each line
|
Compute the commission from value of each line
|
||||||
"""
|
"""
|
||||||
res = super(GenericFileParser, self)._post(*args, **kwargs)
|
res = super(TransactionIDFileParser, self)._post(*args, **kwargs)
|
||||||
val = 0.0
|
val = 0.0
|
||||||
for row in self.result_row_list:
|
for row in self.result_row_list:
|
||||||
val += row.get('commission_amount',0.0)
|
val += row.get('commission_amount',0.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user