Skip to content
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

[13.0][IMP] account_payment_order - move date should be bank line date when offsetting_account is bank_account #805

Conversation

baimont
Copy link
Contributor

@baimont baimont commented Apr 21, 2021

Between Odoo v10.0 and Odoo v13.0, date fields on account.move and account.move.line became readonly. In both versions, date field on account.move.line is a related of the account.move one. This means that when creating our move in v10.0, date from account.move would take value of account.move.line. This is not true anymore with the readonly attributes. This is a way to return to that behavior.

@baimont baimont force-pushed the bai_13.0_account_payment_order_fix_account_move_date branch from 4f12eeb to e5b1b1a Compare April 21, 2021 14:33
@pedrobaeza
Copy link
Member

Please specify steps to reproduce the problem.

@pedrobaeza pedrobaeza added this to the 13.0 milestone Apr 21, 2021
@sanrav
Copy link

sanrav commented Apr 22, 2021

Steps to test :

  • Configure a bank journal with a bank account

image

  • Configure a payment mode "SEPA Credit Transfer to suppliers" with Offsetting account = Bank account

image

image

  • Create a vendor bill and post it

image

  • Create a payment order with Due date as Payment Execution Date Type

image

image

  • Confirm payments, generate xml file and confirm the upload => journal entry is created with accounting date = payment date

image

Copy link

@sanrav sanrav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional testing OK

@pedrobaeza
Copy link
Member

I think the problem is that you are not putting on "Move Option", "One move per payment date", and that's the problem. This PR is not correct, assigning randomly the date of the first line.

@sanrav
Copy link

sanrav commented Apr 23, 2021

I tested also with "One move per payment date" and the issue is the same. The accounting entry takes the today's date instead of payment date. Tests done on runbot OCA V13.

If you choose "One move per payment line", there is one accounting entry per payment line. So, one payment date.
If you choose "One move per payment date", we can have more than one payment line grouped into one accounting entry. But as they are grouped by payment date, we will have the same payment date on each line. So, I don't see the issue to choose randomly the date of the first line.

@pedrobaeza
Copy link
Member

@carlosdauden didn't you add such option of propagating the date?

@carlosdauden
Copy link
Contributor

I have commented this problem sometime, but since our clients did not open any issue (most of our clients use offsetting_account == "transfer_account" or they have a fix date of payment) I have not found the time to do it.

@pedrobaeza
Copy link
Member

Thanks for the confirmation and the contribution:

/ocabot merge patch

Can you fw-port it to v14?

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 13.0-ocabot-merge-pr-805-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit c093ddb into OCA:13.0 Apr 23, 2021
@OCA-git-bot
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants