Merge lp:~therp-nl/banking-addons/ba61-lp1102619_use_invoice_number_as_debit_order_line_reference into lp:banking-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 157
Proposed branch: lp:~therp-nl/banking-addons/ba61-lp1102619_use_invoice_number_as_debit_order_line_reference
Merge into: lp:banking-addons/6.1
Diff against target: 29 lines (+13/-5)
1 file modified
account_banking/wizard/account_payment_order.py (+13/-5)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/ba61-lp1102619_use_invoice_number_as_debit_order_line_reference
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Approve
Review via email: mp+144180@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_banking/wizard/account_payment_order.py'
--- account_banking/wizard/account_payment_order.py 2013-01-10 13:38:19 +0000
+++ account_banking/wizard/account_payment_order.py 2013-01-21 20:34:23 +0000
@@ -85,12 +85,20 @@
85 state = communication2 = False85 state = communication2 = False
86 communication = line.ref or '/'86 communication = line.ref or '/'
87 if line.invoice:87 if line.invoice:
88 if line.invoice.reference_type == 'structured':88 if line.invoice.type in ('in_invoice', 'in_refund'):
89 if line.invoice.reference_type == 'structured':
90 state = 'structured'
91 communication = line.invoice.reference
92 else:
93 state = 'normal'
94 communication2 = line.invoice.reference
95 else:
96 # Make sure that the communication includes the
97 # customer invoice number (in the case of debit order)
98 communication = line.invoice.number.replace('/', '')
89 state = 'structured'99 state = 'structured'
90 communication = line.invoice.reference100 if communication != line.ref:
91 else:101 communication2 = line.ref
92 state = 'normal'
93 communication2 = line.invoice.reference
94 # support debit orders when enabled102 # support debit orders when enabled
95 if (payment.payment_order_type == 'debit' and103 if (payment.payment_order_type == 'debit' and
96 'amount_to_receive' in line):104 'amount_to_receive' in line):

Subscribers

People subscribed via source and target branches