~therp-nl/banking-addons/ba70-aggregate_payment

« back to all changes in this revision

Viewing changes to account_banking_payment/model/payment_order_create.py

  • Committer: Holger Brunn
  • Author(s): stefan at therp
  • Date: 2013-06-17 07:38:46 UTC
  • mfrom: (169.2.1 7.0-payment_move_line)
  • Revision ID: hbrunn@therp.nl-20130617073846-wpkzmupf5h2xgbtq
[FIX] Attempt to add move line without invoice to payment order gives
error on empty value for the payment line's 'state' field

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
                    # customer invoice number (in the case of debit order)
99
99
                    communication = line.invoice.number.replace('/', '')
100
100
                    state = 'structured'
101
 
                    if communication != line.ref:
 
101
                    if line.invoice.number != line.ref:
102
102
                        communication2 = line.ref
 
103
            else:
 
104
                state = 'normal'
 
105
                communication2 = line.ref
 
106
 
103
107
            # support debit orders when enabled
104
108
            if (payment.payment_order_type == 'debit' and
105
109
                'amount_to_receive' in line):