Skip to content

[IMP] Remove the to pay mark on an invoice when it is fully paid on in payment #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

florian-dacosta
Copy link

Presently, the module only works with the register payment button, which seems quite problematic, as it is normally not very used when the full accounting is done in Odoo.
Indeed, if you pay your invoice by wire transfer, the payment will come from your bank statement or from an account.payment.order for instance.

So the main change here is that the selected_for_payment is computed so it is removed when invoice is paid or in payment.

This PR includes other small improvement like :

  • possibility to mark the invoice as to pay from the form invoice view.
  • Make it possible to hide the field on tree view, since it is probably only for some users. Also, this allow to hide it on the customer invoice view, since it mainly concerns the supplier invoices.

Last thing, I think it is very weird to remove the selected_for_payment mark if one user click on the register payment button but does not proceed to the payamnt (cancel it).
I would remove the override of action_register_payment and only rely on the computed field to remove it...
Still I did not do it in this PR because I am not sure it is ok for everybody, and I do not really have a solution for the partial payment case.

An equivalent PR actually was already proposed/approved in v14, but was never merged see : OCA#1317

FYI @aleuffre @renda-dev

…n payment

This way the module is usefull when the register payment wizard is not used. It is a case when you use payment orders or even if you reconcile your invoices from the bank statement for instance
Also add a button on form view to be able to mark the invoice as to pay when you are checking what it is exactly
Copy link
Owner

@Kimkhoi3010 Kimkhoi3010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your time!

@sebalix
Copy link

sebalix commented Apr 24, 2025

Hello @florian-dacosta , can you redirect this PR against OCA/bank-payment? The migration PR has been merged meanwhile. Thanks! :)

@florian-dacosta
Copy link
Author

Hello @florian-dacosta , can you redirect this PR against OCA/bank-payment? The migration PR has been merged meanwhile. Thanks! :)

Thanks for the ping, I've done it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants