8000 [FW][FIX] l10n_it_edi_ndd: recompute l10n_it_document_type for credit note by fw-bot · Pull Request #210642 · 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 #210642

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

Conversation

fw-bot
Copy link
Contributor
@fw-bot fw-bot commented May 19, 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: #210488
Forward-Port-Of: #208654

Steps to reproduce:
- Install l10n_it_edi
- 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: 6c49d48
@robodoo
Copy link
Contributor
robodoo commented May 19, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author
fw-bot commented May 19, 2025

@kitan191 @Megaaaaaa this PR targets master and is the last of the forward-port chain containing:

To merge the full chain, use

@robodoo r+

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

@robodoo robodoo added the forwardport This PR was created by @fw-bot label May 19, 2025
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 19, 2025
@kitan191
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request May 20, 2025
Steps to reproduce:
- Install l10n_it_edi
- 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

closes #210642

X-original-commit: 6c49d48
Signed-off-by: Thomas Becquevort (thbe) <thbe@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
@robodoo robodoo added the 18.4 label May 20, 2025
@robodoo robodoo closed this May 20, 2025
fdardenne pushed a commit to odoo-dev/odoo that referenced this pull request May 26, 2025
Steps to reproduce:
- Install l10n_it_edi
- 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

closes odoo#210642

X-original-commit: 6c49d48
Signed-off-by: Thomas Becquevort (thbe) <thbe@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
@fw-bot fw-bot deleted the master-17.0-opw-4689755-fix_l10n_it_document_type_compute_reverse-pta-437162-fw branch May 27, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
18.4 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