OCA / account-financial-tools

Odoo Accountant Financial Tools and Utils
GNU Affero General Public License v3.0
300 stars 741 forks source link

[WIP][16.0][FIX] account_move_name_sequence: build invoice name from journal entry sequence #1851

Closed ljsalvatierra-factorlibre closed 2 months ago

ljsalvatierra-factorlibre commented 3 months ago

Steps to reproduce the error:

  1. Create a Journal with an entry sequence with prefix not equal to the journal short code (e.g.: B2CSEQ vs B2C)
  2. Create an invoice, set the default sales journal and save the form
  3. Edit the invoice, set the journal created at 1) and save the form, you should see the invoice name with the short code instead of the prefix from the entry sequence. It is possible that you have to change the journal multiple times to trigger the bug.
  4. Post/Confirm the invoice, should have the wrong prefix

I've recorded the following video using runboat

http://oca-account-financial-tools-16-0-de68cd391ba8.runboat.odoo-community.org

https://github.com/OCA/account-financial-tools/assets/95038732/555935e8-b404-49d3-8503-bd9ea298e767

OCA-git-bot commented 3 months ago

Hi @frahikLV, @alexis-via, @moylop260, @luisg123v, some modules you are maintaining are being modified, check this out!

moylop260 commented 3 months ago

It was fixed from:

I'm foward-porting all these changes to newer versions

e.g.

16.0 coming soon

moylop260 commented 3 months ago

Could you test if the following PR fixes the issue, please?

https://github.com/OCA/account-financial-tools/pull/1852

moylop260 commented 2 months ago

I even consider your unittest is good to have

https://github.com/OCA/account-financial-tools/pull/1854

thank you!

ljsalvatierra-factorlibre commented 2 months ago

I even consider your unittest is good to have

1854

thank you!

Thank you @moylop260