OCA / bank-payment

Odoo Electronic Payment

Home Page:https://odoo-community.org/psc-teams/banking-10

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[12.0]account_payment_order_return

javierjcf opened this issue · comments

domain.append(('invoice_id.returned_payment', '=', False))

I think this is a bug. If i dont check the self.include_returned field, the condition is true, so ('invoice_id.returned_payment', '=', False) is added to the domain.
I think is a problem, because a lot of account.moves.lines are not linked to an invoice, so invoice_id.returned_payment is False BUT because invoice_id is False, so this moves are not found.
I need to check always the include_returned field in order to found the moves.

Im not sure about all, but is a problem that already found

Hello, I can confirm I experienced the same behaviour which is very odd with move lines that are not linked to invoices such as payrolls payments or expenses.

Please add a PR that modifies the domain this way:

domain += [
    '|',
    ('invoice_id', '=', False),
    ('invoice_id.returned_payment', '=', False)
]

Fix has been merged. I think this can be close now @javierjcf