[16.0][IMP] account_payment_order: adds restriction for duplicated move lines in payment order
Restriction added so that payment lines are not duplicated
AFAIK, this restriction already exists (but not implemented that way). And it's legit to have several times the same journal item if I don't remember bad. For example, a returned payment that is again added to another payment order.
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
I'm also thinking that the cases can be more complex, as you can be interested (by any reason) to put 2 times the same move line, but with amounts lower or equal than the total amount. Example: move line with a balance of 100 €. You do 2 lines with 50 € each. This can be legal. Not sure if it's a real case though.
I can't think of any case in which you would want to duplicate lines in payment orders that don't correspond to accounting.
For the example shown (2 payments for the same item), the correct way would be to establish date_maturity at the account.move.line
I know that it's very weird, but right now the constraint doesn't exist and they are able to do it. If we avoid this now, there can be side effects. Let's add the line commenting it in the ROADMAP.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
Hi, we are going to work on this over the following weeks.
@pedrobaeza @jdidderen-noviat could you please review the last changes?
@pedrobaeza pre-commit is failing because a pre-commit failure in another module from this repo
****po-python-parse-format**** account_payment_method_fs_storage/i18n/es.po:74 Translation string couldn't be parsed correctly using str.format KeyError('detalles') - [po-python-parse-format]
Can you please fix the branch in other PR ?
Can you please fix the branch in other PR ?
Branch has been fixed
This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-1148-by-pedrobaeza-bump-patch, awaiting test results.
Congratulations, your PR was merged at 82c495481bf5b9b9f8345312d4813ad70568df71. Thanks a lot for contributing to OCA. ❤️
Please fw-port it to v17