Merge lp:~ruchir.shukla/banking-addons/banking-addons-link_partner_without_remote_owner into lp:banking-addons

Proposed by Ruchir Shukla(BizzAppDev)
Status: Merged
Approved by: Holger Brunn (Therp)
Approved revision: 218
Merged at revision: 223
Proposed branch: lp:~ruchir.shukla/banking-addons/banking-addons-link_partner_without_remote_owner
Merge into: lp:banking-addons
Diff against target: 32 lines (+3/-2)
2 files modified
account_banking/banking_import_transaction.py (+0/-1)
account_banking/wizard/link_partner.py (+3/-1)
To merge this branch: bzr merge lp:~ruchir.shukla/banking-addons/banking-addons-link_partner_without_remote_owner
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Pedro Manuel Baeza code review Approve
Stefan Rijnhart (Opener) Approve
Review via email: mp+202408@code.launchpad.net

Description of the change

When no partner name or account could be found in the bank statement file, it was not possible to link a partner with the "link partner" button. This change makes that possible. Now you can connect the found bank account to an existing partner or create a new partner.

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

LGTM, thanks!

review: Approve
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM

review: Approve (code review)
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py 2014-01-11 16:06:19 +0000
+++ account_banking/banking_import_transaction.py 2014-01-21 08:38:58 +0000
@@ -1409,7 +1409,6 @@
1409 line.state == 'draft'1409 line.state == 'draft'
1410 and not line.partner_id1410 and not line.partner_id
1411 and line.import_transaction_id1411 and line.import_transaction_id
1412 and line.import_transaction_id.remote_owner
1413 and line.import_transaction_id.remote_account)1412 and line.import_transaction_id.remote_account)
1414 return res1413 return res
14151414
14161415
=== modified file 'account_banking/wizard/link_partner.py'
--- account_banking/wizard/link_partner.py 2013-09-23 09:10:01 +0000
+++ account_banking/wizard/link_partner.py 2014-01-21 08:38:58 +0000
@@ -87,7 +87,7 @@
87 _('Error'),87 _('Error'),
88 _('Statement line is already linked to a bank account '))88 _('Statement line is already linked to a bank account '))
89 89
90 if not(transaction and transaction.remote_owner90 if not(transaction
91 and transaction.remote_account):91 and transaction.remote_account):
92 raise orm.except_orm(92 raise orm.except_orm(
93 _('Error'),93 _('Error'),
@@ -117,6 +117,8 @@
117 self.pool, cr, uid, transaction, context=context)117 self.pool, cr, uid, transaction, context=context)
118 if not vals.get('name'):118 if not vals.get('name'):
119 vals['name'] = transaction.remote_owner119 vals['name'] = transaction.remote_owner
120 if not vals['name']:
121 vals['name'] = '/'
120 if not vals.get('remote_account'):122 if not vals.get('remote_account'):
121 vals['remote_account'] = transaction.remote_account123 vals['remote_account'] = transaction.remote_account
122124

Subscribers

People subscribed via source and target branches

to status/vote changes: