Merge PR #726 into 12.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2020-09-17 08:55:16 +00:00

View File

@@ -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