bank-payment icon indicating copy to clipboard operation
bank-payment copied to clipboard

[16.0][IMP] account_payment_order: adds restriction for duplicated move lines in payment order

Open ACheung-FactorLibre opened this issue 2 years ago • 6 comments

Restriction added so that payment lines are not duplicated

ACheung-FactorLibre avatar Sep 27 '23 15:09 ACheung-FactorLibre

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.

pedrobaeza avatar Sep 27 '23 15:09 pedrobaeza

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). 🤖

OCA-git-bot avatar Oct 04 '23 09:10 OCA-git-bot

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.

pedrobaeza avatar Oct 06 '23 10:10 pedrobaeza

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

SoniaViciana avatar Oct 20 '23 08:10 SoniaViciana

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.

pedrobaeza avatar Oct 20 '23 14:10 pedrobaeza

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.

github-actions[bot] avatar Mar 24 '24 12:03 github-actions[bot]

Hi, we are going to work on this over the following weeks.

@pedrobaeza @jdidderen-noviat could you please review the last changes?

aritzolea avatar Apr 17 '24 11:04 aritzolea

@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]

aritzolea avatar Apr 23 '24 07:04 aritzolea

Can you please fix the branch in other PR ?

pedrobaeza avatar Apr 23 '24 18:04 pedrobaeza

Can you please fix the branch in other PR ?

Branch has been fixed

aritzolea avatar Apr 24 '24 07:04 aritzolea

This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-1148-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot avatar Apr 24 '24 07:04 OCA-git-bot

Congratulations, your PR was merged at 82c495481bf5b9b9f8345312d4813ad70568df71. Thanks a lot for contributing to OCA. ❤️

OCA-git-bot avatar Apr 24 '24 07:04 OCA-git-bot

Please fw-port it to v17

pedrobaeza avatar Apr 24 '24 08:04 pedrobaeza