-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
account_payment_partner: partner_bank_id should not be set to False if payment_mode is not set #1290
Comments
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Thanks @PNurm for reporting this. I also find it weird that we reset the bank account on invoice when this module is installed for move without payment_mode_id. There is probably a good reason for this but I cannot find which one ? Using account_edi module with Factur-x/XRechnung CII 2.2.0 enabled, if you do not have a partner_bank_id on invoice, you get an banner stating that bank_partner_id is required for this EDI format. Resetting the field to False in most cases as it is currently done in this module forces the users to configure the proper account on each invoice, when in most of the cases there is only one (either the one from company / partner if no payment_mode_id selected, or the one from account_journal if payment_mode is selected). Maybe @alexis-via @pedrobaeza @victoralmau or @grindtildeath can clarify why it is needed to reset partner_bank_id to False ? |
Maybe it is expected that default Manual payment mode is created and used everywhere instead of None ? |
We reset it for being sure the code in Imagine this situation: you do an invoice, and "fix" one bank account. Before doing the payment order, the partner tells you that they change bank account. Having it fixed, you have to modify all the invoices. With this method, the new one is automatically selected as soon as you swap the order in the partner form. |
Thanks @pedrobaeza, I understand it makes sense when using a payment order, however, it breaks the default way Odoo is working when not using payment_mode (and expecting manual payment from customer). Also, it probably makes more sense for supplier bill that Odoo user needs to pay to a specific account, but in the case of customer invoice, the partner_bank_id is normally set with the bank account from your own company (and is not changing every other morning). Do you think it would be acceptable to overwrite partner_bank_id only if payment_mode_id is selected (and leave it as calculated by Odoo if no payment_mode_id is selected) ? Thanks ! |
It's also valid for only invoices, as this way, all the possible bank accounts that you have when you select to show them in the invoice on the payment mode configuration are shown. So my answer is no to change this. |
I am afraid I do not understand your rationale, this module is clearly breaking defaut Odoo behaviour that user may want to keep when not using automated payment. I do not think that partner_bank_id is the proper field on customer invoice to store information about what will be used in payment_order, in case your customer wants to change their source bank account before you issue the order, you should update it on payment order directly, not on invoice on which corresponding mandate is already fixed and cannot be modified neither... |
Module
account_payment_partner
Describe the bug
This module as of 16.0 overrides the default behavior, and previous behavior of this module in 14.0.
Invoices without payment_mode_id are created without a partner_bank_id
When creating a sales invoice through sales order without a payment_mode_id, it will create invoice without partner_bank_id. This module overrides _compute_partner_bank_id and changes the behavior so if payment_mode_id is not set, it will not assign partner_bank_id.
From users point of view and from configuration standpoint, users should not be forced to configure a otherwise useless payment_mode_id and set that by hand on sales order. For a lot of our customers, payment_mode_id is never used for sales, and mostly used for bills and payment orders. For sales it is unnecessary step to fill out just to get bank account to compute properly.
To Reproduce
Affected versions:
16.0
Steps to reproduce the behavior:
Expected behavior
Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)
The text was updated successfully, but these errors were encountered: