Merge lp:~camptocamp/banking-addons/bank-statement-reconcile-61-fix-1083517 into lp:banking-addons/bank-statement-reconcile-61

Proposed by Alexandre Fayolle - camptocamp
Status: Merged
Merged at revision: 71
Proposed branch: lp:~camptocamp/banking-addons/bank-statement-reconcile-61-fix-1083517
Merge into: lp:banking-addons/bank-statement-reconcile-61
Diff against target: 21 lines (+6/-8)
1 file modified
account_statement_base_import/wizard/import_statement.py (+6/-8)
To merge this branch: bzr merge lp:~camptocamp/banking-addons/bank-statement-reconcile-61-fix-1083517
Reviewer Review Type Date Requested Status
Nicolas Bessi - Camptocamp (community) Approve
Review via email: mp+136365@code.launchpad.net

Description of the change

use an in-database action with a customized domain to get the correct redirection after the wizard has run.

To post a comment you must log in.
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Hello
In domain can sid be a list? If it is not the case the fix seems ok else the case should be managed.

Regards

Nicolas

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

> Hello
> In domain can sid be a list? If it is not the case the fix seems ok else the
> case should be managed.

The code for statement_import in AccountStatementProfile returns a single statement id.

(and the original code used a very complicated construct to put the single integer in a list)

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Seems good to me

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_statement_base_import/wizard/import_statement.py'
--- account_statement_base_import/wizard/import_statement.py 2012-08-02 12:46:12 +0000
+++ account_statement_base_import/wizard/import_statement.py 2012-11-27 10:56:20 +0000
@@ -110,11 +110,9 @@
110 ftype.replace('.',''),110 ftype.replace('.',''),
111 context=context111 context=context
112 )112 )
113 return {113 model_obj = self.pool.get('ir.model.data')
114 'domain': "[('id','in', ["+','.join(map(str,[sid]))+"])]",114 action_obj = self.pool.get('ir.actions.act_window')
115 'name': 'Imported Bank Statement',115 action_id = model_obj.get_object_reference(cursor, uid, 'account', 'action_bank_statement_tree')[1]
116 'view_type': 'form',116 res = action_obj.read(cursor, uid, action_id)
117 'view_mode': 'tree,form',117 res['domain'] = res['domain'][:-1] + ",('id', '=', %d)]" % sid
118 'res_model': 'account.bank.statement',118 return res
119 'type': 'ir.actions.act_window',
120 }

Subscribers

People subscribed via source and target branches