mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] Correct the bank_label based completion method + open imported statement in new windows
(lp:c2c-financial-addons/6.1 rev 24.1.31)
This commit is contained in:
@@ -20,3 +20,4 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import statement
|
import statement
|
||||||
|
import partner
|
||||||
@@ -209,7 +209,7 @@ class AccountStatementCompletionRule(Model):
|
|||||||
compt = 0
|
compt = 0
|
||||||
if st_line:
|
if st_line:
|
||||||
ids = partner_obj.search(cursor, uid, [['bank_statement_label', '!=', False]], context=context)
|
ids = partner_obj.search(cursor, uid, [['bank_statement_label', '!=', False]], context=context)
|
||||||
for partner in self.browse(cursor, uid, ids, context=context):
|
for partner in partner_obj.browse(cursor, uid, ids, context=context):
|
||||||
for partner_label in partner.bank_statement_label.split(';'):
|
for partner_label in partner.bank_statement_label.split(';'):
|
||||||
if partner_label in st_line.label:
|
if partner_label in st_line.label:
|
||||||
compt += 1
|
compt += 1
|
||||||
|
|||||||
@@ -110,6 +110,11 @@ class CreditPartnerStatementImporter(osv.osv_memory):
|
|||||||
ftype.replace('.',''),
|
ftype.replace('.',''),
|
||||||
context=context
|
context=context
|
||||||
)
|
)
|
||||||
|
return {
|
||||||
# We should return here the profile for which we executed the import
|
'domain': "[('id','in', ["+','.join(map(str,[sid]))+"])]",
|
||||||
return {'type': 'ir.actions.act_window_close'}
|
'name': 'Imported Bank Statement',
|
||||||
|
'view_type': 'form',
|
||||||
|
'view_mode': 'tree,form',
|
||||||
|
'res_model': 'account.bank.statement',
|
||||||
|
'type': 'ir.actions.act_window',
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<record id="bank_statement_completion_rule_4" model="account.statement.completion.rule">
|
<record id="bank_statement_completion_rule_4" model="account.statement.completion.rule">
|
||||||
<field name="name">Match from line reference (based on transaction ID)</field>
|
<field name="name">Match from line reference (based on transaction ID)</field>
|
||||||
<field name="sequence">40</field>
|
<field name="sequence">30</field>
|
||||||
<field name="function_to_call">get_from_transaction_id_and_so</field>
|
<field name="function_to_call">get_from_transaction_id_and_so</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user