mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
fix domain in payment_order_return
fix domain in payment_order_return in order to avoid problems with moves without associated invoice as discused at #718
This commit is contained in:
committed by
João Marques
parent
8f64046232
commit
76b65420f6
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
'name': 'Account Payment Order Return',
|
||||
'version': '12.0.1.0.0',
|
||||
'version': '12.0.1.1.0',
|
||||
'category': 'Banking addons',
|
||||
'author': 'Tecnativa, '
|
||||
'Odoo Community Association (OCA)',
|
||||
|
||||
@@ -15,5 +15,9 @@ class AccountPaymentLineCreate(models.TransientModel):
|
||||
domain = super(AccountPaymentLineCreate,
|
||||
self)._prepare_move_line_domain()
|
||||
if not self.include_returned:
|
||||
domain.append(('invoice_id.returned_payment', '=', False))
|
||||
domain += [
|
||||
'|',
|
||||
('invoice_id', '=', False),
|
||||
('invoice_id.returned_payment', '=', False)
|
||||
]
|
||||
return domain
|
||||
|
||||
Reference in New Issue
Block a user