Finally, I think that a rule system will not be practical because it is the supplier decision and we can not know what are its rules (just like payment term does not work neither).
So the feature would be to add a bank account field on supplier invoice or customer credit note linked to the party (and to the company on other types). But in order to manage payable encoded without invoice, the field should also be added on account move line and to the payment for when it is not linked to a line.
But also in order to support other payment means which does not involve bank account (e.g. Paypal account, crypto-wallet etc.), I think it should be a reference field.
The payment process should not raise an error if this field does not contain a valid mean for the payment journal method.
To support assignment of accounts receivable, there will be too options:
- Add the new bank account to the party
- Use a wizard based on Grouping receivable/payable lines to change the party of the payable account with a new move
For security reason and privilege separation, we can not allow on the invoice to select any bank account.