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
1=== modified file 'account_banking/banking_import_transaction.py'
2--- account_banking/banking_import_transaction.py 2014-01-11 16:06:19 +0000
3+++ account_banking/banking_import_transaction.py 2014-01-21 08:38:58 +0000
4@@ -1409,7 +1409,6 @@
5 line.state == 'draft'
6 and not line.partner_id
7 and line.import_transaction_id
8- and line.import_transaction_id.remote_owner
9 and line.import_transaction_id.remote_account)
10 return res
11
12
13=== modified file 'account_banking/wizard/link_partner.py'
14--- account_banking/wizard/link_partner.py 2013-09-23 09:10:01 +0000
15+++ account_banking/wizard/link_partner.py 2014-01-21 08:38:58 +0000
16@@ -87,7 +87,7 @@
17 _('Error'),
18 _('Statement line is already linked to a bank account '))
19
20- if not(transaction and transaction.remote_owner
21+ if not(transaction
22 and transaction.remote_account):
23 raise orm.except_orm(
24 _('Error'),
25@@ -117,6 +117,8 @@
26 self.pool, cr, uid, transaction, context=context)
27 if not vals.get('name'):
28 vals['name'] = transaction.remote_owner
29+ if not vals['name']:
30+ vals['name'] = '/'
31 if not vals.get('remote_account'):
32 vals['remote_account'] = transaction.remote_account
33

Subscribers

People subscribed via source and target branches

to status/vote changes: