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

[RFC] account_payment_order: consider mixing invoices and refunds

AdriaGForgeFlow opened this issue · comments

Whenever a user creates a new Payment Order for an outbound payment, the Refund Bills that are open to vendors are not taken into account and thus the refunded amount is not withdrawn from the payment proposal amount.

This is related to the following piece of code where, for outbound payments, only move lines with credit greater than 0 are taken into account:
image

And the following would be an example of the Journal Entry created from a Refund Bill:
image

We understand that the payment order should be created as long as the result is a positive amount that the company has to pay to the vendor(s). It does not make any sense to create a payment order that only contains refunds.

cc ~ @ForgeFlow

Refunds are not included, neither for customers nor vendors, due to a lot of reasons. You have to reconcile them with a positive invoice.

I will check if there is a way around this.

The problem is that we have a client that is using this tool and every time they generate a payment order they have to manually check whether any vendor has an open refund or not, if they find one they will manually deduct the amount to pay. By doing that, the vendor is losing the visibility on why the amount that has been payed by the client is not equal to the amount in the invoice and this can lead to confusion.

Do you have any suggestions on how we can avoid this?

Use account_netting for reconciling correctly the amounts between AR/AP accounts.

@pedrobaeza I think that the term 'customer' confused you. It's not really the case where netting would be applicable.

We understand that the module has been designed so as to not accept refunds being mixed with invoices. But we want to gather ideas from other contributors on this topic.

So, rather than an issue this is a proposal for an improvement. We would like to better understand what whould be the limitations of using refunds+invoices all togehter?

cc @alexis-via perhaps you can provide some additional insight?

Then you should change the title of the issue.

Note that we made a shy try of adding this in #469, but finally see that it involves a lot of changes and also it implies some risks at business logic side:

  • How can you label the resulting payment bank line? With both references from the positive and the negative?
  • You need to forbid illegal negative payment lines.
  • That line will be difficult as well for the other part to guess the source of it. (for example, if you have +100 and - 40), resulting 60 can't be explained easily with SEPA available fields.
  • Others that I have thought yet...

Perhaps we should create a separate module that allows to combine various receivables/payables together. Something like 'account.move.line.batch'. So a user can choose to combine several invoices / receivables / payables together. This combined receivable/payable is what is going to be paid/collected, and it's what is going to be used in SEPA payments. But at the same time the 'account.move.line.batch' provides the capability to send out a report to the customer/vendor providing the details of what's included in the batch.

Well, at the end, my experience tells me that not attached reports are not useful and they are not crossed between them, and the information provided by the banks for their transactions is very poor.

What do you mean by not attached reports?

What I see is that it can be useful to have a tool that allows you to combine several receivables/payables together, perhaps even being able to set a new due date for the combined receivable/payable. Even this would be useful for a single receivable/payable if you have renegotiated the due date.

In general odoo does not have the capability to manage your receivables/payables in this sense, and businesses need this kind of capability. The communication to the vendor/customer is previous to issuing the payment.

For example, you would be telling to the vendor:
"As agreed, see below the combined outstanding payables, all due to be paid on 01.01.2021".

Because you agreed with the vendor to pay bills A, B, C (that perhaps had various different due dates) all together, on a certain future date.

account_netting module is for that. Odoo has also allowed in v14 the netting if I'm not wrong.

account_netting module is meant to be used to combine receivables with payables.

What I'm referring to is the ability to combine receivables with receivables or payables with payables.

Sorry, I'm still not getting you, but maybe others do.

It is a tool to renegotiate the receivables / paybles with customers/vendors.

You have 10 open vendor bills that are due on different dates and you decide to group in a single payable the due amount, with a new due date.

You can also use this tool to combine a vendor bill with a refund.

This model would combine several move lines together into a new move line.

For example, you have 2 vendor bills and this model creates the following journal entry:

Dr. Payable 1000€ (due date 01.10.2020) - matched with vendor bill A
Dr. Payable 1000€ (due date 01.11.2020) - matched with vendor bill B
Cr. Payable 2000€ (due date 01.01.2021)

You send a letter to the vendor:
"Dear vendor, as discusses we have now combined vendor bill A and B together and will be sending payment on 01.01.2021, with reference XYZ/2020/20124"

OK, understood now. I don't see it very useful for my use cases, but there can be other use cases. Anyway, this is not something of bank-payment repo. Maybe account-payment, or account-financial-tools.

Ok, I'm closing the issue here and we'll create an RFC in one of the other repos.

You can transfer the issue instead for not losing the communication history.