banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #00308
lp:~therp-nl/banking-addons/ba61-lp1102619_use_invoice_number_as_debit_order_line_reference into lp:banking-addons
Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/banking-addons/ba61-lp1102619_use_invoice_number_as_debit_order_line_reference into lp:banking-addons.
Requested reviews:
Banking Addons Team (banking-addons-team)
Related bugs:
Bug #1102619 in Banking Addons: "[ab61] Direct debit orders do not always include the invoice number as reference"
https://bugs.launchpad.net/banking-addons/+bug/1102619
For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/ba61-lp1102619_use_invoice_number_as_debit_order_line_reference/+merge/144180
--
https://code.launchpad.net/~therp-nl/banking-addons/ba61-lp1102619_use_invoice_number_as_debit_order_line_reference/+merge/144180
Your team Banking Addons Team is requested to review the proposed merge of lp:~therp-nl/banking-addons/ba61-lp1102619_use_invoice_number_as_debit_order_line_reference into lp:banking-addons.
=== 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 @@
state = communication2 = False
communication = line.ref or '/'
if line.invoice:
- if line.invoice.reference_type == 'structured':
+ if line.invoice.type in ('in_invoice', 'in_refund'):
+ if line.invoice.reference_type == 'structured':
+ state = 'structured'
+ communication = line.invoice.reference
+ else:
+ state = 'normal'
+ communication2 = line.invoice.reference
+ else:
+ # Make sure that the communication includes the
+ # customer invoice number (in the case of debit order)
+ communication = line.invoice.number.replace('/', '')
state = 'structured'
- communication = line.invoice.reference
- else:
- state = 'normal'
- communication2 = line.invoice.reference
+ if communication != line.ref:
+ communication2 = line.ref
# support debit orders when enabled
if (payment.payment_order_type == 'debit' and
'amount_to_receive' in line):
Follow ups