10000 [FW][FIX] l10n_it_edi_ndd: recompute l10n_it_document_type for credit note by fw-bot · Pull Request #210488 · odoo/odoo · GitHub
[go: up one dir, main page]

Skip to content

[FW][FIX] l10n_it_edi_ndd: recompute l10n_it_document_type for credit note #210488

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

Open
wants to merge 1 commit into
base: saas-18.2
Choose a base branch
from

Conversation

fw-bot
Copy link
Contributor
@fw-bot fw-bot commented May 17, 2025

Steps to reproduce:

  • Install l10n_it_edi_ndd
  • Switch to an Italian company (e.g. IT Company)
  • Create an invoice
  • Confirm the invoice
    => Document Type (in "Electronic Invoicing" tab) is computed
  • Create a credit note from the invoice
  • On credit note wizard, click on "Reverse and Create Invoice"
  • Check the created credit note

Issue:
The credit note is posted but its Document Type field (l10n_it_document_type) is empty.
l10n_it_document_type should be computed when it doesn't have a value already and the state of the move is "posted".
The credit note will be rejected when sent to SDI because this field is empty.

Cause:
In the reverse method, the field is set to False in order to be recomputed.
However, the compute method is triggered when the state changes, but the credit note not is already posted.
Therefore the field will not be recomputed.

Solution:
Set the value to False before the creation of the credit note.
So that, the field will be recomputed when posting the credit note.

opw-4689755


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

Forward-Port-Of: #210361
Forward-Port-Of: #208654

Steps to reproduce:
- Install l10n_it_edi_ndd
- Switch to an Italian company (e.g. IT Company)
- Create an invoice
- Confirm the invoice
=> Document Type (in "Electronic Invoicing" tab) is computed
- Create a credit note from the invoice
- On credit note wizard, click on "Reverse and Create Invoice"
- Check the created credit note

Issue:
The credit note is posted but its Document Type field (l10n_it_document_type)
is empty.
l10n_it_document_type should be computed when it doesn't have a value already
and the state of the move is "posted".
The credit note will be rejected when sent to SDI because this field is empty.

Cause:
In the reverse method, the field is set to False in order to be recomputed.
However, the compute method is triggered when the state changes, but the
credit note is already posted.
Therefore the field will not be recomputed.

Solution:
Set the value to False before the creation of the credit note.
So that, the field will be recomputed when posting the credit note.

opw-4689755

X-original-commit: de832b1
@robodoo
Copy link
Contributor
robodoo commented May 17, 2025

Pull request status dashboard

@robodoo robodoo added forwardport This PR was created by @fw-bot conflict There was an error while creating this forward-port PR labels May 17, 2025
@fw-bot
Copy link
Contributor Author
fw-bot commented May 17, 2025

@kitan191 @Megaaaaaa cherrypicking of pull request #208654 failed.

stdout:

CONFLICT (file location): addons/l10n_it_edi_ndd/tests/test_account_move_document_type.py added in 35b3670d79296129cc3995130cb26c3d63d87ec0 inside a directory that was renamed in 1997e6da19ce6e66aff24239b96c9b2e8006e277, suggesting it should perhaps be moved to addons/l10n_it_edi/tests/test_account_move_document_type.py.
CONFLICT (modify/delete): addons/l10n_it_edi_ndd/models/account_move.py deleted in 1997e6da19ce6e66aff24239b96c9b2e8006e277 and modified in 35b3670d79296129cc3995130cb26c3d63d87ec0.  Version 35b3670d79296129cc3995130cb26c3d63d87ec0 of addons/l10n_it_edi_ndd/models/account_move.py left in tree.
CONFLICT (modify/delete): addons/l10n_it_edi_ndd/tests/__init__.py deleted in 1997e6da19ce6e66aff24239b96c9b2e8006e277 and modified in 35b3670d79296129cc3995130cb26c3d63d87ec0.  Version 35b3670d79296129cc3995130cb26c3d63d87ec0 of addons/l10n_it_edi_ndd/tests/__init__.py left in tree.

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0