mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Attempt to add move line without invoice to payment order gives
error on empty value for the payment line's 'state' field
This commit is contained in:
@@ -98,8 +98,12 @@ class payment_order_create(orm.TransientModel):
|
||||
# customer invoice number (in the case of debit order)
|
||||
communication = line.invoice.number.replace('/', '')
|
||||
state = 'structured'
|
||||
if communication != line.ref:
|
||||
if line.invoice.number != line.ref:
|
||||
communication2 = line.ref
|
||||
else:
|
||||
state = 'normal'
|
||||
communication2 = line.ref
|
||||
|
||||
# support debit orders when enabled
|
||||
if (payment.payment_order_type == 'debit' and
|
||||
'amount_to_receive' in line):
|
||||
|
||||
Reference in New Issue
Block a user