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

[13.0] Printing customer invoice with mandate show company bank account

felixvillafranca opened this issue · comments

Hi;
Printing a customer invoice with mandate show the bank account of the company instead the bank account of the mandate.
Do you think that would be appropriate to suggest a [FIX] for that?

Regards,

Hi,

I'm not sure if i've understood, but I think that this is solved by other modules (actually migrating to V13), as you'll be able to choose between the bank account from the journal or not. This options will be in the payment mode.

This is a screenshot from V12:

Captura de pantalla 2020-04-29 a las 9 54 12

Is it what you were looking for?

Thanks!

Hi @HaraldPanten ,

This is option is to print the bank account of the journal either variable of fixed in relation with the payment mode.

If you take a look to the code you can see,

image

  • The first "if" return the bank account of our company indicate in the invoice.
  • The second "if" is the option you mention, also a bank account of our company.
  • The third "if" return the bank account of the mandate indicate in the invoice.

IMO the third 'if' has to be moved to the first position; the customer has to be inform of the account when he's going to receive the charge.

Regards,

I don't agree: the priority is to show the bank account indicated in the invoice. The problem is why in the invoice there's such bank account. Is that got with this set of modules installed?

Yes, I think first priority should be the one set in the invoice.

Even though, if you leave the option "unchecked", doesn't the invoice get the BA from the mandate? I haven't tested this right now.

Hi @felixvillafranca ,

I've been checking this morning and this is the result:

If you check "Bank account from journals", the invoice will print the bank account from the company. The one that has been set in the journal, by the payment mode.

If you don't check "Bank account from journals", the invoice is printing the bank account from the mandate. The bank account of the customer, you know.

As I told you, I tried this in V12 as these modules are being migrated to V13 at the moment. These are the "SEPA" modules that I'm sure they're going to help you with these use cases.

Here you can find some of the PR's:

#699 (depending from #700)
#686

Hi @felixvillafranca I'm not really sure about why not. As V13 SEPA modules haven't been migrated yet, maybe there are some issues. I'm not really sure.

If you try V12 runbot in OCA (bank-payment repo) try to have this config:

Customer mandate --> make sure that you've set the bank account of the customer.
Payment mode --> create a direct debit payment mode (with direct debit payment method)
Payment mode --> Do not check "Bank account from journals".

You'll have something like:

Payment method
Captura de pantalla 2020-04-30 a las 10 25 23

Payment mode
Captura de pantalla 2020-04-30 a las 10 25 51

Invoice
Captura de pantalla 2020-04-30 a las 10 27 24

Mandate
Captura de pantalla 2020-04-30 a las 10 27 34

Printed invoice
Captura de pantalla 2020-04-30 a las 10 27 57

Have a look at V13 PR's. I recommend you to check them and comment if you find any migration issue. As other members are working on them, maybe you can suggest an [IMP]//[FIX] if you find any strange performance.

I know what you mean... I only have the settings that I'm showing in the screenshots. I'm checking V13 runbot for the PR's and bank account is mandatory for V13, but not for V12. Maybe there's the "issue", you know?

As you said, when bank account is mandatory (V13) your only possibilities are company BA's. But maybe you're right that user should be able to leave it empty because we need sometimes to use customer's BA (from the mandate).

Normally for SEPA direct debit use cases, as you print something like: "this amount is going to be charged to (customer BA) after X days...) the BA should be the one from the customer. I agree.

But I don't have technical skills enough to check if something has changed from V12 to V13 in the code for these use cases.

Any clue, @pedrobaeza ? Are we missing something?

@felixvillafranca do you think that we're missing something in the [MIG] PR's?

I can't analyze all of this. It's too much. Please wait (or push) for everything in this repo to be merged, install everything and start from clean documents, and then check. Everything should be OK. Standard Odoo puts incorrect bank accounts, so probably that's the source.

Any way, this is outside of this issue tracker, as this is not a bug of the modules in this repo, and you have to thank you @HaraldPanten for being so kind giving you personal free support.

@felixvillafranca I found the problem. Look a the payment method for direct debit (customers).

You'll see that you have the "Bank Account Required" checkbox.

If you uncheck this, the invoices are going to get the bank account from the mandate and not the one from the company.

Try this and let me know if it worked 👍

@HaraldPanten Thank you so much¡

This allow to manually go to the invoice and leave "blank" the field "Bank Account"; then the report invoice will show the mandate's BA. It's Ok.
But, Do you think this extra step could be deleted?

@pedrobaeza, please... I have only tried to help, not to take advantage of anyone. Your comment is out of place.

You are misunderstanding my comment: I have just said that I'm not able to analyze the problem, but it's clear that there's no bug in code, so the issue must be closed, as I did. This is not a forum for asking questions, but an issue tracker.

Hi @felixvillafranca ,
if you want you can open one new Issue RFO(request for opinion), and depending of the community you can open one PR for change this case or ... open new PR directly.
But I think that is not necessary.

Thanks,

@pedrobaeza, Your comment was clear '...so kind giving you personal free support' ...What's part I'm misunderstanding?

In my opinion I have just reported a 'wrong behavior' not a question; and only for the purpose of helping, not taking advantage. Nex time Following @ValentinVinagre indications I will open a RFO.

Anyway, I think you do an extraordinary job for the community and I would also like to thank you from here.

Indeed it's very clear because @HaraldPanten has been extra-kind outside of what issue management requires, and that needs to be thank you. As said, it's not a wrong behavior, but your opinion about wrong behavior, and this has mixed a lot of things (starting with the order of the if, then switch to other thing, etc, and that's why I said too much to analyze, but there's no issue at all. If you open other issue as RFO, do the "homework" and get to an specific proposal. If not, it will end up closed the same (and not by me, but any other, as this is voluntary maintained) or ignored and opened for years. I'm only the messenger about this philosophy that you barely knows because you are not a regular contributor.

And don't get confused: you are not helping. You have a problem that you need to solve, and barely describes even the steps to reproduce it, so that's not helpful. @HaraldPanten has decoded that problem and gives you enough insights for avoiding. More than anybody would do. We have enough to decode that from our own customers.

I always link this guide that summarizes perfectly IMO how this thread has evolved: http://www.catb.org/~esr/faqs/smart-questions.html (Spanish version: https://sindominio.net/ayuda/preguntas-inteligentes.html)