Skip to content

Comments

[bt#35230] Fix issue when uploading an invoice and changing the journal#37140

Open
BT-mromero wants to merge 1 commit into16.0.project_CO_286from
16.0.project_CO_286.bt#35230
Open

[bt#35230] Fix issue when uploading an invoice and changing the journal#37140
BT-mromero wants to merge 1 commit into16.0.project_CO_286from
16.0.project_CO_286.bt#35230

Conversation

@BT-mromero
Copy link

@BT-mromero BT-mromero commented Dec 1, 2025

Description of the issue/feature this PR addresses: When changing the journal for a draft imported invoice, the name is being calculated, whereas it should actually remain unset (False).

Current behavior before PR:

Desired behavior after PR is merged:


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Links to Odoo:

…al_id key in write vals

if they use import export or any automated action that write same journal then it's take new number.
here assume that journal_id is only change on draft and if posted then it's raise error but not consider what is same journal_id come to write.

closes odoo#196777

Signed-off-by: William André (wan) <wan@odoo.com>
Comment on lines 2357 to 2361
# <PATCH> Don't recompute the name if it was already False
if not draft_move.name:
# </PATCH>
draft_move.name = False
draft_move._compute_name()

Choose a reason for hiding this comment

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

[question] we should not do changes in odoo core, only cherry picks. Is there really no other option?
The text would suggest the code to be like this:
if draft_move.name:
Because now, it will recompute, if the name was already False

Copy link
Author

Choose a reason for hiding this comment

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

You are right. I will probably patch the method, but then I will ask first for a change request approval. Thank you

@BT-mromero BT-mromero force-pushed the 16.0.project_CO_286.bt#35230 branch from 2e265d7 to ec1d0cd Compare December 1, 2025 14:51
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.

4 participants